aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/SourceLocation.h
diff options
context:
space:
mode:
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; }