[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-20 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL305845: [clang] Fix format specifiers fixits for nested macros (authored by alexshap). Changed prior to commit: https://reviews.llvm.org/D34268?vs=103093&id=103262#toc Repository: rL LLVM https://re

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-20 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. LGTM. Repository: rL LLVM https://reviews.llvm.org/D34268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-19 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap updated this revision to Diff 103093. alexshap added a comment. update, rerun the tests Repository: rL LLVM https://reviews.llvm.org/D34268 Files: include/clang/Edit/EditedSource.h lib/Edit/EditedSource.cpp test/FixIt/fixit-format-darwin.m Index: test/FixIt/fixit-format-darwi

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-19 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap planned changes to this revision. alexshap marked an inline comment as done. alexshap added a comment. probably we don't need to keep the entire expansion stack in MacroArgUse (i was doing that because it was easier to understand what's going on). I will update this diff soon. Reposito

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-19 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap marked 3 inline comments as done. alexshap added inline comments. Comment at: lib/Edit/EditedSource.cpp:80 + return ArgUse.Identifier == U.Identifier && + std::tie(ArgUse.ExpansionStack, ArgUse.Use) != + std::tie(U.ExpansionSt

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

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

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-19 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman added inline comments. Comment at: include/clang/Edit/EditedSource.h:50 +// Location of argument use inside the top-level macro +SourceLocation Use; + I think a name like `UseLoc` is more appropriate. Comment at: lib/Edit/Edite

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-17 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap added a comment. Ping Repository: rL LLVM https://reviews.llvm.org/D34268 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

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

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-15 Thread Mehdi AMINI via Phabricator via cfe-commits
mehdi_amini added a comment. Thanks for fixing! (I'm still not the best qualified to review this) Comment at: lib/Edit/EditedSource.cpp:78 if (I != ExpansionToArgMap.end() && -std::find_if( -I->second.begin(), I->second.end(), [&](const MacroArgUse &U)

[PATCH] D34268: [clang] Fix format specifiers fixits for nested macros

2017-06-15 Thread Alexander Shaposhnikov via Phabricator via cfe-commits
alexshap created this revision. ExpansionLoc was previously calculated incorrectly in the case of nested macros expansions. In this diff we build the stack of expansions where the last one is the actual expansion (in the source code) which should be used for grouping together the edits. The de