Open
Description
Consider following example:
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
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
llvm-project/clang/lib/Index/USRGeneration.cpp
Lines 352 to 361 in caeefe7