diff options
-rw-r--r-- | clang/include/clang/Lex/Preprocessor.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/include/clang/Lex/Preprocessor.h b/clang/include/clang/Lex/Preprocessor.h index 485600f1223..630b87ced35 100644 --- a/clang/include/clang/Lex/Preprocessor.h +++ b/clang/include/clang/Lex/Preprocessor.h @@ -1041,12 +1041,14 @@ public: macro_iterator macro_begin(bool IncludeExternalMacros = true) const; macro_iterator macro_end(bool IncludeExternalMacros = true) const; - llvm::iterator_range<macro_iterator> + llvm::iterator_range<macro_iterator> macros(bool IncludeExternalMacros = true) const { - return llvm::make_range(macro_begin(IncludeExternalMacros), - macro_end(IncludeExternalMacros)); + macro_iterator begin = macro_begin(IncludeExternalMacros); + macro_iterator end = macro_end(IncludeExternalMacros); + return llvm::make_range(begin, end); } + /// \} /// \brief Return the name of the macro defined before \p Loc that has |