[clang] [clang] Migrate away from PointerUnion::{is, get} (NFC) (PR #119724)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 12 14:10:11 PST 2024


================
@@ -486,10 +486,10 @@ enum class TemplateSubstitutionKind : char {
         const Decl *D = I->first;
         llvm::PointerUnion<Decl *, DeclArgumentPack *> &Stored =
           newScope->LocalDecls[D];
-        if (I->second.is<Decl *>()) {
-          Stored = I->second.get<Decl *>();
+        if (isa<Decl *>(I->second)) {
+          Stored = cast<Decl *>(I->second);
----------------
kazutakahirata wrote:

Thank you for pointing this out!  Fixed in the latest iteration.

https://github.com/llvm/llvm-project/pull/119724


More information about the cfe-commits mailing list