[PATCH] D33833: Fix PR 33189: Clang assertion on template destructor declaration
Hubert Tong via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 2 16:24:17 PDT 2017
hubert.reinterpretcast added inline comments.
================
Comment at: lib/AST/DeclCXX.cpp:1420
DeclContext::lookup_result R = lookup(Name);
- if (R.empty())
+ if (R.empty() || !isa<CXXDestructorDecl>(R.front()))
return nullptr;
----------------
As it is,
```
return R.empty() ? nullptr : dyn_cast<CXXDestructorDecl>(R.front());
```
would probably be much more succinct.
https://reviews.llvm.org/D33833
More information about the cfe-commits
mailing list