aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ComputeDependence.cpp
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2022-09-26 06:57:25 -0700
committerErich Keane <erich.keane@intel.com>2022-09-26 08:39:10 -0700
commit684a78968bd32b0ece5b852bcaa21dbc49a4b5b0 (patch)
treebec6bff42be12fc0b27fd1ab10277ab0d206434a /clang/lib/AST/ComputeDependence.cpp
parentf7e1ce0f3071849fe9c7932a92038c51105fd8bc (diff)
downloadllvm-684a78968bd32b0ece5b852bcaa21dbc49a4b5b0.zip
llvm-684a78968bd32b0ece5b852bcaa21dbc49a4b5b0.tar.gz
llvm-684a78968bd32b0ece5b852bcaa21dbc49a4b5b0.tar.bz2
Reapply "[Concepts] Recover properly from a RecoveryExpr in a concept"
This reverts commit 192d69f7e65a625e344421841e731e39f80595f5. This fixes the condition to check whether this is a situation where we are in a recovery-expr'ed concept a little better, so we don't access an inactive member of a union, which should make the bots happy. Differential Revision: https://reviews.llvm.org/D134542
Diffstat (limited to 'clang/lib/AST/ComputeDependence.cpp')
-rw-r--r--clang/lib/AST/ComputeDependence.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/AST/ComputeDependence.cpp b/clang/lib/AST/ComputeDependence.cpp
index 1f57334..334897b 100644
--- a/clang/lib/AST/ComputeDependence.cpp
+++ b/clang/lib/AST/ComputeDependence.cpp
@@ -853,7 +853,10 @@ ExprDependence clang::computeDependence(ConceptSpecializationExpr *E,
ExprDependence D =
ValueDependent ? ExprDependence::Value : ExprDependence::None;
- return D | toExprDependence(TA);
+ auto Res = D | toExprDependence(TA);
+ if(!ValueDependent && E->getSatisfaction().ContainsErrors)
+ Res |= ExprDependence::Error;
+ return Res;
}
ExprDependence clang::computeDependence(ObjCArrayLiteral *E) {