ahatanak marked 3 inline comments as done.
ahatanak added inline comments.

================
Comment at: lib/Sema/SemaExpr.cpp:6097
+      // non-trivial to copy or default-initialize.
+      checkNonTrivialCUnionInInitList(ILE);
+  }
----------------
rjmccall wrote:
> Can we extract a common function that checks the initializer expression of a 
> non-trivial C union?  I think there are at least three separate places that 
> do that in this patch, and it's not too hard to imagine that we might want to 
> add more cases to the common analysis.
Do you mean we should have something like `bool 
checkNonTrivialCUnionInInitList(const Expr *Init)` so that we don't have to 
call `dyn_cast`? If `Init` is an `InitListExpr`, the function diagnoses 
non-trivial C unions types and returns true, otherwise it returns false.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63753/new/

https://reviews.llvm.org/D63753



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

Reply via email to