diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-12-12 18:16:41 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-12-12 18:16:41 +0000 |
commit | a88cfbfac9bbcbb9858f048d6d73a48711d8e93d (patch) | |
tree | 27d6e5d44d29a2f5c46ab790f6f83b590a682b13 /include/clang/Frontend/CompilerInvocation.h | |
parent | d9c84c8381261530b16512d2aac146de8271ea1e (diff) |
Rework the way we handle template instantiation for
implicitly-generated AST nodes. We previously built instantiated nodes
for each of these AST nodes, then passed them on to Sema, which was
not prepared to see already-type-checked nodes (see PR5755). In some
places, we had ugly workarounds to try to avoid re-type-checking
(e.g., in VarDecl initializer instantiation).
Now, we skip implicitly-generated nodes when performing instantiation,
preferring instead to build just the AST nodes that directly reflect
what was written in the source code. This has several advantages:
- We don't need to instantiate anything that doesn't have a direct
correlation to the source code, so we can have better location
information.
- Semantic analysis sees the same thing at template instantiation
time that it would see for a non-template.
- At least one ugly hack (VarDecl initializers) goes away.
Fixes PR5755.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInvocation.h')
0 files changed, 0 insertions, 0 deletions