[PATCH] D22955: [MSVC] Improved late parsing of template functions.

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 16 16:19:13 PST 2016


rnk added a comment.

If I understand correctly, this patch takes template function patterns, copies them into instantiated context, parses them in that context, and then instantiates them in that context. The key difference is that today's fdelayed-template-parsing doesn't parse the body of the function in the instantiation context. It just allows access to names at global scope that were encountered after the template pattern.

So, if I run -ast-dump, do I end up seeing both the pattern and the fully instantiated function with this patch?

This patch removes a lot of warnings from our tests. We lose a lot of our ability to diagnose MSVC-isms with this approach. I wonder if there's a better way to do delayed template parsing the way we were before, but make the template arguments available during lookup.


https://reviews.llvm.org/D22955





More information about the cfe-commits mailing list