[PATCH] D28148: [Sema] Suppress warnings for C's zero initializer
Daniel Marjamäki via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 2 11:56:10 PST 2017
danielmarjamaki added a comment.
Thanks for working on these. imo these are false positives.
================
Comment at: lib/AST/Expr.cpp:1893
+
+ const IntegerLiteral *lit = dyn_cast<IntegerLiteral>(getInit(0));
+ if (!lit) {
----------------
I would recommend capital first letter for this variable
================
Comment at: lib/AST/Expr.cpp:1894
+ const IntegerLiteral *lit = dyn_cast<IntegerLiteral>(getInit(0));
+ if (!lit) {
+ return false;
----------------
I suggest a single line:
```
return Lit && Lit->getValue() == 0;
```
https://reviews.llvm.org/D28148
More information about the cfe-commits
mailing list