From b13eb8dca5df6424abeedfdbfd1a96fbb7a97565 Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Wed, 11 Jul 2012 19:58:23 +0000 Subject: Allow -verify directives to be filtered by preprocessing. This is accomplished by making VerifyDiagnosticsConsumer a CommentHandler, which then only reads the -verify directives that are actually in live blocks of code. It also makes it simpler to handle -verify directives that appear in header files, though we still have to manually reparse some files depending on how they are generated. This requires some test changes. In particular, all PCH tests now have their -verify directives outside the "header" portion of the file, using the @line syntax added in r159978. Other tests have been modified mostly to make it clear what is being tested, and to prevent polluting the expected output with the directives themselves. Patch by Andy Gibbs! (with slight modifications) The new Frontend/verify-* tests exercise the functionality of this commit, as well as r159978, r159979, and r160053 (Andy's other -verify enhancements). llvm-svn: 160068 --- clang/test/PCH/cxx-trailing-return.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'clang/test/PCH/cxx-trailing-return.cpp') diff --git a/clang/test/PCH/cxx-trailing-return.cpp b/clang/test/PCH/cxx-trailing-return.cpp index ff85f6d1c5f..aa3879077f0 100644 --- a/clang/test/PCH/cxx-trailing-return.cpp +++ b/clang/test/PCH/cxx-trailing-return.cpp @@ -4,12 +4,14 @@ #ifndef HEADER_INCLUDED #define HEADER_INCLUDED -typedef auto f() -> int; // expected-note {{here}} -typedef int g(); // expected-note {{here}} +typedef auto f() -> int; +typedef int g(); #else typedef void f; // expected-error {{typedef redefinition with different types ('void' vs 'auto () -> int')}} + // expected-note@7 {{here}} typedef void g; // expected-error {{typedef redefinition with different types ('void' vs 'int ()')}} + // expected-note@8 {{here}} #endif -- cgit v1.2.3