diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-09-05 09:38:30 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-09-05 09:38:58 +0200 |
commit | 4f2bc21685b1eb30d3a7808ab021fd178652e411 (patch) | |
tree | 4a882a90944ef9e906ceae214ef63121dfb1e2dd | |
parent | 37fb2896144a1858e68c668ff39ae5d7b9d91653 (diff) |
When traversing a TemplateDecl, ts can be a dependent type
Change-Id: I05b02ef807a12a802720f58cd5a2d6d370b42418
-rw-r--r-- | compilerplugins/clang/dyncastvisibility.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
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<RecordType>(); - assert(rts != nullptr); + if (rts == nullptr) { // in case it's a dependent type + return true; + } auto const rds = cast<CXXRecordDecl>(rts->getDecl())->getDefinition(); assert(rds != nullptr); Bases bs; |