diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-24 23:14:47 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-24 23:14:47 +0000 |
commit | 3a923c2d379966dff3d0a709e42360ae8e402053 (patch) | |
tree | adb6e64ae68d0be1fc6a532be78b5656dc8dd5c3 /clang/lib/AST/DeclTemplate.cpp | |
parent | d6f9a2f90bd5e485871c5281904a907c02968bfa (diff) | |
download | bcm5719-llvm-3a923c2d379966dff3d0a709e42360ae8e402053.tar.gz bcm5719-llvm-3a923c2d379966dff3d0a709e42360ae8e402053.zip |
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.
llvm-svn: 82728
Diffstat (limited to 'clang/lib/AST/DeclTemplate.cpp')
-rw-r--r-- | clang/lib/AST/DeclTemplate.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/AST/DeclTemplate.cpp b/clang/lib/AST/DeclTemplate.cpp index bd1aa7ca9e9..7836b3f827c 100644 --- a/clang/lib/AST/DeclTemplate.cpp +++ b/clang/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 } |