[PATCH] D33976: [clang] Fix format specifiers fixits

2017-06-13 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D33976#776486, @mehdi_amini wrote: > In https://reviews.llvm.org/D33976#775918, @alexshap wrote: > > > @mehdi_amini , thanks, i see, regarding the "opposite issue" - probably an > > example / test case would be helpful, that looks like a s

[PATCH] D33976: [clang] Fix format specifiers fixits

2017-06-08 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. In https://reviews.llvm.org/D33976#775918, @alexshap wrote: > @mehdi_amini , thanks, i see, regarding the "opposite issue" - probably an > example / test case would be helpful, that looks like a separate issue. > Thanks for adding @ahatanak and @arphaman, that would

[PATCH] D33976: [clang] Fix format specifiers fixits

2017-06-08 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305018: [clang] Fix format specifiers fixits (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D33976?vs=101962&id=101964#toc Repository: rL LLVM https://reviews.llvm.org/D33

[PATCH] D33976: [clang] Fix format specifiers fixits

2017-06-08 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 101962. alexshap added a comment. Address comments Repository: rL LLVM https://reviews.llvm.org/D33976 Files: include/clang/Edit/EditedSource.h lib/Edit/EditedSource.cpp test/FixIt/fixit-format-darwin.m Index: test/FixIt/fixit-format-darwin.m ===

[PATCH] D33976: [clang] Fix format specifiers fixits

2017-06-08 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman accepted this revision. arphaman added a comment. This revision is now accepted and ready to land. Thanks for working on this! LGTM with a couple of fixes: Comment at: test/FixIt/fixit-format-darwin.m:3 +// RUN: %clang_cc1 -triple x86_64-apple-darwin9 -fsyntax-only -f

[PATCH] D33976: [clang] Fix format specifiers fixits

2017-06-08 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. @mehdi_amini , thanks, i see, regarding the "opposite issue" - probably an example / test case would be helpful, that looks like a separate issue. Thanks for adding @ahatanak and @arphaman, that would be wonderful if smb could look at this diff (which, besides the fix,

[PATCH] D33976: [clang] Fix format specifiers fixits

2017-06-06 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. Interestingly I got the opposite issue recently: calling through a macro with a single format specifier was *adding* new specific in the fixit in some conditions. I'm not the best person to review this change though, let me add a few folks. Repository: rL LLVM

[PATCH] D33976: [clang] Fix format specifiers fixits

2017-06-06 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. This diff fixes printf "fixits" in the case when there is a wrapping macro and the format string needs multiple replacements. In the presence of a macro there was an extra logic in EditedSource.cpp to handle multiple uses of the same macro argument (see the old co