[PATCH] [Parse] Allow 'constexpr' in condition declarations
Richard Smith
richard at metafoo.co.uk
Mon May 4 18:14:56 PDT 2015
This is looking good.
================
Comment at: include/clang/Parse/Parser.h:1689
@@ -1689,1 +1688,3 @@
+ DSC_template_type_arg, // template type argument context
+ DSC_constexpr // constexpr declaration context
};
----------------
I think this should be called `DSC_condition`?
================
Comment at: lib/Sema/SemaExprCXX.cpp:2586-2589
@@ -2585,3 +2585,6 @@
- return Condition;
+ return ActOnFinishFullExpr(Condition.get(),
+ Condition.get()->getExprLoc(),
+ false, /* DiscardedValue */
+ Condition.get()->isCXX11ConstantExpr(Context));
}
----------------
For the switch condition case, additional conversion will be performed on the result of this function; you should delay the `ActOnFinishFullExpr` until after those conversions in that case.
http://reviews.llvm.org/D8978
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list