aboutsummaryrefslogtreecommitdiff
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
commit2d15215844eaf6391ad566c44dcf420c18c6b773 (patch)
treefc242a3e2c864b18d1f4c51fd481c1fbcd041af0
parent5a881bb09928b7ade891efc680088aaad276f8d6 (diff)
More appropriate API usage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83910 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Sema/SemaExpr.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 7c1c62c0a0..b7c2308541 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/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()