================ Comment at: lib/Sema/SemaExpr.cpp:7027-7029 @@ +7026,5 @@ + + // Check that left hand side is !something. + UnaryOperator *UO = dyn_cast<UnaryOperator>(LHS.get()); + if (!UO || UO->getOpcode() != UO_LNot) return; + ---------------- Richard Smith wrote: > Tiny thing: this is probably cheaper than the type check for the RHS, and > will bail out much more often; maybe move this check earlier? Done.
================ Comment at: lib/Sema/SemaExpr.cpp:7041 @@ +7040,3 @@ + SourceLocation FirstOpen = SubExpr->getLocStart(); + SourceLocation FirstClose = RHS.get()->getSourceRange().getEnd(); + FirstClose = S.getPreprocessor().getLocForEndOfToken(FirstClose); ---------------- Richard Smith wrote: > RHS.get()->getLocEnd() Done. ================ Comment at: lib/Sema/SemaExpr.cpp:7048-7049 @@ +7047,4 @@ + // Second note suggests (!x) < y + SourceLocation SecondOpen = LHS.get()->getLocStart(); + SourceLocation SecondClose = LHS.get()->getSourceRange().getEnd(); + SecondClose = S.getPreprocessor().getLocForEndOfToken(SecondClose); ---------------- Richard Smith wrote: > LHS.get()->getLocEnd(), or use LHS.get()->getSourceRange() to get both at > once (which is slightly cheaper). Done. http://llvm-reviews.chandlerc.com/D505 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
