Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[clang] source range of variable template specialization should inclu…
…de 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 branch information
Tomasz Kamiński
committed
Mar 27, 2023
1 parent
9580beb
commit a826b90
Showing
4 changed files
with
26 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters