[PATCH] D83213: [AST][RecoveryExpr] Don't set the instantiation-bit.
Haojian Wu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 6 12:53:48 PDT 2020
hokein created this revision.
hokein added a reviewer: sammccall.
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83213
Files:
clang/lib/AST/ComputeDependence.cpp
clang/lib/AST/Expr.cpp
Index: clang/lib/AST/Expr.cpp
===================================================================
--- clang/lib/AST/Expr.cpp
+++ clang/lib/AST/Expr.cpp
@@ -3397,7 +3397,7 @@
if (!IncludePossibleEffects && getExprLoc().isMacroID())
return false;
- if (isInstantiationDependent())
+ if (isInstantiationDependent() || containsErrors())
return IncludePossibleEffects;
switch (getStmtClass()) {
Index: clang/lib/AST/ComputeDependence.cpp
===================================================================
--- clang/lib/AST/ComputeDependence.cpp
+++ 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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83213.275671.patch
Type: text/x-patch
Size: 1002 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200706/5993107c/attachment-0001.bin>
More information about the cfe-commits
mailing list