[NFC] Refactor the Preprocessor function that handles Macro definitions and rename...
authorFaisal Vali <faisalv@yahoo.com>
Mon, 17 Jul 2017 01:27:53 +0000 (01:27 +0000)
committerFaisal Vali <faisalv@yahoo.com>
Mon, 17 Jul 2017 01:27:53 +0000 (01:27 +0000)
commit11746b05e576ca2a1f21b61721d0a13975ace751
tree220890d29d31f5dda7c5d36fb745c114673760e2
parent9466a84a4ef38b4c8348c5f3b4b5c639faa1d576
[NFC] Refactor the Preprocessor function that handles Macro definitions and rename Arguments to Parameters in Macro Definitions.
  - Extracted the reading of the tokens out into a separate function.
  - Replace 'Argument' with 'Parameter' when referring to the identifiers of the macro definition (as opposed to the supplied arguments - MacroArgs - during the macro invocation).

This is in preparation for submitting patches for review to implement __VA_OPT__ which will otherwise just keep lengthening the HandleDefineDirective function and making it less comprehensible.

Thanks!

llvm-svn: 308157
14 files changed:
clang/include/clang/Lex/MacroInfo.h
clang/include/clang/Lex/Preprocessor.h
clang/lib/CodeGen/MacroPPCallbacks.cpp
clang/lib/Frontend/PrintPreprocessedOutput.cpp
clang/lib/Lex/MacroArgs.cpp
clang/lib/Lex/MacroInfo.cpp
clang/lib/Lex/PPDirectives.cpp
clang/lib/Lex/PPMacroExpansion.cpp
clang/lib/Lex/TokenLexer.cpp
clang/lib/Sema/SemaCodeComplete.cpp
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp
clang/tools/libclang/CIndex.cpp
clang/unittests/Lex/LexerTest.cpp