diff options
Diffstat (limited to 'clang/lib/AST/ASTDumper.cpp')
-rw-r--r-- | clang/lib/AST/ASTDumper.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/AST/ASTDumper.cpp b/clang/lib/AST/ASTDumper.cpp index 39019792ee5..76699bd5688 100644 --- a/clang/lib/AST/ASTDumper.cpp +++ b/clang/lib/AST/ASTDumper.cpp @@ -444,6 +444,9 @@ void ASTDumper::dumpPointer(const void *Ptr) { } void ASTDumper::dumpLocation(SourceLocation Loc) { + if (!SM) + return; + ColorScope Color(*this, LocationColor); SourceLocation SpellingLoc = SM->getSpellingLoc(Loc); |