[PATCH] D32646: Fix a bug that -Wmissing-braces fires on system headers

Vassil Vassilev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 30 04:16:17 PDT 2017


v.g.vassilev added a comment.

LGTM, modulo the comment.



================
Comment at: lib/Sema/SemaInit.cpp:892
+      SpellingLoc = SemaRef.getSourceManager().getSpellingLoc(SpellingLoc);
+      if (!(SpellingLoc.isValid() && 
+            SemaRef.getSourceManager().isInSystemHeader(SpellingLoc))) {
----------------
I'd avoid double negations. Could you use `isInvalid` instead of `!isValid`. That would make the condition more readable.


https://reviews.llvm.org/D32646





More information about the cfe-commits mailing list