diff options
author | Craig Topper <craig.topper@gmail.com> | 2015-11-15 02:31:46 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2015-11-15 02:31:46 +0000 |
commit | ee5949e86be1721f1ba3fe37516055c179d21b9c (patch) | |
tree | e2f7fc8f387c29357695bb28795aeeecc91c2100 /lib/Sema/SemaExprObjC.cpp | |
parent | 8ec83f5819bee7c0f459e82ff9e1c21a5087edfd (diff) | |
download | clang-ee5949e86be1721f1ba3fe37516055c179d21b9c.tar.gz |
Use Sema::getLocForEndOfToken instead of Preprocessor::getLocForEndOfToken. NFC
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@253155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExprObjC.cpp')
-rw-r--r-- | lib/Sema/SemaExprObjC.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Sema/SemaExprObjC.cpp b/lib/Sema/SemaExprObjC.cpp index 3257741429..a179957e98 100644 --- a/lib/Sema/SemaExprObjC.cpp +++ b/lib/Sema/SemaExprObjC.cpp @@ -1092,7 +1092,7 @@ ExprResult Sema::ParseObjCEncodeExpression(SourceLocation AtLoc, QualType EncodedType = GetTypeFromParser(ty, &TInfo); if (!TInfo) TInfo = Context.getTrivialTypeSourceInfo(EncodedType, - PP.getLocForEndOfToken(LParenLoc)); + getLocForEndOfToken(LParenLoc)); return BuildObjCEncodeExpression(AtLoc, TInfo, RParenLoc); } @@ -3397,7 +3397,7 @@ static void addFixitForObjCARCConversion(Sema &S, DiagB.AddFixItHint(FixItHint::CreateInsertion(range.getBegin(), BridgeCall)); DiagB.AddFixItHint(FixItHint::CreateInsertion( - S.PP.getLocForEndOfToken(range.getEnd()), + S.getLocForEndOfToken(range.getEnd()), ")")); } return; @@ -3430,7 +3430,7 @@ static void addFixitForObjCARCConversion(Sema &S, DiagB.AddFixItHint(FixItHint::CreateInsertion(range.getBegin(), castCode)); DiagB.AddFixItHint(FixItHint::CreateInsertion( - S.PP.getLocForEndOfToken(range.getEnd()), + S.getLocForEndOfToken(range.getEnd()), ")")); } } @@ -3498,7 +3498,7 @@ diagnoseObjCARCConversion(Sema &S, SourceRange castRange, } // Check whether this could be fixed with a bridge cast. - SourceLocation afterLParen = S.PP.getLocForEndOfToken(castRange.getBegin()); + SourceLocation afterLParen = S.getLocForEndOfToken(castRange.getBegin()); SourceLocation noteLoc = afterLParen.isValid() ? afterLParen : loc; // Bridge from an ARC type to a CF type. @@ -3901,7 +3901,7 @@ Sema::CheckObjCBridgeRelatedConversions(SourceLocation Loc, ExpressionString += RelatedClass->getNameAsString(); ExpressionString += " "; ExpressionString += ClassMethod->getSelector().getAsString(); - SourceLocation SrcExprEndLoc = PP.getLocForEndOfToken(SrcExpr->getLocEnd()); + SourceLocation SrcExprEndLoc = getLocForEndOfToken(SrcExpr->getLocEnd()); // Provide a fixit: [RelatedClass ClassMethod SrcExpr] Diag(Loc, diag::err_objc_bridged_related_known_method) << SrcType << DestType << ClassMethod->getSelector() << false @@ -3926,7 +3926,7 @@ Sema::CheckObjCBridgeRelatedConversions(SourceLocation Loc, // Implicit conversion from ObjC type to CF object is needed. if (InstanceMethod) { std::string ExpressionString; - SourceLocation SrcExprEndLoc = PP.getLocForEndOfToken(SrcExpr->getLocEnd()); + SourceLocation SrcExprEndLoc = getLocForEndOfToken(SrcExpr->getLocEnd()); if (InstanceMethod->isPropertyAccessor()) if (const ObjCPropertyDecl *PDecl = InstanceMethod->findPropertyDecl()) { // fixit: ObjectExpr.propertyname when it is aproperty accessor. |