Skip to content

Commit ec6fde3

Browse files
committed
Fix copy-paste error and only check for instantiation dependence
1 parent f812c54 commit ec6fde3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/AST/StmtCXX.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,8 @@ bool CXXExpansionStmtPattern::hasDependentSize() const {
171171

172172
if (auto *Iterating = dyn_cast<CXXIteratingExpansionStmtPattern>(this)) {
173173
const Expr *Begin = Iterating->getBeginVar()->getInit();
174-
const Expr *End = Iterating->getBeginVar()->getInit();
175-
return Begin->isTypeDependent() || Begin->isValueDependent() ||
176-
End->isTypeDependent() || End->isValueDependent();
174+
const Expr *End = Iterating->getEndVar()->getInit();
175+
return Begin->isInstantiationDependent() || End->isInstantiationDependent();
177176
}
178177

179178
if (isa<CXXDestructuringExpansionStmtPattern>(this))

0 commit comments

Comments
 (0)