Re: [PATCH] D24371: Add diagnostics to require_constant_initialization

2017-05-31 Thread Keno Fischer via cfe-commits
Go for it On May 31, 2017 20:07, "Eric Fiselier via Phabricator" < revi...@reviews.llvm.org> wrote: > EricWF added a comment. > > @loladiro The patch doesn't apply correctly to the test. Do you mind if I > hijack this and fix it? > > > Repository: > rL LLVM > > https://reviews.llvm.org/D24371 >

Re: [PATCH] D24371: Add diagnostics to require_constant_initialization

2016-09-09 Thread Keno Fischer via cfe-commits
loladiro updated this revision to Diff 70915. loladiro added a comment. Address review comments: - Disable C++11 test that lacks source locations - Use CacheCulprit to give diagnostics for < C++11 Repository: rL LLVM https://reviews.llvm.org/D24371 Files: lib/Sema/SemaDecl.cpp test/Sema

Re: [PATCH] D24371: Add diagnostics to require_constant_initialization

2016-09-09 Thread Richard Smith via cfe-commits
rsmith added inline comments. Comment at: lib/Sema/SemaDecl.cpp:10535-10538 @@ -10534,1 +10534,6 @@ << attr->getRange(); +APValue Value; +SmallVector Notes; +cast(var->ensureEvaluatedStmt()->Value)->EvaluateAsInitializer( + Value, getAST

Re: [PATCH] D24371: Add diagnostics to require_constant_initialization

2016-09-09 Thread Keno Fischer via cfe-commits
loladiro added inline comments. Comment at: lib/Sema/SemaDecl.cpp:10535-10538 @@ -10534,1 +10534,6 @@ << attr->getRange(); +APValue Value; +SmallVector Notes; +cast(var->ensureEvaluatedStmt()->Value)->EvaluateAsInitializer( + Value, getA

Re: [PATCH] D24371: Add diagnostics to require_constant_initialization

2016-09-09 Thread Richard Smith via cfe-commits
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 @@ << attr->getR