aboutsummaryrefslogtreecommitdiff
path: root/include/clang/AST/EvaluatedExprVisitor.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/AST/EvaluatedExprVisitor.h')
-rw-r--r--include/clang/AST/EvaluatedExprVisitor.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/clang/AST/EvaluatedExprVisitor.h b/include/clang/AST/EvaluatedExprVisitor.h
index 62c35990b3..6e6f3176ff 100644
--- a/include/clang/AST/EvaluatedExprVisitor.h
+++ b/include/clang/AST/EvaluatedExprVisitor.h
@@ -49,6 +49,9 @@ public:
}
void VisitChooseExpr(ChooseExpr *E) {
+ // Don't visit either child expression if the condition is dependent.
+ if (E->getCond()->isValueDependent())
+ return;
// Only the selected subexpression matters; the other one is not evaluated.
return this->Visit(E->getChosenSubExpr(Context));
}