4 Commits

Author SHA1 Message Date
Timm Baeder
e96230607c
[clang] Fix printing null MemberPointer APValues (#149995)
The decl can be null and this used to crash.
2025-07-22 13:42:51 +02:00
Timm Baeder
fb00fa56b5
[clang] Implement dump() for MemberPointer APValues (#136130)
Print the member pointer decl and the path.
2025-04-17 14:52:23 +02:00
YLChenZ
9a6c001b12
[clang][ast]: Add DynamicAllocLValue and TypeInfoLValue support to APValue::dump(). (#135178)
Closes #134996.
The crash about `TypeInfoLValue` is https://godbolt.org/z/73WY31s55. 
After the patch:
```cpp
//test.cpp
#include <typeinfo>
constexpr const std::type_info* val = &typeid(int);
```
```
lambda@ubuntu22:~/test$ clang++ -std=c++20 -Xclang -ast-dump -fsyntax-only test.cpp
LValue Base=TypeInfoLValue typeid(int), Null=0, Offset=0, HasPath=1, PathLength=0, Path=()
```

```cpp
//DAtest.cpp
constexpr int *m = new int(42);
```
```
lambda@ubuntu22:~/test$ clang++ -std=c++20 -Xclang -ast-dump -fsyntax-only DAtest.cpp
LValue Base=DynamicAllocLValue 'int', Null=0, Offset=0, HasPath=1, PathLength=0, Path=()
```
2025-04-15 14:16:09 +02:00
Timm Baeder
14ffff3847
[clang] Add dump() support for lvalue APValues (#124476)
Add some lvalue information to the `dump()` output of lvalue APValues.
2025-01-27 11:54:06 +01:00