summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-10-12 22:25:59 +0000
committerJohn McCall <rjmccall@apple.com>2009-10-12 22:25:59 +0000
commite724ae92a8372d110516fa63f6cf836ee6cc92a7 (patch)
treee0431c7a7d916ec72909bba155ad9692b500d449
parentf815861591d7a6273aaaaa90f28d0c6b92452af6 (diff)
downloadbcm5719-llvm-e724ae92a8372d110516fa63f6cf836ee6cc92a7.tar.gz
bcm5719-llvm-e724ae92a8372d110516fa63f6cf836ee6cc92a7.zip
More appropriate API usage.
llvm-svn: 83910
-rw-r--r--clang/lib/Sema/SemaExpr.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp
index 7c1c62c0a0d..b7c2308541d 100644
--- a/clang/lib/Sema/SemaExpr.cpp
+++ b/clang/lib/Sema/SemaExpr.cpp
@@ -6290,10 +6290,8 @@ void Sema::DiagnoseAssignmentAsCondition(Expr *E) {
return;
}
- // We want to insert before the start of the expression...
SourceLocation Open = E->getSourceRange().getBegin();
- // ...and one character after the end.
- SourceLocation Close = E->getSourceRange().getEnd().getFileLocWithOffset(1);
+ SourceLocation Close = PP.getLocForEndOfToken(E->getSourceRange().getEnd());
Diag(Loc, diag::warn_condition_is_assignment)
<< E->getSourceRange()
OpenPOWER on IntegriCloud