aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
diff options
context:
space:
mode:
authorykhatav <yashasvi.khatavkar@intel.com>2025-08-21 16:58:25 -0400
committerGitHub <noreply@github.com>2025-08-21 16:58:25 -0400
commit38f0b9e6d965b46a2c747a0010809fc6ba103045 (patch)
tree2bde1431cfb22a82b26cc40832bb257c8fdbc9f4 /llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp
parent9b24ccca73b5cb9552d29d70dc5cce0daecb7b00 (diff)
downloadllvm-38f0b9e6d965b46a2c747a0010809fc6ba103045.zip
llvm-38f0b9e6d965b46a2c747a0010809fc6ba103045.tar.gz
llvm-38f0b9e6d965b46a2c747a0010809fc6ba103045.tar.bz2
Fix scope of typedefs present inside a template class (#146729)
When a typedef is declared within a templated class, clang incorrectly assigns the typedef to the compilation unit (CU) scope rather than the intended scope of the templated class. This issue arises because, during the creation of the typedef, the context lookup in the RegionMap fails to locate the templated class, despite its prior creation. The problem stems from the way the context is stored in the RegionMap. When handling templated types, the current implementation stores the class specialization rather than the templated declaration itself. This leads to a mismatch when attempting to retrieve the context for the typedef. To address this issue, the solution involves modifying the CreatedLimitedType() function. Specifically, when a struct or class is a templated type, we should store the actual templated declaration in the RegionMap instead of the class specialization. This ensures that subsequent lookups for context, such as those needed for typedef declarations, correctly identify the templated class scope. Fixes https://github.com/llvm/llvm-project/issues/91451
Diffstat (limited to 'llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions