Merge pull request #1774 from steveire/fix-clang-query

Use a file to execute clang-query commands
This commit is contained in:
Rubén Rincón Blanco
2020-01-11 11:50:15 +01:00
committed by GitHub
+4 -1
View File
@@ -45,7 +45,10 @@ class ClangQueryTool extends BaseTool {
}
await fs.writeFile(path.join(dir, "compile_flags.txt"), compileFlags.join('\n'));
const toolResult = await super.runTool(compilationInfo, sourcefile, args, stdin);
await fs.writeFile(path.join(dir, "query_commands.txt"), stdin);
args.push('-f');
args.push('query_commands.txt');
const toolResult = await super.runTool(compilationInfo, sourcefile, args);
if (toolResult.stdout.length > 0) {
const lastLine = toolResult.stdout.length - 1;