From 1df17a326ab28a60a47af45449989600e3ad971d Mon Sep 17 00:00:00 2001 From: Kristof Umann Date: Mon, 5 Nov 2018 02:37:29 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@346112 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/StaticAnalyzer/Core/PlistDiagnostics.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp b/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp index 7c74a917f6..deb1aeb634 100644 --- a/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp +++ b/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp @@ -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, -- 2.50.1