Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libcxxabi')
-rw-r--r--libcxxabi/src/demangle/ItaniumDemangle.h2
-rw-r--r--libcxxabi/test/test_demangle.pass.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/libcxxabi/src/demangle/ItaniumDemangle.h b/libcxxabi/src/demangle/ItaniumDemangle.h
index be2cf882bfc2..a434868ce1a5 100644
--- a/libcxxabi/src/demangle/ItaniumDemangle.h
+++ b/libcxxabi/src/demangle/ItaniumDemangle.h
@@ -2885,7 +2885,7 @@ Node *AbstractManglingParser<Derived, Alloc>::parseUnqualifiedName(
Result = getDerived().parseOperatorName(State);
}
- if (Module)
+ if (Result != nullptr && Module != nullptr)
Result = make<ModuleEntity>(Module, Result);
if (Result != nullptr)
Result = getDerived().parseAbiTags(Result);
diff --git a/libcxxabi/test/test_demangle.pass.cpp b/libcxxabi/test/test_demangle.pass.cpp
index a0d9bad298b1..916fda6a929d 100644
--- a/libcxxabi/test/test_demangle.pass.cpp
+++ b/libcxxabi/test/test_demangle.pass.cpp
@@ -30172,6 +30172,7 @@ const char* invalid_cases[] =
"_ZWDC3FOOEv",
"_ZGI3Foo",
"_ZGIW3Foov",
+ "W1x",
};
const unsigned NI = sizeof(invalid_cases) / sizeof(invalid_cases[0]);