diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-06-22 23:06:13 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-06-22 23:06:13 +0000 |
commit | 77b50e1126b8699a170c48cef8a91f80a1127f25 (patch) | |
tree | 66b6ef20a5e2bec188090bbaefd368b2494ebac6 /clang/lib/Sema/Sema.cpp | |
parent | 6589a2e1db7f4efbea903c2c9ad3c89c014f6902 (diff) | |
download | bcm5719-llvm-77b50e1126b8699a170c48cef8a91f80a1127f25.tar.gz bcm5719-llvm-77b50e1126b8699a170c48cef8a91f80a1127f25.zip |
Implement implicit instantiation of the member functions of a class template
specialization. At present, all implicit instantiations occur at the
end of the translation unit.
llvm-svn: 73915
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r-- | clang/lib/Sema/Sema.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp index 2fa09b90464..c37f66dae90 100644 --- a/clang/lib/Sema/Sema.cpp +++ b/clang/lib/Sema/Sema.cpp @@ -235,6 +235,18 @@ void Sema::DeleteStmt(StmtTy *S) { /// translation unit when EOF is reached and all but the top-level scope is /// popped. void Sema::ActOnEndOfTranslationUnit() { + // C++: Perform implicit template instantiations. + // + // FIXME: When we perform these implicit instantiations, we do not carefully + // keep track of the point of instantiation (C++ [temp.point]). This means + // that name lookup that occurs within the template instantiation will + // always happen at the end of the translation unit, so it will find + // some names that should not be found. Although this is common behavior + // for C++ compilers, it is technically wrong. In the future, we either need + // to be able to filter the results of name lookup or we need to perform + // template instantiations earlier. + PerformPendingImplicitInstantiations(); + if (!CompleteTranslationUnit) return; |