Ensure the correct order of evaluation in part 2. of PlistMacroExpansion

Windows buildbots break with the previous commit '[analyzer][PlistMacroExpansion]
Part 2.: Retrieving the macro name and primitive expansion'. This patch attempts
to solve this issue.

llvm-svn: 346112
This commit is contained in:
Kristof Umann 2018-11-05 02:37:29 +00:00
parent 3800257fba
commit cb88cc674c
1 changed files with 2 additions and 1 deletions

View File

@ -781,7 +781,8 @@ static ExpansionInfo getExpandedMacro(SourceLocation MacroLoc,
llvm::SmallString<200> ExpansionBuf;
llvm::raw_svector_ostream OS(ExpansionBuf);
TokenPrinter Printer(OS, PP);
return { getMacroNameAndPrintExpansion(Printer, MacroLoc, PP), OS.str() };
std::string MacroName = getMacroNameAndPrintExpansion(Printer, MacroLoc, PP);
return { MacroName, OS.str() };
}
static std::string getMacroNameAndPrintExpansion(TokenPrinter &Printer,