[clang] source range of variable template specialization should include initializer
This patch adjust the getSourceRange() for the VarTemplateSpecializationDecl and VarTemplatePartialSpecializationDecl, such that the initializer is included if present: ``` template<typename T> T temp = 1; template<> double temp<double> = 1; ``` This patch makes it consistent with the behavior of non-template variables with initializers and restores behavior that was present before https://reviews.llvm.org/D139705. n case, when the initializer is not present we still include the template arguments in the source range, which was required for fixing zero-initialization fix-it. Reviewed By: erichkeane Differential Revision: https://reviews.llvm.org/D146733
Loading
Please sign in to comment