Fix zero-initialization fix-it for variable template
authorv1nh1shungry <v1nh1shungry@outlook.com>
Thu, 19 Jan 2023 17:35:09 +0000 (12:35 -0500)
committerAaron Ballman <aaron@aaronballman.com>
Thu, 19 Jan 2023 17:35:46 +0000 (12:35 -0500)
commitb3faa1a87ac37e3825a67368dfb8dcfef95f4c53
tree466ea9764448cf3e184404ce4cd471e6922f06f4
parent2f8b920f95aa1e308193cf5803df7912025e8400
Fix zero-initialization fix-it for variable template

Current version there is a fix-it for

template <class> constexpr int x = 0;
template <> constexpr int x<int>; // fix-it here
but it will cause

template <> constexpr int x = 0<int>;

Differential Revision: https://reviews.llvm.org/D139705
clang/docs/ReleaseNotes.rst
clang/include/clang/AST/DeclTemplate.h
clang/test/FixIt/fixit-const-var-init.cpp [new file with mode: 0644]