forked from OSchip/llvm-project
8691d6e678
correct getNumArguments StringifiedArguments is allocated (resized) based on the size the getNumArguments function. However, this function ACTUALLY currently returns the amount of total UnexpArgTokens which is minimum the same as the new implementation of getNumMacroArguments, since empty/omitted arguments result in 1 UnexpArgToken, and included ones at minimum include 2 (1 for the arg itself, 1 for eof). This patch renames the otherwise unused getNumArguments to be more clear that it is the number of arguments that the Macro expects, and thus the maximum number that can be stringified. This patch also replaces the explicit memset (which results in value instantiation of the new tokens, PLUS clearing the memory) with brace initialization. Differential Revision: https://reviews.llvm.org/D32046 llvm-svn: 305425 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
HeaderMap.cpp | ||
HeaderSearch.cpp | ||
Lexer.cpp | ||
LiteralSupport.cpp | ||
MacroArgs.cpp | ||
MacroInfo.cpp | ||
ModuleMap.cpp | ||
PPCaching.cpp | ||
PPCallbacks.cpp | ||
PPConditionalDirectiveRecord.cpp | ||
PPDirectives.cpp | ||
PPExpressions.cpp | ||
PPLexerChange.cpp | ||
PPMacroExpansion.cpp | ||
PTHLexer.cpp | ||
Pragma.cpp | ||
PreprocessingRecord.cpp | ||
Preprocessor.cpp | ||
PreprocessorLexer.cpp | ||
ScratchBuffer.cpp | ||
TokenConcatenation.cpp | ||
TokenLexer.cpp | ||
UnicodeCharSets.h |