Changed error messages to use source quoting.

llvm-svn: 191201
This commit is contained in:
John Thompson 2013-09-23 14:17:27 +00:00
parent 942dfe625b
commit 8925d4622b
1 changed files with 36 additions and 37 deletions

View File

@ -53,52 +53,51 @@ Modularize will check for the following:
* #include directives inside 'extern "C/C++" {}' or 'namespace (name) {}' blocks
Modularize will do normal C/C++ parsing, reporting normal errors and warnings,
but will also report special error messages like the following:
but will also report special error messages like the following::
| error: '(symbol)' defined at multiple locations:
| (file):(row):(column)
| (file):(row):(column)
error: '(symbol)' defined at multiple locations:
(file):(row):(column)
(file):(row):(column)
error: header '(file)' has different contents depending on how it was
included
error: header '(file)' has different contents depending on how it was included
The latter might be followed by messages like the following:
The latter might be followed by messages like the following::
| note: '(symbol)' in (file) at (row):(column) not always provided
note: '(symbol)' in (file) at (row):(column) not always provided
Checks will also be performed for macro expansions, defined(macro)
expressions, and preprocessor conditional directives that evaluate
inconsistently, and can produce error messages like the following:
inconsistently, and can produce error messages like the following::
| (...)/SubHeader.h:11:5:
| #if SYMBOL == 1
| ^
| error: Macro instance 'SYMBOL' has different values in this header,
| depending on how it was included.
| 'SYMBOL' expanded to: '1' with respect to these inclusion paths:
| (...)/Header1.h
| (...)/SubHeader.h
| (...)/SubHeader.h:3:9:
| #define SYMBOL 1
| ^
| Macro defined here.
| 'SYMBOL' expanded to: '2' with respect to these inclusion paths:
| (...)/Header2.h
| (...)/SubHeader.h
| (...)/SubHeader.h:7:9:
| #define SYMBOL 2
| ^
| Macro defined here.
(...)/SubHeader.h:11:5:
#if SYMBOL == 1
^
error: Macro instance 'SYMBOL' has different values in this header,
depending on how it was included.
'SYMBOL' expanded to: '1' with respect to these inclusion paths:
(...)/Header1.h
(...)/SubHeader.h
(...)/SubHeader.h:3:9:
#define SYMBOL 1
^
Macro defined here.
'SYMBOL' expanded to: '2' with respect to these inclusion paths:
(...)/Header2.h
(...)/SubHeader.h
(...)/SubHeader.h:7:9:
#define SYMBOL 2
^
Macro defined here.
Checks will also be performed for '#include' directives that are
nested inside 'extern "C/C++" {}' or 'namespace (name) {}' blocks,
and can produce error message like the following:
and can produce error message like the following::
| IncludeInExtern.h:2:3:
| #include "Empty.h"
| ^
| error: Include directive within extern "C" {}.
| IncludeInExtern.h:1:1:
| extern "C" {
| ^
| The "extern "C" {}" block is here.
IncludeInExtern.h:2:3:
#include "Empty.h"
^
error: Include directive within extern "C" {}.
IncludeInExtern.h:1:1:
extern "C" {
^
The "extern "C" {}" block is here.