[PATCH] D47687: [Sema] Missing -Wlogical-op-parentheses warnings in macros (PR18971)

Volodymyr Sapsai via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 16 12:39:38 PDT 2018


vsapsai added a comment.

Sorry about the delay. The change seems to be correct but `ninja check-clang` reveals the test "Misc/caret-diags-macros.c" is failing. Can you please look into that?

Appreciate your contribution, Xing, and thanks for verifying your change with tests.



================
Comment at: lib/Sema/SemaExpr.cpp:7107-7108
+  SourceManager &SM = Self.getSourceManager();
+  SourceLocation spellLoc = SM.getSpellingLoc(ParenRange.getEnd());
+  unsigned tokLen = Lexer::MeasureTokenLength(spellLoc, SM, Self.getLangOpts());
+  SourceLocation EndLoc = spellLoc.getLocWithOffset(tokLen);
----------------
Can you please start variables with an upper case letter? Like `SpellLoc`, `TokLen`.


https://reviews.llvm.org/D47687





More information about the cfe-commits mailing list