Abstract out passing around types and kill off ActionBase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111901 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaCXXScopeSpec.cpp b/lib/Sema/SemaCXXScopeSpec.cpp
index 9794ec6..de09ba4 100644
--- a/lib/Sema/SemaCXXScopeSpec.cpp
+++ b/lib/Sema/SemaCXXScopeSpec.cpp
@@ -283,7 +283,7 @@
bool Sema::isNonTypeNestedNameSpecifier(Scope *S, CXXScopeSpec &SS,
SourceLocation IdLoc,
IdentifierInfo &II,
- TypeTy *ObjectTypePtr) {
+ ParsedType ObjectTypePtr) {
QualType ObjectType = GetTypeFromParser(ObjectTypePtr);
LookupResult Found(*this, &II, IdLoc, LookupNestedNameSpecifierName);
@@ -567,10 +567,10 @@
SourceLocation IdLoc,
SourceLocation CCLoc,
IdentifierInfo &II,
- TypeTy *ObjectTypePtr,
+ ParsedType ObjectTypePtr,
bool EnteringContext) {
return BuildCXXNestedNameSpecifier(S, SS, IdLoc, CCLoc, II,
- QualType::getFromOpaquePtr(ObjectTypePtr),
+ GetTypeFromParser(ObjectTypePtr),
/*ScopeLookupResult=*/0, EnteringContext,
false);
}
@@ -582,21 +582,20 @@
///
/// The arguments are the same as those passed to ActOnCXXNestedNameSpecifier.
bool Sema::IsInvalidUnlessNestedName(Scope *S, CXXScopeSpec &SS,
- IdentifierInfo &II, TypeTy *ObjectType,
+ IdentifierInfo &II, ParsedType ObjectType,
bool EnteringContext) {
return BuildCXXNestedNameSpecifier(S, SS, SourceLocation(), SourceLocation(),
- II, QualType::getFromOpaquePtr(ObjectType),
+ II, GetTypeFromParser(ObjectType),
/*ScopeLookupResult=*/0, EnteringContext,
true);
}
Sema::CXXScopeTy *Sema::ActOnCXXNestedNameSpecifier(Scope *S,
const CXXScopeSpec &SS,
- TypeTy *Ty,
+ ParsedType Ty,
SourceRange TypeRange,
SourceLocation CCLoc) {
- NestedNameSpecifier *Prefix
- = static_cast<NestedNameSpecifier *>(SS.getScopeRep());
+ NestedNameSpecifier *Prefix = SS.getScopeRep();
QualType T = GetTypeFromParser(Ty);
return NestedNameSpecifier::Create(Context, Prefix, /*FIXME:*/false,
T.getTypePtr());