From 8cb7bdfd33ebbf2f1dea9bb8f73cef89f1c489e9 Mon Sep 17 00:00:00 2001 From: John McCall Date: Fri, 4 Jun 2010 23:28:52 +0000 Subject: Alter the interface of GetTypeForDeclarator to return a TypeSourceInfo*. This is never null, but the associated type might be. llvm-svn: 105503 --- clang/lib/Sema/SemaTemplate.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'clang/lib/Sema/SemaTemplate.cpp') 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; -- cgit v1.2.3