Nathan Ridge
Nathan Ridge
> Something I've noticed is that there is a path to the clangd.exe in `C:\Program Files\LLVM\bin` in the log. Why is clangd calling another clangd instance? The path in question...
> Do I need to rebuild it from source (In debug build I guess) or is it enough to have the pdb file next to the exe? My understanding, from...
Can you state your VSCode version as well?
I'm not able to reproduce this. (Note however than I'm on Linux, not Windows.) I would suggest testing with some older vscode versions (they can be downloaded from https://code.visualstudio.com/updates). If...
Transferred to server repository as these are all features that need implementation in the clangd server. I believe the first bullet point is covered by https://github.com/clangd/clangd/issues/1037.
> > Transferred to server repository as these are all features that need implementation in the clangd server. > > I believe the first bullet point is covered by #1037....
Confirmed. The unexpected diagnostic goes away if I set `SkipFunctionBodies` to `false` instead of `true` [here](https://searchfox.org/llvm/rev/edb690dc5b5e7804797a497c0b01f1563e67bd00/clang-tools-extra/clangd/Preamble.cpp#642), so the issue is related to the attribute somehow being considered part of the...
Call stack from `ParseFunctionDefinition` calling into `handleAcquireCapabilityAttr`: ``` #0 handleAcquireCapabilityAttr (S=..., D=0x62100007b6e8, AL=...) at clang/lib/Sema/SemaDeclAttr.cpp:6231 #1 0x000055f1f1f25637 in ProcessDeclAttribute (S=..., scope=0x616000012680, D=0x62100007b6e8, AL=..., Options=...) at clang/lib/Sema/SemaDeclAttr.cpp:7529 #2 0x000055f1f1f1e94e in clang::Sema::ProcessDeclAttributeList...
For the function declaration case (`mu_lock`), `handleAcquireCapabilityAttr` is called by a different codepath: ``` #0 handleAcquireCapabilityAttr (S=..., D=0x62100007b240, AL=...) at clang/lib/Sema/SemaDeclAttr.cpp:6231 #1 0x000055f1f1f25637 in ProcessDeclAttribute (S=..., scope=0x616000012380, D=0x62100007b240, AL=..., Options=...)...
Note, the relevant call in `ParseFunctionDefinition` that's skipped by the early return is [this one](https://searchfox.org/llvm/rev/edb690dc5b5e7804797a497c0b01f1563e67bd00/clang/lib/Parse/Parser.cpp#1545-1547): ```c++ // Late attributes are parsed in the same scope as the function body. if...