Provide -verify support to match "any" line for diagnostics in included files.
Allow diagnostic checks that originate in included files to be matched without necessarily determining the line number that the diagnostic occurs on. The new syntax replaces the line number with '*'. This extension is limited to diagnostics in included files and may be used where the include file is not part of the test-suite itself.
Expected uses are for diagnostics originating in system headers, or for users who use -verify in testing 3rd-party library code where the location of diagnostics in header files may change from revision to revision and their precise location is not important to the success of the test-case.
llvm-svn: 212735
diff --git a/clang/test/Frontend/verify.c b/clang/test/Frontend/verify.c
index 4bd0c90..e2e7894 100644
--- a/clang/test/Frontend/verify.c
+++ b/clang/test/Frontend/verify.c
@@ -134,9 +134,18 @@
// expected-warning@verify-directive.h: {{ }}
// expected-error@-1 {{missing or invalid line number}}
+// expected-warning@verify-directive.h:0 {{ }}
+// expected-error@-1 {{missing or invalid line number}}
+
+// expected-warning@verify-directive.h:0*{{ }}
+// expected-error@-1 {{missing or invalid line number}}
+
+// expected-warning@verify-directive.h:*0{{ }}
+// syntactically ok -- means match in any line for 0 occurrences.
+
// expected-warning@verify-directive.h:1 {{diagnostic}}
// CHECK8: error: 'warning' diagnostics expected but not seen:
-// CHECK8-NEXT: File {{.*}}verify-directive.h Line 1 (directive at {{.*}}verify.c:137): diagnostic
+// CHECK8-NEXT: File {{.*}}verify-directive.h Line 1 (directive at {{.*}}verify.c:146): diagnostic
// CHECK8-NEXT: 1 error generated.
#endif