[PATCH] Header guard warning is too agressive
Richard Trieu
rtrieu at google.com
Thu Oct 10 18:26:46 PDT 2013
I have no objections to this patch. Keep PR17053 open for now. If you fix the indenting issues I marked, this should be ready for committing.
================
Comment at: lib/Lex/PPLexerChange.cpp:281
@@ +280,3 @@
+ << FixItHint::CreateReplacement(
+ CurPPLexer->MIOpt.GetDefinedLocation(),
+ ControllingMacro->getName());
----------------
80 column violation. Indent these lines 4 past the start of FixItHint
================
Comment at: lib/Lex/PPLexerChange.cpp:273
@@ +272,3 @@
+ diag::warn_header_guard)
+ << CurPPLexer->MIOpt.GetMacroLocation()
+ << ControllingMacro;
----------------
Indent all the "<<" operators two spaces.
================
Comment at: lib/Lex/PPLexerChange.cpp:265
@@ +264,3 @@
+ DefinedMacroName.size()) / 2;
+ const unsigned ED = ControllingMacroName.edit_distance(
+ DefinedMacroName,
----------------
Add a newline after the "=" and indent four spaces.
http://llvm-reviews.chandlerc.com/D1506
More information about the cfe-commits
mailing list