]> granicus.if.org Git - clang/commit
[clang] Fix format specifiers fixits for nested macros
authorAlexander Shaposhnikov <shal1t712@gmail.com>
Tue, 20 Jun 2017 20:46:58 +0000 (20:46 +0000)
committerAlexander Shaposhnikov <shal1t712@gmail.com>
Tue, 20 Jun 2017 20:46:58 +0000 (20:46 +0000)
commitd0f47eb94f60fa5fbe4fa1a7a7cc24405a98d4c2
treec21cdc9c2e8bc895b037c8132077a12714245914
parent6e3f80de39298b1ac410e59841c60853e807fa37
[clang] Fix format specifiers fixits for nested macros

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 which should be used
for grouping together the edits.
The definition of MacroArgUse is adjusted accordingly.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D34268

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@305845 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Edit/EditedSource.h
lib/Edit/EditedSource.cpp
test/FixIt/fixit-format-darwin.m