aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaCodeComplete.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-01-25 01:16:17 -0800
committerGitHub <noreply@github.com>2025-01-25 01:16:17 -0800
commit62bd217b5a1cf6b231b2413b5522533986d4e5df (patch)
tree8fa078707eaeb0db393b7732e22e8c11c869149a /clang/lib/Sema/SemaCodeComplete.cpp
parent186d6546d9c5898a0a32f4616558021d9a908786 (diff)
downloadllvm-62bd217b5a1cf6b231b2413b5522533986d4e5df.zip
llvm-62bd217b5a1cf6b231b2413b5522533986d4e5df.tar.gz
llvm-62bd217b5a1cf6b231b2413b5522533986d4e5df.tar.bz2
[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.
Diffstat (limited to 'clang/lib/Sema/SemaCodeComplete.cpp')
-rw-r--r--clang/lib/Sema/SemaCodeComplete.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaCodeComplete.cpp b/clang/lib/Sema/SemaCodeComplete.cpp
index 58f3efb..bc0f6a9 100644
--- a/clang/lib/Sema/SemaCodeComplete.cpp
+++ b/clang/lib/Sema/SemaCodeComplete.cpp
@@ -678,7 +678,7 @@ public:
}*/
reference operator*() const {
- if (const NamedDecl *ND = DeclOrIterator.dyn_cast<const NamedDecl *>())
+ if (const NamedDecl *ND = dyn_cast<const NamedDecl *>(DeclOrIterator))
return reference(ND, SingleDeclIndex);
return *cast<const DeclIndexPair *>(DeclOrIterator);