History log of /external/clang/test/Misc/warn-in-system-header.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
b42f200777a66b98989160bf3987ce431540a584 17-Apr-2013 Andy Gibbs <andyg1001@hotmail.co.uk> Extended VerifyDiagnosticConsumer to also verify source file for diagnostic.

VerifyDiagnosticConsumer previously would not check that the diagnostic and
its matching directive referenced the same source file. Common practice was
to create directives that referenced other files but only by line number,
and this led to problems such as when the file containing the directive
didn't have enough lines to match the location of the diagnostic in the
other file, leading to bizarre file formatting and other oddities.

This patch causes VerifyDiagnosticConsumer to match source files as well as
line numbers. Therefore, a new syntax is made available for directives, for
example:

// expected-error@file:line {{diagnostic message}}

This extends the @line feature where "file" is the file where the diagnostic
is generated. The @line syntax is still available and uses the current file
for the diagnostic. "file" can be specified either as a relative or absolute
path - although the latter has less usefulness, I think! The #include search
paths will be used to locate the file and if it is not found an error will be
generated.

The new check is not optional: if the directive is in a different file to the
diagnostic, the file must be specified. Therefore, a number of test-cases
have been updated with regard to this.

This closes out PR15613.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179677 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/warn-in-system-header.c
34a2c42ba8cc58a404238a3c1cbc4a7442e57832 02-Feb-2012 Ted Kremenek <kremenek@apple.com> Per discussion on cfe-dev, remove '#error' and '#warning' from diagnostic text.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149566 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/warn-in-system-header.c
144bc08f5fe6046bd8e07de5e41a4237dd2c6275 22-Apr-2011 Argyrios Kyrtzidis <akyrtzi@gmail.com> Don't hide #warnings in a system header, same as gcc. Fixes rdar://8495837.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129951 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Misc/warn-in-system-header.c