[cfe-commits] r139303 - /cfe/trunk/lib/AST/Expr.cpp
Douglas Gregor
dgregor at apple.com
Thu Sep 8 10:56:33 PDT 2011
Author: dgregor
Date: Thu Sep 8 12:56:33 2011
New Revision: 139303
URL: http://llvm.org/viewvc/llvm-project?rev=139303&view=rev
Log:
Look through SubstNonTypeTemplateParmExpr nodes in the various
Expr::Ignore* methods that also look through implicit casts.
Modified:
cfe/trunk/lib/AST/Expr.cpp
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=139303&r1=139302&r2=139303&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Thu Sep 8 12:56:33 2011
@@ -2042,7 +2042,11 @@
E = Materialize->GetTemporaryExpr();
continue;
}
-
+ if (SubstNonTypeTemplateParmExpr *NTTP
+ = dyn_cast<SubstNonTypeTemplateParmExpr>(E)) {
+ E = NTTP->getReplacement();
+ continue;
+ }
return E;
}
}
@@ -2076,6 +2080,10 @@
= 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 @@
E = Materialize->GetTemporaryExpr();
continue;
}
+ if (SubstNonTypeTemplateParmExpr *NTTP
+ = dyn_cast<SubstNonTypeTemplateParmExpr>(E)) {
+ E = NTTP->getReplacement();
+ continue;
+ }
return E;
}
}
@@ -2167,6 +2180,12 @@
}
}
+ if (SubstNonTypeTemplateParmExpr *NTTP
+ = dyn_cast<SubstNonTypeTemplateParmExpr>(E)) {
+ E = NTTP->getReplacement();
+ continue;
+ }
+
return E;
}
}
More information about the cfe-commits
mailing list