This diff path takes care of comparing Template{Expansion} by template decl instead of by comparing the ptr memberName and the number of expansions.
Hi! This is my first attempt to summit a differential revision probably I did something wrong. Someone pointing out the errors would be highly appreciated.
A few days ago I uploaded a crash on clang. The following patch is an attempt to fix it, I am not very familiar with this part of Clang so probably a lot of things went over my head.
The crash happens when after parsing a declarator clang tries to get its type. In this case, is for an auto declarator when concepts are involved, this happens on clang::ASTContext::getAutoTypeInternal. It seems that when clang tries to retrieve the canonical arguments, it fails since the non-canonical and the canonical do not match because (I think) they way they are compared.
This makes the if statement to be evaluated to false and therefore InsertPos to be nullptr. This ends in a crash when line 5721 is reached, and a nullptr being inserted.
I also included some test, but I am not sure I placed them in the best place. let me know if there is a better place.
Thanks for your time.
I believe this change is not correct, as here we want to compare these two template arguments to see if they are identical (structural equality), not just that they refer to the same thing.