summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST
diff options
context:
space:
mode:
authorAlexey Bader <alexey.bader@intel.com>2019-12-28 16:13:33 +0300
committerAlexey Bader <alexey.bader@intel.com>2019-12-28 16:35:51 +0300
commit128f39da932be50cb49646084820119e6e0d1e22 (patch)
tree4ef8d1979c804ccef5190462b28b23d2833bd0c3 /clang/lib/AST
parent8612e92ed590e615f9f56e4fb86a1fdaf3a39e15 (diff)
downloadbcm5719-llvm-128f39da932be50cb49646084820119e6e0d1e22.tar.gz
bcm5719-llvm-128f39da932be50cb49646084820119e6e0d1e22.zip
Fix crash in getFullyQualifiedName for inline namespace
Summary: The ICE happens when the most outer namespace is an inline namespace. Reviewers: bkramer, ilya-biryukov Reviewed By: ilya-biryukov Subscribers: ebevhan, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D71962
Diffstat (limited to 'clang/lib/AST')
-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 f28f00171cc..73a33a20823 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
OpenPOWER on IntegriCloud