summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-03-03 04:44:36 +0000
committerDouglas Gregor <dgregor@apple.com>2009-03-03 04:44:36 +0000
commit463421deb1c3b6e5e41dba132853645cdd260195 (patch)
treef3ea367fd8b21403ab75a3f18a9adb14140db4f6 /clang/lib/AST
parent9c51e8f962d5d7bf7fabd7cbdd47770709228a2c (diff)
downloadbcm5719-llvm-463421deb1c3b6e5e41dba132853645cdd260195.tar.gz
bcm5719-llvm-463421deb1c3b6e5e41dba132853645cdd260195.zip
Implement the basics of implicit instantiation of class templates, in
response to attempts to diagnose an "incomplete" type. This will force us to use DiagnoseIncompleteType more regularly (rather than looking at isIncompleteType), but that's also a good thing. Implicit instantiation is still very simplistic, and will create a new definition for the class template specialization (as it should) but it only actually instantiates the base classes and attaches those. Actually instantiating class members will follow. Also, instantiate the types of non-type template parameters before checking them, allowing, e.g., template<typename T, T Value> struct Constant; to work properly. llvm-svn: 65924
Diffstat (limited to 'clang/lib/AST')
-rw-r--r--clang/lib/AST/DeclCXX.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclCXX.cpp b/clang/lib/AST/DeclCXX.cpp
index b1394fe788b..45a3372ada6 100644
--- a/clang/lib/AST/DeclCXX.cpp
+++ b/clang/lib/AST/DeclCXX.cpp
@@ -52,6 +52,7 @@ CXXRecordDecl::setBases(CXXBaseSpecifier const * const *Bases,
if (this->Bases)
delete [] this->Bases;
+ // FIXME: allocate using the ASTContext
this->Bases = new CXXBaseSpecifier[NumBases];
this->NumBases = NumBases;
for (unsigned i = 0; i < NumBases; ++i)
OpenPOWER on IntegriCloud