[PATCH] D22587: [ASTContext] Fix part of DR224 for nontype template arguments

Matthias Gehre via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 21 14:34:42 PDT 2016

mgehre added inline comments.

Comment at: lib/AST/ASTContext.cpp:4456
@@ +4455,3 @@
+      // the template parameter and not an expression involving the template parameter.
+      auto *E = Arg.getAsExpr()->IgnoreImpCasts();
+      while(auto *DeclRef = dyn_cast_or_null<DeclRefExpr>(E)) {
aaron.ballman wrote:
> `const auto *` (and propagate it to other declarations)?
Unfortunately, the TemplateArgument constructor in

return TemplateArgument(DeclRef);

takes a Expr* (and not a const Expr*).


More information about the cfe-commits mailing list