================ @@ -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); ---------------- philnik777 wrote:
I'm not 100% sure what the correct thing to do is. I don't think there's harm in adding the attribute without a string if the arguments are incorrect, since they don't affect what the attribute does in a significant way. OTOH there isn't that much benefit in adding it, since the program is ill-formed anyways. @AaronBallman any thoughts on this? P.S. why isn't `checkStringLiteralArgumentAttr` marked `[[nodiscard]]`? 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