[all-commits] [llvm/llvm-project] 86d65a: [analyzer] Improve FieldRegion descriptive name (#...
T-Gruber via All-commits
all-commits at lists.llvm.org
Fri Oct 25 02:59:38 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 86d65ae7949e0322f10e1856c5c33caa34ebfe2f
https://github.com/llvm/llvm-project/commit/86d65ae7949e0322f10e1856c5c33caa34ebfe2f
Author: T-Gruber <100079402+T-Gruber at users.noreply.github.com>
Date: 2024-10-25 (Fri, 25 Oct 2024)
Changed paths:
M clang/lib/StaticAnalyzer/Core/MemRegion.cpp
M clang/unittests/StaticAnalyzer/MemRegionDescriptiveNameTest.cpp
Log Message:
-----------
[analyzer] Improve FieldRegion descriptive name (#112313)
The current implementation of MemRegion::getDescriptiveName fails for
FieldRegions whose SuperRegion is an ElementRegion. As outlined below:
```Cpp
struct val_struct { int val; };
extern struct val_struct val_struct_array[3];
void func(){
// FieldRegion with ElementRegion as SuperRegion.
val_struct_array[0].val;
}
```
For this special case, the expression cannot be pretty printed and must
therefore be obtained separately.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list