summaryrefslogtreecommitdiff
path: root/clang-tools-extra/docs
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2018-10-30 15:52:36 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2018-10-30 15:52:36 +0000
commit872737018768a60d0701cc953e6c9252d963b5c3 (patch)
tree1af61bbb7cd5a2323fa430604a8a88b9fcf643c2 /clang-tools-extra/docs
parent1a156e009a50bb4cd499a7ada289c6473d0d106c (diff)
[clang-tidy] cppcoreguidelines-macro-usage: print macro names
Summary: The macro may not have location (or more generally, the location may not exist), e.g. if it originates from compiler's command-line. The check complains on all the macros, even those without the location info. Which means, it only says it does not like it. What is 'it'? I have no idea. If we don't print the name, then there is no way to deal with that situation. And in general, not printing name here forces the user to try to understand, given, the macro definition location, what is the macro name? This isn't fun. Also, ignores-by-default the macros originating from command-line, with an option to not ignore those. I suspect some more issues may crop up later. Reviewers: JonasToth, aaron.ballman, hokein, xazax.hun, alexfh Reviewed By: JonasToth, aaron.ballman Subscribers: nemanjai, kbarton, rnkovacs, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D53817
Diffstat (limited to 'clang-tools-extra/docs')
-rw-r--r--clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst
index 4fe0b4803b1..01cfbd6a052 100644
--- a/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst
+++ b/clang-tools-extra/docs/clang-tidy/checks/cppcoreguidelines-macro-usage.rst
@@ -26,3 +26,8 @@ Options
Boolean flag to warn on all macros except those with CAPS_ONLY names.
This option is intended to ease introduction of this check into older
code bases. Default value is `0`/`false`.
+
+.. option:: IgnoreCommandLineMacros
+
+ Boolean flag to toggle ignoring command-line-defined macros.
+ Default value is `1`/`true`.