Look through SubstNonTypeTemplateParmExpr nodes in the various

Expr::Ignore* methods that also look through implicit casts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139303 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Douglas Gregor 2011-09-08 17:56:33 +00:00
Родитель ed9d84a211
Коммит c0244c5c35
1 изменённых файлов: 20 добавлений и 1 удалений

Просмотреть файл

@ -2042,7 +2042,11 @@ Expr *Expr::IgnoreParenCasts() {
E = Materialize->GetTemporaryExpr();
continue;
}
if (SubstNonTypeTemplateParmExpr *NTTP
= dyn_cast<SubstNonTypeTemplateParmExpr>(E)) {
E = NTTP->getReplacement();
continue;
}
return E;
}
}
@ -2076,6 +2080,10 @@ Expr *Expr::IgnoreParenLValueCasts() {
= dyn_cast<MaterializeTemporaryExpr>(E)) {
E = Materialize->GetTemporaryExpr();
continue;
} else if (SubstNonTypeTemplateParmExpr *NTTP
= dyn_cast<SubstNonTypeTemplateParmExpr>(E)) {
E = NTTP->getReplacement();
continue;
}
break;
}
@ -2110,6 +2118,11 @@ Expr *Expr::IgnoreParenImpCasts() {
E = Materialize->GetTemporaryExpr();
continue;
}
if (SubstNonTypeTemplateParmExpr *NTTP
= dyn_cast<SubstNonTypeTemplateParmExpr>(E)) {
E = NTTP->getReplacement();
continue;
}
return E;
}
}
@ -2167,6 +2180,12 @@ Expr *Expr::IgnoreParenNoopCasts(ASTContext &Ctx) {
}
}
if (SubstNonTypeTemplateParmExpr *NTTP
= dyn_cast<SubstNonTypeTemplateParmExpr>(E)) {
E = NTTP->getReplacement();
continue;
}
return E;
}
}