================
@@ -111,6 +111,13 @@ Clang Frontend Potentially Breaking Changes
     $ clang --target=<your target triple> -print-target-triple
     <the normalized target triple>
 
+- The ``getTypeAsWritten`` member function has been removed from 
``ClassTemplateSpecializationDecl`` and
+  ``VarTemplateSpecializationDecl``, and a new member function 
``getTemplateArgsAsWritten`` returning a
+  ``const ASTTemplateArgumentListInfo *`` has been added to access to the 
explicitly written template
+  argument list of explicit specializations, partial specializations, and 
explicit instantiations of
+  class and variable templates. Consequently, the ``hasTypeLoc`` AST matcher 
will no longer match these
+  declarations and existing uses should switch to ``TemplateArgumentLoc`` 
matchers instead.
+
----------------
sdkrystian wrote:

> I think we can remove the internal details and go with something shorter, 
> like:
> 
> ```
> The `hasTypeLoc` AST matcher will no longer match a 
> `classTemplateSpecializationDecl`; existing uses should switch to 
> `templateArgumentLoc` or `hasAnyTemplateArgumentLoc` instead.
> ```
> 
> WDYT?

@AaronBallman As a strictly AST matcher release note, I like your proposed 
wording. However, I think it's important to include the removal of 
`getTypeAsWritten` (and the addition of its replacement, 
`getTemplateArgsAsWritten`) so tooling authors know how to fix any code which 
is broken by these changes. Would adding two release notes be preferable? For 
example:

> - ``getTypeAsWritten`` has been removed from 
> ``ClassTemplateSpecializationDecl`` and ``VarTemplateSpecializationDecl`` in 
> favor of a new function ``getTemplateArgsAsWritten``.
> - The ``hasTypeLoc`` AST matcher will no longer match a 
> ``classTemplateSpecializationDecl``; existing uses should switch to 
> ``templateArgumentLoc`` or ``hasAnyTemplateArgumentLoc`` instead.

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

Reply via email to