diff --git a/compilerplugins/clang/dyncastvisibility.cxx b/compilerplugins/clang/dyncastvisibility.cxx index e212d7f2254d..31d20fba80d7 100644 --- a/compilerplugins/clang/dyncastvisibility.cxx +++ b/compilerplugins/clang/dyncastvisibility.cxx @@ -108,7 +108,9 @@ public: ts = t->getPointeeType(); } auto const rts = ts->getAs(); - assert(rts != nullptr); + if (rts == nullptr) { // in case it's a dependent type + return true; + } auto const rds = cast(rts->getDecl())->getDefinition(); assert(rds != nullptr); Bases bs;