From b71d5f8111d750ba4b3c70aee45bf04a081c6329 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Wed, 12 Dec 2007 18:20:34 +0000 Subject: [PATCH] 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 --- include/clang/Basic/SourceLocation.h | 4 ++++ 1 file changed, 4 insertions(+) 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; } -- 2.40.0