r346112 - Ensure the correct order of evaluation in part 2. of PlistMacroExpansion
Kristof Umann via cfe-commits
cfe-commits at lists.llvm.org
Sun Nov 4 18:37:29 PST 2018
Author: szelethus
Date: Sun Nov 4 18:37:29 2018
New Revision: 346112
URL: http://llvm.org/viewvc/llvm-project?rev=346112&view=rev
Log:
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.
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp?rev=346112&r1=346111&r2=346112&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp Sun Nov 4 18:37:29 2018
@@ -781,7 +781,8 @@ static ExpansionInfo getExpandedMacro(So
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,
More information about the cfe-commits
mailing list