[clang] [clang-cl] Add support for [[msvc::constexpr]] C++11 attribute (PR #71300)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 8 08:57:20 PST 2023
================
@@ -5546,11 +5563,14 @@ static EvalStmtResult EvaluateStmt(StmtResult &Result, EvalInfo &Info,
case Stmt::LabelStmtClass:
return EvaluateStmt(Result, Info, cast<LabelStmt>(S)->getSubStmt(), Case);
- case Stmt::AttributedStmtClass:
- // As a general principle, C++11 attributes can be ignored without
- // any semantic impact.
- return EvaluateStmt(Result, Info, cast<AttributedStmt>(S)->getSubStmt(),
- Case);
+ case Stmt::AttributedStmtClass: {
+ const auto *AS = cast<AttributedStmt>(S);
+ const auto *SS = AS->getSubStmt();
+ MSConstexprContextRAII msConstexprContext(
----------------
AaronBallman wrote:
```suggestion
MSConstexprContextRAII ConstexprContext(
```
tiny naming nit.
https://github.com/llvm/llvm-project/pull/71300
More information about the cfe-commits
mailing list