This revision was automatically updated to reflect the committed changes.
Closed by commit rC336239: [Sema] Consider all format_arg attributes. (authored
by Meinersbur, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D48734?vs=153643&id=154038#toc
Repository:
rC Clang
http
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
Repository:
rC Clang
https://reviews.llvm.org/D48734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.
Meinersbur updated this revision to Diff 153643.
Meinersbur added a comment.
- Reinsert test for the change in this patch
Repository:
rC Clang
https://reviews.llvm.org/D48734
Files:
lib/Sema/SemaChecking.cpp
test/Sema/attr-format_arg.c
Index: test/Sema/attr-format_arg.c
===
Meinersbur updated this revision to Diff 153642.
Meinersbur added a comment.
- Address Aaron's remarks
Repository:
rC Clang
https://reviews.llvm.org/D48734
Files:
lib/Sema/SemaChecking.cpp
test/Sema/attr-format_arg.c
Index: test/Sema/attr-format_arg.c
==
aaron.ballman added inline comments.
Comment at: lib/Sema/SemaChecking.cpp:5523
+ StringLiteralCheckType CommonResult;
+ for (const FormatArgAttr *FA : ND->specific_attrs()) {
const Expr *Arg = CE->getArg(FA->getFormatIdx().getASTIndex());
You
Meinersbur added inline comments.
Comment at: lib/Sema/SemaChecking.cpp:5534
+ if (!IsFirst)
+return CommonResult;
+
Not sure what should be returned here; To minimize surprises, this returns what
the current version would have returned.
Repositor
Meinersbur created this revision.
Meinersbur added reviewers: dlj, rsmith, Jean-Daniel.
If a function has multiple format_arg attributes, clang only considers the
first it finds (because AttributeLists are in reverse order, it is textual
last) and ignores all others.
Loop over all FormatArgAttr