[clang] [clang] "modular_format" attribute for functions using format strings (PR #147431)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 2 15:41:02 PST 2025
================
@@ -2559,6 +2559,19 @@ void CodeGenModule::ConstructAttributeList(StringRef Name,
if (TargetDecl->hasAttr<ArmLocallyStreamingAttr>())
FuncAttrs.addAttribute("aarch64_pstate_sm_body");
+
+ if (auto *ModularFormat = TargetDecl->getAttr<ModularFormatAttr>()) {
----------------
erichkeane wrote:
`getAttr` will work if there is a single attribute only in the AST. It looks like that is the case, so this is fine.
https://github.com/llvm/llvm-project/pull/147431
More information about the cfe-commits
mailing list