diff options
Diffstat (limited to 'iwyu_preprocessor.cc')
-rw-r--r-- | iwyu_preprocessor.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/iwyu_preprocessor.cc b/iwyu_preprocessor.cc index 6dc70bf..10a1ad0 100644 --- a/iwyu_preprocessor.cc +++ b/iwyu_preprocessor.cc @@ -624,9 +624,7 @@ void IwyuPreprocessorInfo::MacroDefined(const Token& id, // #undefs and re-defines a macro, but should work fine in practice.) if (macro_loc.isValid()) macros_definition_loc_[GetName(id)] = macro_loc; - for (MacroInfo::tokens_iterator it = macro->tokens_begin(); - it != macro->tokens_end(); ++it) { - const Token& token_in_macro = *it; + for (const Token& token_in_macro : macro->tokens()) { if (token_in_macro.getKind() == clang::tok::identifier && token_in_macro.getIdentifierInfo()->hasMacroDefinition()) { macros_called_from_macros_.push_back(token_in_macro); |