[clang] [clang] Implement -Wmissing-include-dirs (PR #94827)

via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 11 06:41:38 PDT 2024


================
@@ -6,3 +6,7 @@
 // Check that -isysroot warns on nonexistent paths.
 // RUN: %clang -### -c -target i386-apple-darwin10 -isysroot %t/warning-options %s 2>&1 | FileCheck --check-prefix=CHECK-ISYSROOT %s
 // CHECK-ISYSROOT: warning: no such sysroot directory: '{{.*}}/warning-options'
+
+// Check for proper warning with -Wmissing-include-dirs
+// RUN: %clang -### -Wmissing-include-dirs -I %t/warning-options %s 2>&1 | FileCheck --check-prefix=CHECK-MISSING-INCLUDE-DIRS %s
+// CHECK-MISSING-INCLUDE-DIRS: warning: the included directory {{.*}}/warning-options is missing [-Wmissing-include-dirs]
----------------
zmodem wrote:

nit: we usually don't include the "[-Warning-flag-name]" in the check (you can just drop that part, the check doesn't have to cover the whole line)

https://github.com/llvm/llvm-project/pull/94827


More information about the cfe-commits mailing list