csmith-project / creduce

C-Reduce, a C and C++ program reducer
Other
1.31k stars 123 forks source link

Remove uses of ClassTemplateSpecializationDecl::getTypeAsWritten #275

Closed sdkrystian closed 5 months ago

sdkrystian commented 5 months ago

https://github.com/llvm/llvm-project/pull/91393 removed ClassTemplateSpecializationDecl::getTypeAsWritten. This was used to get the SourceLocation for the name of a ClassTemplatePartialSpecializationDecl in a few places, which is the same SourceLocation returned by Decl::getLocation. This fix should be backwards compatible.

The removal of getTypeAsWritten also means that there no longer exists a TemplateSpecializationTypeLoc to be traversed by RecursiveASTVisitor, so this PR also includes a commit which ensures that explicit specializations/instantiations are correctly renamed.

See also https://github.com/marxin/cvise/issues/142.