Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile_commands.json does not support clangd input, an error will occur. #381

Open
showtestlog opened this issue Jul 23, 2021 · 1 comment

Comments

@showtestlog
Copy link

I use clangd for autocompletion,but the xcpretty outout compiler_json_file can not parse in clangd

@adenisonafifi
Copy link

I've found that certain settings like code coverage make clangd unable to parse the compilation database.

I remove some lines from the compile_commands.json:

  # Remove the line `-index-store-path``
  sed -i'.bak' -E 's/-index-store-path//g' "$PWD/compile_commands.json"
  
  # Remove the line `-fcoverage-mapping  /Library/Developer/Xcode/DerivedData/ZwiftApp-fvbwgpierwmunfewgneckttafcun/Index/DataStore`
  # This could be a one-liner but I couldn't figure out how to do so.
  sed -i'.bak' -E 's/-fcoverage-mapping//g' "$PWD/compile_commands.json"
  sed -i'.bak' -E 's/[[:space:]][[:space:]]\/[^[:space:]]+\/Index\/DataStore[[:space:]]//g' "$PWD/compile_commands.json"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants