[clang] Fix the double space and double attribute printing of the final keyword. (PR #88600)
Vassil Vassilev via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 12 23:46:09 PDT 2024
================
@@ -6,11 +6,11 @@ typedef vector<float, 3> float3;
RWBuffer<float3> Buffer;
// expected-error at +2 {{class template 'RWBuffer' requires template arguments}}
-// expected-note@*:* {{template declaration from hidden source: template <class element_type> class RWBuffer final}}
+// expected-note@*:* {{template declaration from hidden source: template <class element_type> class RWBuffer}}
----------------
vgvassilev wrote:
We remove the `final` keyword here as it is modeled as an attribute and HLSL calls `FinalAttr::CreateImplicit` to constrain the users from inheriting from the builtin classes. We do not print implicit attributes. This used to work because we double printed `final` once as an attribute and once as part of the regular printing of CXXRecordDecls...
https://github.com/llvm/llvm-project/pull/88600
More information about the cfe-commits
mailing list