summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateStmt.cpp
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2009-06-23 14:50:21 +0000
committerEd Schouten <ed@FreeBSD.org>2009-06-23 14:50:21 +0000
commitd6aff018d446f22be4e4e0277080ebfa5b157288 (patch)
tree64b43af65e97f7659637c9ac028e39af2e26b841 /lib/Sema/SemaTemplateInstantiateStmt.cpp
parentb897c8660c4ff7037dde81b9645737bc1c992abe (diff)
Notes
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateStmt.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateStmt.cpp3
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())