From 62692a409f31cb14e527f37da59dd2767d4af3f2 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 17 Aug 2025 11:52:29 +0800 Subject: fix arg --- xmake/plugins/project/clang/compile_commands.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xmake/plugins/project/clang/compile_commands.lua b/xmake/plugins/project/clang/compile_commands.lua index 2fed079f1..9435819df 100644 --- a/xmake/plugins/project/clang/compile_commands.lua +++ b/xmake/plugins/project/clang/compile_commands.lua @@ -137,12 +137,12 @@ function _translate_arguments(arguments) end end end - if arg == "-I" then + if arg and arg == "-I" then is_include = true end -- ignore pch flags -- https://github.com/xmake-io/xmake/issues/6710 - if arg == "-include-pch" or arg:endswith(".pch") then + if arg and (arg == "-include-pch" or arg:endswith(".pch")) then arg = nil end if arg then -- cgit v1.3.1