aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-24 23:14:47 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-24 23:14:47 +0000
commitb9aa6b214c8fbc3e081dde575eef1f0913d48bdc (patch)
tree77bf753a91b1d025823f3adc0a285c0d973beab9 /lib/AST/DeclTemplate.cpp
parent119fa68eb1394a2653bb651dc5c1cf294cbbdbda (diff)
WIP implementation of explicit function template specialization. This
first implementation recognizes when a function declaration is an explicit function template specialization (based on the presence of a template<> header), performs template argument deduction + ambiguity resolution to determine which template is being specialized, and hooks There are many caveats here: - We completely and totally drop any explicitly-specified template arguments on the floor - We don't diagnose any of the extra semantic things that we should diagnose. - I haven't looked to see that we're getting the right linkage for explicit specializations On a happy note, this silences a bunch of errors that show up in libstdc++'s <iostream>, although Clang still can't get through the entire header. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/DeclTemplate.cpp')
-rw-r--r--lib/AST/DeclTemplate.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/AST/DeclTemplate.cpp b/lib/AST/DeclTemplate.cpp
index bd1aa7ca9e..7836b3f827 100644
--- a/lib/AST/DeclTemplate.cpp
+++ b/lib/AST/DeclTemplate.cpp
@@ -373,6 +373,12 @@ TemplateArgumentList::TemplateArgumentList(ASTContext &Context,
Builder.ReleaseArgs();
}
+TemplateArgumentList::TemplateArgumentList(const TemplateArgumentList &Other)
+ : FlatArguments(Other.FlatArguments.getPointer(), 1),
+ NumFlatArguments(Other.flat_size()),
+ StructuredArguments(Other.StructuredArguments.getPointer(), 1),
+ NumStructuredArguments(Other.NumStructuredArguments) { }
+
TemplateArgumentList::~TemplateArgumentList() {
// FIXME: Deallocate template arguments
}