[cfe-commits] r83910 - /cfe/trunk/lib/Sema/SemaExpr.cpp

John McCall rjmccall at apple.com
Mon Oct 12 15:26:00 PDT 2009


Author: rjmccall
Date: Mon Oct 12 17:25:59 2009
New Revision: 83910

URL: http://llvm.org/viewvc/llvm-project?rev=83910&view=rev
Log:
More appropriate API usage.


Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=83910&r1=83909&r2=83910&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Mon Oct 12 17:25:59 2009
@@ -6290,10 +6290,8 @@
     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()





More information about the cfe-commits mailing list