[PATCH] D24371: Add diagnostics to require_constant_initialization
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 9 13:03:05 PDT 2016
rsmith added a comment.
There's no way for `-verify` to test for a diagnostic with an invalid location at the moment. Maybe add a FIXME and disable that portion of the test for C++11?
Comment at: lib/Sema/SemaDecl.cpp:10535-10538
@@ -10534,1 +10534,6 @@
+ APValue Value;
+ SmallVector<PartialDiagnosticAt, 8> Notes;
+ Value, getASTContext(), var, Notes);
+ for (auto &it : Notes)
Can you capture the diagnostics from `checkInitIsICE` instead of recomputing them here? (It looks straightforward to add an overload that takes a vector of notes.) In the non-C++11 case, you can produce a note pointing to `CacheCulprit` instead.
More information about the cfe-commits