aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/SourceLocation.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2007-12-12 18:20:34 +0000
committerTed Kremenek <kremenek@apple.com>2007-12-12 18:20:34 +0000
commitb71d5f8111d750ba4b3c70aee45bf04a081c6329 (patch)
tree47fb523662f1393a45dbeaa9015a8e2ff5a014a4 /include/clang/Basic/SourceLocation.h
parent0e391052d74eaff4de2ac15a7194673d39444b5b (diff)
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
Diffstat (limited to 'include/clang/Basic/SourceLocation.h')
-rw-r--r--include/clang/Basic/SourceLocation.h4
1 files changed, 4 insertions, 0 deletions
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; }