diff options
Diffstat (limited to 'clang/lib/Sema')
-rw-r--r-- | clang/lib/Sema/SemaCoroutine.cpp | 5 | ||||
-rw-r--r-- | clang/lib/Sema/SemaDeclAttr.cpp | 5 | ||||
-rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Sema/SemaExprCXX.cpp | 4 | ||||
-rw-r--r-- | clang/lib/Sema/SemaOverload.cpp | 8 | ||||
-rw-r--r-- | clang/lib/Sema/SemaTemplate.cpp | 2 |
6 files changed, 12 insertions, 14 deletions
diff --git a/clang/lib/Sema/SemaCoroutine.cpp b/clang/lib/Sema/SemaCoroutine.cpp index a84116c1bcc..181efa6d3dd 100644 --- a/clang/lib/Sema/SemaCoroutine.cpp +++ b/clang/lib/Sema/SemaCoroutine.cpp @@ -84,8 +84,7 @@ static QualType lookupPromiseType(Sema &S, const FunctionDecl *FD, // ref-qualifier or with the & ref-qualifier // -- "rvalue reference to cv X" for functions declared with the && // ref-qualifier - QualType T = - MD->getThisType(S.Context)->getAs<PointerType>()->getPointeeType(); + QualType T = MD->getThisType()->getAs<PointerType>()->getPointeeType(); T = FnType->getRefQualifier() == RQ_RValue ? S.Context.getRValueReferenceType(T) : S.Context.getLValueReferenceType(T, /*SpelledAsLValue*/ true); @@ -506,7 +505,7 @@ VarDecl *Sema::buildCoroutinePromise(SourceLocation Loc) { auto *FD = cast<FunctionDecl>(CurContext); bool IsThisDependentType = [&] { if (auto *MD = dyn_cast_or_null<CXXMethodDecl>(FD)) - return MD->isInstance() && MD->getThisType(Context)->isDependentType(); + return MD->isInstance() && MD->getThisType()->isDependentType(); else return false; }(); diff --git a/clang/lib/Sema/SemaDeclAttr.cpp b/clang/lib/Sema/SemaDeclAttr.cpp index b5859d1fb7b..241eea4927c 100644 --- a/clang/lib/Sema/SemaDeclAttr.cpp +++ b/clang/lib/Sema/SemaDeclAttr.cpp @@ -1151,8 +1151,7 @@ static void handleConsumableAttr(Sema &S, Decl *D, const ParsedAttr &AL) { static bool checkForConsumableClass(Sema &S, const CXXMethodDecl *MD, const ParsedAttr &AL) { - ASTContext &CurrContext = S.getASTContext(); - QualType ThisType = MD->getThisType(CurrContext)->getPointeeType(); + QualType ThisType = MD->getThisType()->getPointeeType(); if (const CXXRecordDecl *RD = ThisType->getAsCXXRecordDecl()) { if (!RD->hasAttr<ConsumableAttr>()) { @@ -1265,7 +1264,7 @@ static void handleReturnTypestateAttr(Sema &S, Decl *D, const ParsedAttr &AL) { // //} else if (const CXXConstructorDecl *Constructor = // dyn_cast<CXXConstructorDecl>(D)) { - // ReturnType = Constructor->getThisType(S.getASTContext())->getPointeeType(); + // ReturnType = Constructor->getThisType()->getPointeeType(); // //} else { // diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index f65e97ed0b7..31d7407b0ab 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -2585,7 +2585,7 @@ Sema::PerformObjectMemberConversion(Expr *From, if (Method->isStatic()) return From; - DestType = Method->getThisType(Context); + DestType = Method->getThisType(); DestRecordType = DestType->getPointeeType(); if (FromType->getAs<PointerType>()) { diff --git a/clang/lib/Sema/SemaExprCXX.cpp b/clang/lib/Sema/SemaExprCXX.cpp index 04f77a8e393..56af640aa45 100644 --- a/clang/lib/Sema/SemaExprCXX.cpp +++ b/clang/lib/Sema/SemaExprCXX.cpp @@ -1064,7 +1064,7 @@ QualType Sema::getCurrentThisType() { if (CXXMethodDecl *method = dyn_cast<CXXMethodDecl>(DC)) { if (method && method->isInstance()) - ThisTy = method->getThisType(Context); + ThisTy = method->getThisType(); } if (ThisTy.isNull() && isLambdaCallOperator(CurContext) && @@ -3588,7 +3588,7 @@ void Sema::CheckVirtualDtorCall(CXXDestructorDecl *dtor, SourceLocation Loc, if (getSourceManager().isInSystemHeader(PointeeRD->getLocation())) return; - QualType ClassType = dtor->getThisType(Context)->getPointeeType(); + QualType ClassType = dtor->getThisType()->getPointeeType(); if (PointeeRD->isAbstract()) { // If the class is abstract, we warn by default, because we're // sure the code has undefined behavior. diff --git a/clang/lib/Sema/SemaOverload.cpp b/clang/lib/Sema/SemaOverload.cpp index 172116e30c0..d54e9050614 100644 --- a/clang/lib/Sema/SemaOverload.cpp +++ b/clang/lib/Sema/SemaOverload.cpp @@ -3277,7 +3277,7 @@ IsInitializerListConstructorConversion(Sema &S, Expr *From, QualType ToType, case OR_Success: { // Record the standard conversion we used and the conversion function. CXXConstructorDecl *Constructor = cast<CXXConstructorDecl>(Best->Function); - QualType ThisType = Constructor->getThisType(S.Context); + QualType ThisType = Constructor->getThisType(); // Initializer lists don't have conversions as such. User.Before.setAsIdentityConversion(); User.HadMultipleCandidates = HadMultipleCandidates; @@ -3458,7 +3458,7 @@ IsUserDefinedConversion(Sema &S, Expr *From, QualType ToType, // sequence converts the source type to the type required by // the argument of the constructor. // - QualType ThisType = Constructor->getThisType(S.Context); + QualType ThisType = Constructor->getThisType(); if (isa<InitListExpr>(From)) { // Initializer lists don't have conversions as such. User.Before.setAsIdentityConversion(); @@ -5212,12 +5212,12 @@ Sema::PerformObjectArgumentInitialization(Expr *From, CXXMethodDecl *Method) { QualType FromRecordType, DestType; QualType ImplicitParamRecordType = - Method->getThisType(Context)->getAs<PointerType>()->getPointeeType(); + Method->getThisType()->getAs<PointerType>()->getPointeeType(); Expr::Classification FromClassification; if (const PointerType *PT = From->getType()->getAs<PointerType>()) { FromRecordType = PT->getPointeeType(); - DestType = Method->getThisType(Context); + DestType = Method->getThisType(); FromClassification = Expr::Classification::makeSimpleLValue(); } else { FromRecordType = From->getType(); diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp index 35935f994ca..3f9dc989103 100644 --- a/clang/lib/Sema/SemaTemplate.cpp +++ b/clang/lib/Sema/SemaTemplate.cpp @@ -627,7 +627,7 @@ Sema::ActOnDependentIdExpression(const CXXScopeSpec &SS, if (!MightBeCxx11UnevalField && !isAddressOfOperand && !IsEnum && isa<CXXMethodDecl>(DC) && cast<CXXMethodDecl>(DC)->isInstance()) { - QualType ThisType = cast<CXXMethodDecl>(DC)->getThisType(Context); + QualType ThisType = cast<CXXMethodDecl>(DC)->getThisType(); // Since the 'this' expression is synthesized, we don't need to // perform the double-lookup check. |