================
@@ -3907,6 +3923,31 @@ CountAttributedType::CountAttributedType(
     DeclSlot[i] = CoupledDecls[i];
 }
 
+StringRef CountAttributedType::getAttributeName(bool WithMacroPrefix) const {
+// TODO: This method isn't really ideal because it doesn't return the spelling
+// of the attribute that was used in the user's code. This method is used for
+// diagnostics so the fact it doesn't use the spelling of the attribute in
+// the user's code could be confusing (#113585).
+#define ENUMERATE_ATTRS(PREFIX)                                                
\
----------------
Sirraide wrote:

> Hmm actually I think I would need support for `constexpr` `std::string` to 
> implement this

(fyi, even `constexpr std::string` wouldn’t be enough; an implementation of 
this that uses `std::string` would require non-transient `constexpr` 
allocation, which is something people are working on, but it’s not in the 
standard yet and no compiler supports anything like it afaik)

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

Reply via email to