[PATCH] D11600: [CONCEPTS] Add concept to VarDecl and diagnostic for uninitialized variable concept

Richard Smith richard at metafoo.co.uk
Wed Jul 29 18:43:32 PDT 2015

rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.


Eventually, we'll presumably want separate `isConstexprSpecified` / `isConstexpr` functions on `VarDecl` (and `FunctionDecl`), and for the `concept` specifier to imply `constexpr`, but that can wait for a separate change.

Comment at: lib/Sema/SemaDecl.cpp:9417-9418
@@ +9416,4 @@
+    if (Var->isConcept()) {
+      Diag(Var->getLocation(),
+           diag::err_var_concept_not_initialized);
+      Var->setInvalidDecl();
Looks like this would fit on one line.


More information about the cfe-commits mailing list