diff options
author | Matheus Izvekov <mizvekov@gmail.com> | 2025-08-27 06:20:14 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-27 06:20:14 -0300 |
commit | 88438ba1f37fa4e0c2db203cd5556e52c9c34c08 (patch) | |
tree | 7fb96d5778f8b5f6c6bc258182c1f743a2f0d5da /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | f6d2fcc7a64250d3a6fe2365f0b2d600f0ece887 (diff) | |
download | llvm-88438ba1f37fa4e0c2db203cd5556e52c9c34c08.zip llvm-88438ba1f37fa4e0c2db203cd5556e52c9c34c08.tar.gz llvm-88438ba1f37fa4e0c2db203cd5556e52c9c34c08.tar.bz2 |
[clang] AST: fix getAs canonicalization of leaf types (#155028)
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 7064421..323823c 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -4195,7 +4195,8 @@ void CodeGenModule::EmitGlobal(GlobalDecl GD) { // Check if T is a class type with a destructor that's not dllimport. static bool HasNonDllImportDtor(QualType T) { - if (const auto *RT = T->getBaseElementTypeUnsafe()->getAs<RecordType>()) + if (const auto *RT = + T->getBaseElementTypeUnsafe()->getAsCanonical<RecordType>()) if (auto *RD = dyn_cast<CXXRecordDecl>(RT->getOriginalDecl())) { RD = RD->getDefinitionOrSelf(); if (RD->getDestructor() && !RD->getDestructor()->hasAttr<DLLImportAttr>()) |