From: Ted Kremenek Date: Wed, 12 Dec 2007 18:20:34 +0000 (+0000) Subject: Added utility static method to FullContextSourceLocation X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b71d5f8111d750ba4b3c70aee45bf04a081c6329;p=clang Added utility static method to FullContextSourceLocation for creating "invalid" location objects. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44946 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h index 67fb4ac6b7..f5b1d0452d 100644 --- a/include/clang/Basic/SourceLocation.h +++ b/include/clang/Basic/SourceLocation.h @@ -214,6 +214,10 @@ public: 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; }