================
@@ -84,6 +84,9 @@ C++ Specific Potentially Breaking Changes
     static_assert((b.*mp)() == 1); // newly rejected
     static_assert((c.*mp)() == 1); // accepted
 
+- ``VarTemplateSpecializationDecl::getTemplateArgsAsWritten()`` method returns
----------------
bolshakov-a wrote:

I don't think there is any change from user's perspective. I didn't succeeded 
in finding any related user-observable bug. In fact, this change fixes [a bug 
in the IWYU 
tool](https://github.com/include-what-you-use/include-what-you-use/pull/1793#discussion_r2280505322).
 However, those who use Clang as a library (like IWYU) are users as well, 
aren't they? And this PR fixes the bug in the Clang library interface (or at 
least makes it more consistent).

There is a related bug that `RecursiveASTVisitor` traverses (by default) 
implicitly instantiated variable template specializations and calls 
`VisitVarTemplateSpecializationDecl` for them, which manifests itself in the 
ExtractAPI, AFAIU. Namely, for such code:
```cpp
template <typename>
int var_tpl;

inline void Fn(){
    (void)var_tpl<double>;
}
```
Clang writes "Global Variable Template Specialization" record in the JSON file 
which looks like a bug because the specialization is implicit. CC @zixu-w, 
@daniel-grumberg.

I don't mind if you suggest just to remove the relnote or move it into some 
other section.

https://github.com/llvm/llvm-project/pull/156329
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to