[clang] [Clang] Add [[clang::no_specializations]] (PR #101469)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 17 18:05:00 PST 2025


================
@@ -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);
----------------
shafik wrote:

static analysis flags this b/c you are not checking the return value of `checkStringLiteralArgumentAttr` and AFAICT every other use is checking the value.

Please confirm the intent and please fix to check the return value or please modify to purposely ignore it. 

https://github.com/llvm/llvm-project/pull/101469


More information about the cfe-commits mailing list