aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/QualTypeNames.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/AST/QualTypeNames.cpp')
-rw-r--r--clang/lib/AST/QualTypeNames.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/AST/QualTypeNames.cpp b/clang/lib/AST/QualTypeNames.cpp
index f28f00171cce..73a33a208233 100644
--- a/clang/lib/AST/QualTypeNames.cpp
+++ b/clang/lib/AST/QualTypeNames.cpp
@@ -192,7 +192,7 @@ static NestedNameSpecifier *createOuterNNS(const ASTContext &Ctx, const Decl *D,
// Ignore inline namespace;
NS = dyn_cast<NamespaceDecl>(NS->getDeclContext());
}
- if (NS->getDeclName()) {
+ if (NS && NS->getDeclName()) {
return createNestedNameSpecifier(Ctx, NS, WithGlobalNsPrefix);
}
return nullptr; // no starting '::', no anonymous