| Issue |
170141
|
| Summary |
[clang-tidy] Comparison between QualType objects from the same templated type returns false
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
vitorsorpile
|
Hello, I'm developing a clang-tidy checker that compare the type aliases used in different declarations of the same entity, I'm using the code example below to obtain and compare the full type with namespaces, but removing local CVR-qualifiers, from `QualType` objects:
```cpp
clang::TypeName::getFullyQualifiedType(Type1, ASTCtx, true)
.withoutLocalFastQualifiers() ==
clang::TypeName::getFullyQualifiedType(Type2, ASTCtx, true)
.withoutLocalFastQualifiers();
```
The comparison between the types of the parameters `param` from the following declaration/definition returns false :
```cpp
template <typename T>
class TemplateClass {
T var;
};
class AnotherClass {
public:
void method(TemplateClass<int> param);
};
void AnotherClass::method(TemplateClass<int> param) {}
```
The same behavior happens if the return type is `TemplateClass<int>` instead of `void`.
Is this the expected behavior for a templated type or should the comparison return true?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs