[all-commits] [llvm/llvm-project] 9a6c00: [clang][ast]: Add DynamicAllocLValue and TypeInfoL...
YLChenZ via All-commits
all-commits at lists.llvm.org
Tue Apr 15 05:16:31 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9a6c001b125d7d37b8f2c8b96461768c797c4e3f
https://github.com/llvm/llvm-project/commit/9a6c001b125d7d37b8f2c8b96461768c797c4e3f
Author: YLChenZ <chentongyongcz at gmail.com>
Date: 2025-04-15 (Tue, 15 Apr 2025)
Changed paths:
M clang/lib/AST/TextNodeDumper.cpp
M clang/test/AST/ast-dump-APValue-lvalue.cpp
Log Message:
-----------
[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 at 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 at 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=()
```
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