Skip to content

Commit 62bd217

Browse files
[Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#124391)
Note that PointerUnion::dyn_cast has been soft deprecated in PointerUnion.h: // FIXME: Replace the uses of is(), get() and dyn_cast() with // isa<T>, cast<T> and the llvm::dyn_cast<T> Literal migration would result in dyn_cast_if_present (see the definition of PointerUnion::dyn_cast), but this patch uses dyn_cast because we expect DeclOrIterator to be nonnull.
1 parent 186d654 commit 62bd217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Sema/SemaCodeComplete.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ class ResultBuilder::ShadowMapEntry::iterator {
678678
}*/
679679

680680
reference operator*() const {
681-
if (const NamedDecl *ND = DeclOrIterator.dyn_cast<const NamedDecl *>())
681+
if (const NamedDecl *ND = dyn_cast<const NamedDecl *>(DeclOrIterator))
682682
return reference(ND, SingleDeclIndex);
683683

684684
return *cast<const DeclIndexPair *>(DeclOrIterator);

0 commit comments

Comments
 (0)