| Issue |
176724
|
| Summary |
Incorrect SourceRange on pointerTypeLoc using west-const
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
upsj
|
Opening the following file
```cpp
const double* a;
```
in clang-query 21.1.8 and matching the typeLoc of the declaration
```
match varDecl(hasTypeLoc(typeLoc().bind("type")))
```
returns a source range that doesn't include the `const`, i.e. it makes the typeLoc unsuitable to use for clang-tidy Transformer checks:
```
Match #1:
/Users/tobi/test.cpp:1:1: note: "root" binds here
1 | const double* a;
| ^~~~~~~~~~~~~~~
/Users/tobi/test.cpp:1:7: note: "type" binds here
1 | const double* a;
| ^~~~~~~
1 match.
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs