summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/plugins/project/clang/compile_commands.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/plugins/project/clang/compile_commands.lua b/xmake/plugins/project/clang/compile_commands.lua
index c94f399a2..2b8db7e2e 100644
--- a/xmake/plugins/project/clang/compile_commands.lua
+++ b/xmake/plugins/project/clang/compile_commands.lua
@@ -106,7 +106,7 @@ function _make_arguments(jsonfile, arguments, sourcefile)
for _, arg in ipairs(arguments) do
local sourcekind = try {function () return language.sourcekind_of(path.filename(arg)) end}
if sourcekind and os.isfile(arg) then
- sourcefile = arg
+ sourcefile = tostring(arg)
break
end
end