================
@@ -1212,6 +1212,14 @@ static void handlePreferredName(Sema &S, Decl *D, const 
ParsedAttr &AL) {
         << TT->getDecl();
 }
 
+static void handleNoSpecializations(Sema &S, Decl *D, const ParsedAttr &AL) {
+  StringRef Message;
+  if (AL.getNumArgs() != 0)
+    S.checkStringLiteralArgumentAttr(AL, 0, Message);
----------------
erichkeane wrote:

>P.S. why isn't checkStringLiteralArgumentAttr marked [[nodiscard]]?

Pretty sure this function, or its origin predate `[[nodiscard]]` by a decade or 
so :)  Also, the use you have is completely reasonable here.  The `Message` 
argument is left zero-initalized, which is the behavior you want.

I don't see any good reason to change the code here, I think the SA tool isn't 
really adding value here, and I don't see anything I'd change.

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

Reply via email to