[cfe-commits] r51645 - /cfe/trunk/lib/Rewrite/Rewriter.cpp

Chris Lattner sabre at nondot.org
Wed May 28 09:35:02 PDT 2008


Author: lattner
Date: Wed May 28 11:35:02 2008
New Revision: 51645

URL: http://llvm.org/viewvc/llvm-project?rev=51645&view=rev
Log:
add an assertion

Modified:
    cfe/trunk/lib/Rewrite/Rewriter.cpp

Modified: cfe/trunk/lib/Rewrite/Rewriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Rewrite/Rewriter.cpp?rev=51645&r1=51644&r2=51645&view=diff

==============================================================================
--- cfe/trunk/lib/Rewrite/Rewriter.cpp (original)
+++ cfe/trunk/lib/Rewrite/Rewriter.cpp Wed May 28 11:35:02 2008
@@ -100,6 +100,7 @@
 
 unsigned Rewriter::getLocationOffsetAndFileID(SourceLocation Loc,
                                               unsigned &FileID) const {
+  assert(Loc.isValid() && "Invalid location");
   std::pair<unsigned,unsigned> V = SourceMgr->getDecomposedFileLoc(Loc);
   FileID = V.first;
   return V.second;





More information about the cfe-commits mailing list