diff options
| author | Ed Schouten <ed@FreeBSD.org> | 2009-06-23 14:50:21 +0000 |
|---|---|---|
| committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-23 14:50:21 +0000 |
| commit | d6aff018d446f22be4e4e0277080ebfa5b157288 (patch) | |
| tree | 64b43af65e97f7659637c9ac028e39af2e26b841 /lib/Sema/SemaTemplateInstantiateStmt.cpp | |
| parent | b897c8660c4ff7037dde81b9645737bc1c992abe (diff) | |
Notes
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateStmt.cpp')
| -rw-r--r-- | lib/Sema/SemaTemplateInstantiateStmt.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateStmt.cpp b/lib/Sema/SemaTemplateInstantiateStmt.cpp index efdcec81afff..565b95b329f7 100644 --- a/lib/Sema/SemaTemplateInstantiateStmt.cpp +++ b/lib/Sema/SemaTemplateInstantiateStmt.cpp @@ -145,6 +145,9 @@ TemplateStmtInstantiator::VisitSwitchCase(SwitchCase *S) { } Sema::OwningStmtResult TemplateStmtInstantiator::VisitCaseStmt(CaseStmt *S) { + // The case value expressions are not potentially evaluated. + EnterExpressionEvaluationContext Unevaluated(SemaRef, Action::Unevaluated); + // Instantiate left-hand case value. OwningExprResult LHS = SemaRef.InstantiateExpr(S->getLHS(), TemplateArgs); if (LHS.isInvalid()) |
