[cfe-commits] r44946 - /cfe/trunk/include/clang/Basic/SourceLocation.h

Ted Kremenek kremenek at apple.com
Wed Dec 12 10:20:36 PST 2007


Author: kremenek
Date: Wed Dec 12 12:20:34 2007
New Revision: 44946

URL: http://llvm.org/viewvc/llvm-project?rev=44946&view=rev
Log:
Added utility static method to FullContextSourceLocation
for creating "invalid" location objects.

Modified:
    cfe/trunk/include/clang/Basic/SourceLocation.h

Modified: cfe/trunk/include/clang/Basic/SourceLocation.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceLocation.h?rev=44946&r1=44945&r2=44946&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/SourceLocation.h (original)
+++ cfe/trunk/include/clang/Basic/SourceLocation.h Wed Dec 12 12:20:34 2007
@@ -214,6 +214,10 @@
   explicit FullContextSourceLocation(SourceLocation loc, SourceManager& smgr) 
     : Loc(loc), SrcMgr(&smgr) {}
   
+  static FullContextSourceLocation CreateInvalidLocation() {
+    return FullContextSourceLocation(SourceLocation());
+  }
+  
   bool isValid() const { return Loc.isValid(); }
   
   SourceLocation getSourceLocation() const { return Loc; }





More information about the cfe-commits mailing list