diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-08-19 01:28:28 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-08-19 01:28:28 +0000 |
commit | e8661906d49ef6c9694a9cc845ca62a85dbc016d (patch) | |
tree | 4e57e7e6580846b549c332461ea44ad5c3f322e6 /lib/Sema/SemaDecl.cpp | |
parent | 1bb8a45f7386a23871598d05141a07af03067925 (diff) |
Use Sema's LocInfoType to pass and preserve type source info through the Parser.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@79395 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 1f2689cf92..c2e8477c19 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1564,20 +1564,20 @@ DeclarationName Sema::GetNameForDeclarator(Declarator &D) { return DeclarationName(D.getIdentifier()); case Declarator::DK_Constructor: { - QualType Ty = QualType::getFromOpaquePtr(D.getDeclaratorIdType()); + QualType Ty = GetTypeFromParser(D.getDeclaratorIdType()); return Context.DeclarationNames.getCXXConstructorName( Context.getCanonicalType(Ty)); } case Declarator::DK_Destructor: { - QualType Ty = QualType::getFromOpaquePtr(D.getDeclaratorIdType()); + QualType Ty = GetTypeFromParser(D.getDeclaratorIdType()); return Context.DeclarationNames.getCXXDestructorName( Context.getCanonicalType(Ty)); } case Declarator::DK_Conversion: { // FIXME: We'd like to keep the non-canonical type for diagnostics! - QualType Ty = QualType::getFromOpaquePtr(D.getDeclaratorIdType()); + QualType Ty = GetTypeFromParser(D.getDeclaratorIdType()); return Context.DeclarationNames.getCXXConversionFunctionName( Context.getCanonicalType(Ty)); } @@ -1651,7 +1651,8 @@ Sema::HandleDeclarator(Scope *S, Declarator &D, DS.getTypeSpecType() == DeclSpec::TST_typeofExpr || DS.getTypeSpecType() == DeclSpec::TST_decltype)) { if (DeclContext *DC = computeDeclContext(D.getCXXScopeSpec(), true)) { - QualType T = QualType::getFromOpaquePtr(DS.getTypeRep()); + // FIXME: Preserve type source info. + QualType T = GetTypeFromParser(DS.getTypeRep()); EnterDeclaratorContext(S, DC); T = RebuildTypeInCurrentInstantiation(T, D.getIdentifierLoc(), Name); ExitDeclaratorContext(S); |