aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-31 17:01:39 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-31 17:01:39 +0000
commitfe72e9ceeae6cc8669cd8bb722425300190638ea (patch)
treea0807deac8023b9fa4a307a32186344289034890 /lib/Sema/SemaTemplate.cpp
parentf13721dd91dda7675e499331a2770308ad20ca61 (diff)
Implement basic support for indexing function templates in
libclang. This includes: - Cursor kind for function templates, with visitation logic - Cursor kinds for template parameters, with visitation logic - Visitation logic for template specialization types, qualified type locations - USR generation for function templates, template specialization types, template parameter types. Also happens to fix PR7804, which I tripped across while testing. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112604 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index e06d38d179..3c6ecaa53e 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -662,7 +662,8 @@ Decl *Sema::ActOnTemplateTemplateParameter(Scope* S,
// Construct the parameter object.
TemplateTemplateParmDecl *Param =
TemplateTemplateParmDecl::Create(Context, Context.getTranslationUnitDecl(),
- TmpLoc, Depth, Position, Name,
+ NameLoc.isInvalid()? TmpLoc : NameLoc,
+ Depth, Position, Name,
(TemplateParameterList*)Params);
// If the template template parameter has a name, then link the identifier