[clang] [AST] Migrate away from PointerUnion::get (NFC) (PR #119949)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 13 22:27:04 PST 2024
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/119949
Note that PointerUnion::get 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>
>From 07399e5edcbd8ac3a7d75d328edf6f1417fed39f Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Fri, 13 Dec 2024 08:07:45 -0800
Subject: [PATCH] [AST] Migrate away from PointerUnion::get (NFC)
Note that PointerUnion::get 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>
---
clang/unittests/AST/ASTImporterTest.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp
index abf07d094e62c3..f3f314b723dfc6 100644
--- a/clang/unittests/AST/ASTImporterTest.cpp
+++ b/clang/unittests/AST/ASTImporterTest.cpp
@@ -9657,7 +9657,7 @@ TEST_P(ASTImporterOptionSpecificTestBase, ImportConflictTypeAliasTemplate) {
AST_MATCHER(ClassTemplateSpecializationDecl, hasInstantiatedFromMember) {
if (auto Instantiate = Node.getInstantiatedFrom()) {
if (auto *FromPartialSpecialization =
- Instantiate.get<ClassTemplatePartialSpecializationDecl *>()) {
+ cast<ClassTemplatePartialSpecializationDecl *>(Instantiate)) {
return nullptr != FromPartialSpecialization->getInstantiatedFromMember();
}
}
More information about the cfe-commits
mailing list