Issue |
125390
|
Summary |
[clang] [Index] The requirements are not handled when generates USR for `TemplateDecl`
|
Labels |
clang
|
Assignees |
|
Reporter |
16bit-ykiko
|
Consider following example:
```cpp
template <typename T, typename U>
struct function;
template <typename T, typename U>
requires (__is_same(U, int))
struct function<T, U> {
void foo();
};
template <typename T, typename U>
requires (__is_same(U, float))
struct function<T, U> {
void foo();
};
```
The second specialization and third specialization should have different USR, but actually same
```cpp
c:@SP>2#T#T@function>#t0.0#t0.1
c:@SP>2#T#T@function>#t0.0#t0.1
```
Thie is beacuse the `USRGenerator` doesn't handle requirements in `TemplateDecl`. See
https://github.com/llvm/llvm-project/blob/caeefe7b9403a281d5ea3501c3792ba01b3ee7ae/clang/lib/Index/USRGeneration.cpp#L352-L361
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs