summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/PrintPreprocessedOutput.cpp
diff options
context:
space:
mode:
authorDaniel Marjamaki <daniel.marjamaki@evidente.se>2015-05-11 08:25:54 +0000
committerDaniel Marjamaki <daniel.marjamaki@evidente.se>2015-05-11 08:25:54 +0000
commitecb0e1bc6093d0a5087b2ff57e99059aeb3edfee (patch)
tree1092d571a61d67f2769f5ce6d579df69e9a2a44a /clang/lib/Frontend/PrintPreprocessedOutput.cpp
parentd3585dbd1abef83b4aa922c814a637fc38d4e1b2 (diff)
downloadbcm5719-llvm-ecb0e1bc6093d0a5087b2ff57e99059aeb3edfee.tar.gz
bcm5719-llvm-ecb0e1bc6093d0a5087b2ff57e99059aeb3edfee.zip
Refactor MacroInfo so range for loops can be used to iterate its tokens.
Differential Revision: http://reviews.llvm.org/D9079 llvm-svn: 236975
Diffstat (limited to 'clang/lib/Frontend/PrintPreprocessedOutput.cpp')
-rw-r--r--clang/lib/Frontend/PrintPreprocessedOutput.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Frontend/PrintPreprocessedOutput.cpp b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
index 8ca36489ee4..037a6a525e2 100644
--- a/clang/lib/Frontend/PrintPreprocessedOutput.cpp
+++ b/clang/lib/Frontend/PrintPreprocessedOutput.cpp
@@ -64,12 +64,11 @@ static void PrintMacroDefinition(const IdentifierInfo &II, const MacroInfo &MI,
OS << ' ';
SmallString<128> SpellingBuffer;
- for (MacroInfo::tokens_iterator I = MI.tokens_begin(), E = MI.tokens_end();
- I != E; ++I) {
- if (I->hasLeadingSpace())
+ for (const auto &T : MI.tokens()) {
+ if (T.hasLeadingSpace())
OS << ' ';
- OS << PP.getSpelling(*I, SpellingBuffer);
+ OS << PP.getSpelling(T, SpellingBuffer);
}
}
OpenPOWER on IntegriCloud