aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r--lib/Sema/SemaDecl.cpp9
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);