From 5611ff5b21951218f5867a36d91f426b97295f03 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 16 Aug 2022 10:06:02 +0200 Subject: [PATCH] Ignore arguments in compile commands after and including -- --- src/compile_commands.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compile_commands.cpp b/src/compile_commands.cpp index 2c5e43a..b13494d 100644 --- a/src/compile_commands.cpp +++ b/src/compile_commands.cpp @@ -151,8 +151,10 @@ std::vector CompileCommands::get_arguments(const boost::filesystem: cmd_arguments[c] == "-MF") { // Exclude dependency file generation ignore_next = true; } - else if(cmd_arguments[c] == "-c" || cmd_arguments[c] == "--") { + else if(cmd_arguments[c] == "-c") { } + else if(cmd_arguments[c] == "--") // End of command options + break; else arguments.emplace_back(cmd_arguments[c]); }