зеркало из https://github.com/microsoft/clang-1.git
b42f200777
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 |
||
---|---|---|
.. | ||
Inputs | ||
Weverything.c | ||
Wno-everything.c | ||
ast-codegen.c | ||
ast-main.c | ||
ast-main.cpp | ||
cpp-output.c | ||
darwin-version.c | ||
dependency-gen-escaping.c | ||
dependency-gen.c | ||
dependency-generation-crash.c | ||
diagnostics-option-names.c | ||
hexagon-target-basic.c | ||
iframework.c | ||
ir-support-codegen.ll | ||
ir-support-errors.ll | ||
lit.local.cfg | ||
macros.c | ||
output-failures.c | ||
preprocessed-output-macro-first-token.c | ||
print-header-includes.c | ||
rewrite-includes-invalid-hasinclude.c | ||
rewrite-includes-missing.c | ||
rewrite-includes-modules.c | ||
rewrite-includes.c | ||
rewrite-macros.c | ||
stdin.c | ||
system-header-prefix.c | ||
undef.c | ||
unknown-pragmas.c | ||
verify-directive.h | ||
verify-fatal.c | ||
verify.c | ||
verify2.c | ||
verify2.h | ||
verify3.c | ||
warning-mapping-1.c | ||
warning-mapping-2.c | ||
warning-mapping-3.c | ||
warning-mapping-4.c | ||
warning-mapping-5.c | ||
warning-options.cpp |