summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-06-04 23:28:52 +0000
committerJohn McCall <rjmccall@apple.com>2010-06-04 23:28:52 +0000
commit8cb7bdfd33ebbf2f1dea9bb8f73cef89f1c489e9 (patch)
tree9d1b64d766137ee425f0f360e7cb04eb509e2085 /clang/lib/Sema/SemaTemplate.cpp
parenta03e6f85fefb461a05343f2af413f9453df78e0c (diff)
downloadbcm5719-llvm-8cb7bdfd33ebbf2f1dea9bb8f73cef89f1c489e9.tar.gz
bcm5719-llvm-8cb7bdfd33ebbf2f1dea9bb8f73cef89f1c489e9.zip
Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*.
This is never null, but the associated type might be. llvm-svn: 105503
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index b02fc05892a..08f261642be 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/lib/Sema/SemaTemplate.cpp
@@ -586,8 +586,8 @@ Sema::CheckNonTypeTemplateParameterType(QualType T, SourceLocation Loc) {
Sema::DeclPtrTy Sema::ActOnNonTypeTemplateParameter(Scope *S, Declarator &D,
unsigned Depth,
unsigned Position) {
- TypeSourceInfo *TInfo = 0;
- QualType T = GetTypeForDeclarator(D, S, &TInfo);
+ TypeSourceInfo *TInfo = GetTypeForDeclarator(D, S);
+ QualType T = TInfo->getType();
assert(S->isTemplateParamScope() &&
"Non-type template parameter not in template parameter scope!");
@@ -4970,7 +4970,8 @@ Sema::DeclResult Sema::ActOnExplicitInstantiation(Scope *S,
S = S->getParent();
// Determine the type of the declaration.
- QualType R = GetTypeForDeclarator(D, S, 0);
+ TypeSourceInfo *T = GetTypeForDeclarator(D, S);
+ QualType R = T->getType();
if (R.isNull())
return true;
OpenPOWER on IntegriCloud