Don't abuse reinterpret cast to do something the API of PointerUnion
provides proper support for. This was caught by -Wundefined-reinterpret-cast, and I think a reasonable case for it to warn on. Also use is<...> instead of dyn_cast<...> when the result isn't needed. This whole thing should probably switch to using UsuallyTinyPtrVector. llvm-svn: 130707
This commit is contained in:
parent
f91c5ab341
commit
38a328276c
|
@ -2410,8 +2410,8 @@ VisibleDeclsRecord::ShadowMapEntry::end() {
|
|||
if (DeclOrVector.isNull())
|
||||
return 0;
|
||||
|
||||
if (DeclOrVector.dyn_cast<NamedDecl *>())
|
||||
return &reinterpret_cast<NamedDecl*&>(DeclOrVector) + 1;
|
||||
if (DeclOrVector.is<NamedDecl *>())
|
||||
return DeclOrVector.getAddrOf<NamedDecl *>() + 1;
|
||||
|
||||
return DeclOrVector.get<DeclVector *>()->end();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue