rsmith added a comment. This is a bug -- we intend to reuse `Stmt` nodes across the template and its instantiations, but we should have separate `Decl` nodes in each instantiation (otherwise the `Decl`'s parent will be wrong etc).
================ Comment at: lib/Sema/SemaTemplateInstantiate.cpp:1519-1521 @@ -1518,5 +1518,5 @@ TypeLoc TL = T->getTypeLoc().IgnoreParens(); if (!TL.getAs<FunctionProtoTypeLoc>()) return false; ---------------- This doesn't look quite right: IIRC, there can be attributes here as well as parens (in particular, calling convention attributes can appear in this position). ================ Comment at: lib/Sema/SemaTemplateInstantiate.cpp:1530 @@ -1528,2 +1529,3 @@ if (!P) continue; + AllParmsNull = false; ---------------- Just return true here? http://reviews.llvm.org/D16478 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits