From 8925d4622b169ddca7bf1f1c386d5c8918e03a24 Mon Sep 17 00:00:00 2001 From: John Thompson Date: Mon, 23 Sep 2013 14:17:27 +0000 Subject: [PATCH] Changed error messages to use source quoting. llvm-svn: 191201 --- clang-tools-extra/docs/modularize.rst | 73 +++++++++++++-------------- 1 file changed, 36 insertions(+), 37 deletions(-) diff --git a/clang-tools-extra/docs/modularize.rst b/clang-tools-extra/docs/modularize.rst index d23dd83b91a5..a389a7ab2b85 100644 --- a/clang-tools-extra/docs/modularize.rst +++ b/clang-tools-extra/docs/modularize.rst @@ -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.