aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-06-22 23:06:13 +0000
committerDouglas Gregor <dgregor@apple.com>2009-06-22 23:06:13 +0000
commitd7f37bf8b9a211455c5037df7b7e88e5a9510119 (patch)
tree3e2f8b4bdfc41b7836ecf45752dbce8b5e831fde /lib/Sema/Sema.cpp
parent2f96a0679a8d9c05fd3634340421f2d360701059 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@73915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/Sema.cpp')
-rw-r--r--lib/Sema/Sema.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp
index 2fa09b9046..c37f66dae9 100644
--- a/lib/Sema/Sema.cpp
+++ b/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;