[cfe-commits] [PATCH] Fix warnings found by gcc-4.6 (issue3888041)

doug.gregor at gmail.com doug.gregor at gmail.com
Mon Jan 17 11:32:54 PST 2011


Looks great, please commit!


http://codereview.appspot.com/3888041/diff/1/lib/Lex/PPMacroExpansion.cpp
File lib/Lex/PPMacroExpansion.cpp (right):

http://codereview.appspot.com/3888041/diff/1/lib/Lex/PPMacroExpansion.cpp#newcode865
lib/Lex/PPMacroExpansion.cpp:865: assert(IsValid && "invalid
__has_include"); (void)IsValid;
FWIW, Chris has already cleaned up this bit.

http://codereview.appspot.com/3888041/diff/1/lib/Parse/ParseObjc.cpp
File lib/Parse/ParseObjc.cpp (left):

http://codereview.appspot.com/3888041/diff/1/lib/Parse/ParseObjc.cpp#oldcode149
lib/Parse/ParseObjc.cpp:149: SourceLocation lparenLoc = ConsumeParen();
The fact that we're not using lparenLoc means that we're providing poor
recovery here (e.g., by not using MatchRHSPunctuation). It's not your
problem to fix, but thanks for pointing it out!

http://codereview.appspot.com/3888041/diff/1/lib/Sema/SemaDeclCXX.cpp
File lib/Sema/SemaDeclCXX.cpp (right):

http://codereview.appspot.com/3888041/diff/1/lib/Sema/SemaDeclCXX.cpp#newcode4930
lib/Sema/SemaDeclCXX.cpp:4930: if (!BaseType->getAs<RecordType>()) {
How about

   if (!BaseType->isRecordType())

which is slightly more efficient?

http://codereview.appspot.com/3888041/



More information about the cfe-commits mailing list