summaryrefslogtreecommitdiff
path: root/compilerplugins/clang
diff options
context:
space:
mode:
Diffstat (limited to 'compilerplugins/clang')
-rw-r--r--compilerplugins/clang/dyncastvisibility.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/compilerplugins/clang/dyncastvisibility.cxx b/compilerplugins/clang/dyncastvisibility.cxx
index 7259374c98ea..7d6b19aa6e24 100644
--- a/compilerplugins/clang/dyncastvisibility.cxx
+++ b/compilerplugins/clang/dyncastvisibility.cxx
@@ -107,7 +107,9 @@ public:
return true;
}
auto const rdd = cast<CXXRecordDecl>(rtd->getDecl())->getDefinition();
- assert(rdd != nullptr);
+ if (rdd == nullptr) {
+ return true;
+ }
if (getTypeVisibility(rdd) != DefaultVisibility) {
// Heuristic to find problematic dynamic_cast<T> with hidden type T is: T is defined in
// include/M1/ while the compilation unit is in module M2/ with M1 != M2. There are