NoQ added a comment.

In https://reviews.llvm.org/D35216#886212, @rsmith wrote:

> This is precisely how the rest of the compiler handles 
> `CXXStdInitializerListExpr`


Wow. Cool. I'd see what I can do. Yeah, it seems that this is a great case for 
us to pattern-match the implementations as well (the problems are still there 
for other STL stuff).

Do you think this patch should be blocked? Or i can land that and follow up 
with complete modeling later; it'd be larger.



================
Comment at: lib/StaticAnalyzer/Core/ExprEngine.cpp:1132
+          for (auto Child : Ex->children()) {
+            if (!Child)
+              continue;
----------------
dcoughlin wrote:
> Is this 'if' needed?
Not sure, wanted to be defensive. It seems that `CXXStdInitializerList` always 
contains a single child (`InitListExpr`) so it's irrelevant if the list is 
empty, while boxed expressions contain no children when empty, and hanging 
commas are ignored. Replaced with an assertion just in case.


https://reviews.llvm.org/D35216



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to