diff --git a/clang/lib/AST/ComputeDependence.cpp b/clang/lib/AST/ComputeDependence.cpp --- a/clang/lib/AST/ComputeDependence.cpp +++ b/clang/lib/AST/ComputeDependence.cpp @@ -501,7 +501,7 @@ // FIXME: drop type+value+instantiation once Error is sufficient to suppress // bogus dianostics. auto D = toExprDependence(E->getType()->getDependence()) | - ExprDependence::ValueInstantiation | ExprDependence::Error; + ExprDependence::Value | ExprDependence::Error; for (auto *S : E->subExpressions()) D |= S->getDependence(); return D; diff --git a/clang/lib/AST/Expr.cpp b/clang/lib/AST/Expr.cpp --- a/clang/lib/AST/Expr.cpp +++ b/clang/lib/AST/Expr.cpp @@ -3397,7 +3397,7 @@ if (!IncludePossibleEffects && getExprLoc().isMacroID()) return false; - if (isInstantiationDependent()) + if (isInstantiationDependent() || containsErrors()) return IncludePossibleEffects; switch (getStmtClass()) {