pengjianaixue

Results 14 comments of pengjianaixue

The extract to function only work on the *.cc/*.cpp file, but no work on the .c file. ![image](https://github.com/clangd/vscode-clangd/assets/21357301/4aae68b2-303c-4812-8b7d-f4e1328427c0) ![image](https://github.com/clangd/vscode-clangd/assets/21357301/1c4b3671-b7ba-40d7-b244-e477cc072585) clangd information: clangd version 16.0.2 (https://github.com/llvm/llvm-project 18ddebe1a1a9bde349441631365f0472e9693520) I[17:56:40.655] argv[1]: --background-index I[17:56:40.655]...

Hi, this all the code in my main.c source code file ``` #include #include int main() { uint32_t len = 0x1008; uint32_t len1 = 0x8000; printf("0x%x\n", len); printf("0x%llx\n",len); return 0;...

> And you are trying to extract the first four statements in main()? That does work for me. > > What clangd version are you using? Yes, I tried, but...

> Does it work if you try with the same C code and a local clangd? Also can not work on local environment. ![image](https://github.com/clangd/vscode-clangd/assets/21357301/69ad3053-5cb9-481b-8e76-1e3b2dcf67f1) And the point is, In my...

The log is attached, please check, thanks. [vscode_clangd_gathering_log.txt](https://github.com/clangd/vscode-clangd/files/12839692/vscode_clangd_gathering_log.txt)

The below file is the clangd gathering log from *.cpp file, maybe there is some difference between *.c file that can be a clue. [vscode_clangd_gathering_log_cpp.txt](https://github.com/clangd/vscode-clangd/files/12839747/vscode_clangd_gathering_log_cpp.txt)

Hi, I do not include `` and `` in the main.c source file. I checked my code and collected the log once again. [vscode_clangd_gathering_log_c_1.txt](https://github.com/clangd/vscode-clangd/files/12843378/vscode_clangd_gathering_log_c_1.txt)

This is my operation screen snap video, you can see the difference between *.cpp and *.c file. https://github.com/clangd/vscode-clangd/assets/21357301/022ff334-aeb2-4582-87ae-dd5bcd2b2b25

Sorry for missing your reply. I collect the log including the action of selecting code lines in [vscode_clangd_c_language_gathering_log.txt](https://github.com/clangd/vscode-clangd/files/13175801/vscode_clangd_c_language_gathering_log.txt).

No worries. I don't know what conditions the extraction function depends on exactly. For Clangd, maybe some dependency conditions aren't met. Perhaps we can investigate the issue from this point.