aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaTemplateInstantiate.cpp
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-01-17 08:46:52 -0800
committerGitHub <noreply@github.com>2025-01-17 08:46:52 -0800
commitf5736aee112177b8b4620ab55bb65152a652dd34 (patch)
treeafcda3744ee8fa726990961674476f355e185824 /clang/lib/Sema/SemaTemplateInstantiate.cpp
parent3f07af93dc013621176f5931ebc8dd07d299b277 (diff)
downloadllvm-f5736aee112177b8b4620ab55bb65152a652dd34.zip
llvm-f5736aee112177b8b4620ab55bb65152a652dd34.tar.gz
llvm-f5736aee112177b8b4620ab55bb65152a652dd34.tar.bz2
[Sema] Migrate away from PointerUnion::dyn_cast (NFC) (#123284)
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 Stored to be nonnull.
Diffstat (limited to 'clang/lib/Sema/SemaTemplateInstantiate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplateInstantiate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaTemplateInstantiate.cpp b/clang/lib/Sema/SemaTemplateInstantiate.cpp
index fb0f38d..839c4e8 100644
--- a/clang/lib/Sema/SemaTemplateInstantiate.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiate.cpp
@@ -4661,7 +4661,7 @@ void LocalInstantiationScope::InstantiatedLocal(const Decl *D, Decl *Inst) {
}
#endif
Stored = Inst;
- } else if (DeclArgumentPack *Pack = Stored.dyn_cast<DeclArgumentPack *>()) {
+ } else if (DeclArgumentPack *Pack = dyn_cast<DeclArgumentPack *>(Stored)) {
Pack->push_back(cast<VarDecl>(Inst));
} else {
assert(cast<Decl *>(Stored) == Inst && "Already instantiated this local");