Tell clangd to ignore -DUNSAFE_BUFFERS_BUILD flag
This compiler flag was added in https://crrev.com/c/5485646 and it causes the code to add lines declaring the pragma `allow_unsafe_buffers` which clangd does not know. This causes clangd to throw hundreds of `Unknown pragma ignored` errors after which clangd just gives up on indexing. Bug: 40284755 Test: Generate compile_commands.json with and without this fix and observe the errors when opening files in my editor. Change-Id: I712dd2a2fa981e275229b68f5db15449d44f10fe Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5498358 Reviewed-by: danakj <danakj@chromium.org> Commit-Queue: danakj <danakj@chromium.org> Auto-Submit: Jeroen Dhollander <jeroendh@google.com> Cr-Commit-Position: refs/heads/main@{#1294438}
This commit is contained in:
parent
3ef94f60ed
commit
63b01a61be
2
.clangd
2
.clangd
@ -4,4 +4,4 @@ Diagnostics:
|
||||
UnusedIncludes: None
|
||||
MissingIncludes: None
|
||||
CompileFlags:
|
||||
Remove: [-cfg=*, -exec_root=*, -inputs=*]
|
||||
Remove: [-cfg=*, -exec_root=*, -inputs=*, -DUNSAFE_BUFFERS_BUILD]
|
||||
|
Loading…
x
Reference in New Issue
Block a user