Browse Source

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
Kristof Umann 6 years ago
parent
commit
1df17a326a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lib/StaticAnalyzer/Core/PlistDiagnostics.cpp

+ 2 - 1
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,