llvm/llvm-project 7421
The LLVM Project is a collection of modular and reusable compiler and toolchain technologies. Note: the repository does not accept github pull requests at this moment. Please submit your patches at http://reviews.llvm.org.
SQLite bindings for the Dart VM
server-side Dart apps in Apache
Interactive interpreter for Dart
Syntactic sugar for running async functions in sequence
Dart-JS interop
Ship helps you write less callbacks
Reflection shim for Dart
TESTING - this may be deleted or changed at any time as we experiment
All of the important libraries the dart team hasn't shipped yet
issue closedclangd/clangd
bits/stdc++.h is included when tab-completing std::size_t
When I <kbd>Tab</kbd>-complete std::size_t
, the header bits/stdc++.h
gets included in a C++ file (I initially asked a question on SO). Since this header file is not part of the C++ standard and is, therefore, non-portable, it should be avoided, shouldn't it?
System information Well it's actually YCM in Vim which uses clangd.
Editor: Vim with YCM Operating system: ArchLinux
closed time in 4 hours
Aster89issue commentclangd/vscode-clangd
Confirm still having the same problem.
Issue still the same: Version 1.52.1 (stable release channel)
comment created time in 7 hours
issue commentclangd/clangd
@sam-mccall could you advertise this extension on the original LSP issue (https://github.com/microsoft/language-server-protocol/issues/376)? I would have implemented this extension for rust-analyzer ages ago if I knew it existed.
comment created time in 7 hours
issue commentclangd/clangd
VSCode Rename symbol duplicates the part of new method name in the current file
Hmmm so the index isn't mismatching C:
and c:
, must be specific to some fancy stuff in rename.
comment created time in 7 hours
issue commentclangd/clangd
VSCode Rename symbol duplicates the part of new method name in the current file
Result of Find all references
of getLocalIpAddress
on NetworkUtil.cpp:11
I[14:27:51.607] <-- textDocument/references(149)
V[14:27:51.607] ASTWorker running References on version 5 of c:\Users\simone.gaiarin\Qsync\Software\scratchpad\scratchpad\NetworkUtil.cpp
I[14:27:51.608] --> reply:textDocument/references(149) 0 ms
V[14:27:51.608] >>> {"id":149,"jsonrpc":"2.0","result":[{"range":{"end":{"character":42,"line":10},"start":{"character":25,"line":10}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/NetworkUtil.cpp"},{"range":{"end":{"character":40,"line":13},"start":{"character":23,"line":13}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/NetworkUtil.hpp"},{"range":{"end":{"character":47,"line":52},"start":{"character":30,"line":52}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/main.cpp"},{"range":{"end":{"character":47,"line":53},"start":{"character":30,"line":53}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/main.cpp"},{"range":{"end":{"character":47,"line":54},"start":{"character":30,"line":54}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/main.cpp"},{"range":{"end":{"character":51,"line":56},"start":{"character":34,"line":56}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/main.cpp"}]}
Result of Find all references
of getLocalIpAddress
on NetworkUtil.hpp:14
I[14:29:20.440] <-- textDocument/references(165)
V[14:29:20.440] ASTWorker running References on version 5 of c:\Users\simone.gaiarin\Qsync\Software\scratchpad\scratchpad\NetworkUtil.hpp
I[14:29:20.440] --> reply:textDocument/references(165) 0 ms
V[14:29:20.440] >>> {"id":165,"jsonrpc":"2.0","result":[{"range":{"end":{"character":40,"line":13},"start":{"character":23,"line":13}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/NetworkUtil.hpp"},{"range":{"end":{"character":42,"line":10},"start":{"character":25,"line":10}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/NetworkUtil.cpp"},{"range":{"end":{"character":47,"line":52},"start":{"character":30,"line":52}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/main.cpp"},{"range":{"end":{"character":47,"line":53},"start":{"character":30,"line":53}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/main.cpp"},{"range":{"end":{"character":47,"line":54},"start":{"character":30,"line":54}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/main.cpp"},{"range":{"end":{"character":51,"line":56},"start":{"character":34,"line":56}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/main.cpp"}]}
Result of Find all references
of getLocalIpAddress
on main.cpp:53
I[14:30:15.078] <-- textDocument/references(180)
V[14:30:15.078] ASTWorker running References on version 5 of c:\Users\simone.gaiarin\Qsync\Software\scratchpad\scratchpad\main.cpp
I[14:30:15.079] --> reply:textDocument/references(180) 0 ms
V[14:30:15.079] >>> {"id":180,"jsonrpc":"2.0","result":[{"range":{"end":{"character":47,"line":52},"start":{"character":30,"line":52}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/main.cpp"},{"range":{"end":{"character":47,"line":53},"start":{"character":30,"line":53}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/main.cpp"},{"range":{"end":{"character":47,"line":54},"start":{"character":30,"line":54}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/main.cpp"},{"range":{"end":{"character":51,"line":56},"start":{"character":34,"line":56}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/main.cpp"},{"range":{"end":{"character":42,"line":10},"start":{"character":25,"line":10}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/NetworkUtil.cpp"},{"range":{"end":{"character":40,"line":13},"start":{"character":23,"line":13}},"uri":"file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/scratchpad/NetworkUtil.hpp"}]}
comment created time in 8 hours
issue commentclangd/clangd
Include completion fails at the end of file
Works like a charm now on my end, thanks.
comment created time in 10 hours
issue commentclangd/clangd
VSCode Rename symbol duplicates the part of new method name in the current file
Can you perform a Find all References
on the symbol in the NetworkUtil.[hc]pp and paste the log from that. The line I'm interested in is
V[11:15:02.483] ASTWorker running References on version 21 of /home/nathan/Downloads/bug_example/NetworkUtil.hpp
I[11:15:02.483] --> reply:textDocument/references(42) 0 ms
V[11:15:02.483] >>> {"id":42,"jsonrpc":"2.0","result":[{"range":{"end":{"character":40,"line":7},"start":{"character":23,"line":7}},"uri":"file:///home/nathan/Downloads/bug_example/NetworkUtil.hpp"},{"range":{"end":{"character":42,"line":2},"start":{"character":25,"line":2}},"uri":"file:///home/nathan/Downloads/bug_example/NetworkUtil.cpp"},{"range":{"end":{"character":47,"line":13},"start":{"character":30,"line":13}},"uri":"file:///home/nathan/Downloads/bug_example/main.cpp"},{"range":{"end":{"character":47,"line":14},"start":{"character":30,"line":14}},"uri":"file:///home/nathan/Downloads/bug_example/main.cpp"}]}```
comment created time in 10 hours
issue commentclangd/clangd
VSCode Rename symbol duplicates the part of new method name in the current file
I just tried with an 11 build - Ubuntu clangd version 11.0.0-2~ubuntu20.04.1
and again could not reproduce with the code you have provided,
Your log file does explain the bug though and why I cannot reproduce as its windows specific, its generating fixes for file:///C:/Users/simone.gaiarin/Qsync/Software/scratchpad/bug_example/main.cpp
and file:///c:/Users/simone.gaiarin/Qsync/Software/scratchpad/bug_example/main.cpp
. For some reason its trying to apply the fix on a file in the c
drive and one in the C
drive, even though they are the same.
comment created time in 10 hours
push eventllvm/llvm-zorg
commit sha e2f431ab99945166a1113bc7a64f617b472f360b
ClangBuilder: Enable fortran in test-suite Automatically enable running the fortran parts of the test-suite if flang is part of the checkout. In order to do this, we need to pass two CMake defines when configuring the test-suite: one telling it to enable fortran and one pointing it at flang. The latter picks the most recently built flang (i.e. it chooses the one from stage 2 if there is one). At the moment, this only affects clang-cmake-aarch64-full. Differential Revision: https://reviews.llvm.org/D94945
push time in 11 hours
pull request commentclangd/vscode-clangd
Add .clangd config schema and default file associations
The most obvious solution is to generate all these from a single file, and the JSON-schema format maybe isn't a terrible choice...
Another possibility might be to store the schema in a custom format in the LLVM codebase (which might be more useful to generate the c++ structures), and have clangd generate on initialization a JSON schema. The schema could then be sent to the client via the initialization response and then registered on the fly (this would require the use of the API I mentioned earlier, but I have already some working code that could be adapted easily). This would also solve any issue related to versioning, I guess, as the schema is provided directly by the server and will contain only the options known by the server. Downside to this is that we'd lose some of the simplicity of this approach by adding some glue TS code.
The reliance on another extension means we'll only benefit people who happen to have that installed, I suppose.
We might show a popup when opening .clangd
, suggesting to install the YAML extension for completion support.
I would love to see your work as a standalone extension
@i-ky I do understand why you'd like that, however I presume you're mostly interested in clang-format and clang-tidy files, for which I have not tried to write a schema yet. Right now I am more focused on the .clangd file (simpler and easier to begin experimenting with), but I suppose that they might be included eventually. However it seems a waste of resources to duplicate the extension, maybe a clangd.disableIntellisense
option might be an acceptable alternative?
comment created time in 12 hours
issue closedclangd/clangd
Include completion fails at the end of file
- clangd version: clangd version 11.0.0 (https://github.com/llvm/llvm-project.git 3badd17b6989621b5aa2732800f697dabbda034d)
- OS: Windows 10
I think this issue still exists. @HighCommander4
Originally posted by @lh123 in https://github.com/clangd/clangd/issues/38#issuecomment-643115928
closed time in 12 hours
lh123issue commentclangd/clangd
VSCode Rename symbol duplicates the part of new method name in the current file
Just to add one more detail, the preview works correctly for me, it's just when I confirm the changes (or when I do not use the preview) that the error appears.
I've just tried with 11.0.1 now and the error still occurs.
comment created time in 12 hours
issue commentclangd/vscode-clangd
Confirm still having the same problem.
The same.
comment created time in 13 hours
issue commentclangd/clangd
bits/stdc++.h is included when tab-completing std::size_t
Sent out https://reviews.llvm.org/D95423
comment created time in 14 hours
issue closedclangd/clangd
Internal libstdc++ header suggested as include for uint8_t
Repro: try completing uint8_t
.
Expected: #include <cstdint>
is added.
Actual: #include <bits/stdint-uintn.h>
is added.
Note that if I choose to complete std::uint8_t
, I get <cstdint>
as expected.
We seem to have std::uint8_t
in the canonical header map, but not ::uint8_t
(from global namespace).
closed time in 15 hours
ilya-biryukovissue commentclangd/clangd
Internal libstdc++ header suggested as include for uint8_t
Looks like this has been fixed, we seem to be only missing the mapping of size_t
currently. so closing this as we've got another report for size_t
comment created time in 15 hours
issue commentclangd/clangd
Include completion fails at the end of file
Interesting I thought I had fixed this one... Well good thing is, this means at least I know the fix :D
Sent out https://reviews.llvm.org/D95419
comment created time in 15 hours
issue commentclangd/coc-clangd
Add json config option to disable source
Added clangd.disableCompletion
comment created time in 19 hours
push eventclangd/coc-clangd
commit sha 265ac5cce35e1d3b52bb267908fd65f5756603df
v0.8.0
push time in 19 hours
push eventclangd/coc-clangd
commit sha 591b15b21d474794b3fbe478704508db92ba1dbd
feat: add clangd.disableCompletion close #177
push time in 19 hours
issue closedclangd/coc-clangd
Add json config option to disable source
I would like to have all coc-clangd
features EXCEPT for autocompletion. Turning it off every time by hand is very annoying. There's only a setting to disable it completely.
closed time in 19 hours
daedsidogissue openedclangd/coc-clangd
Add json config option to disable source
I would like to have all coc-clangd
features EXCEPT for autocompletion. Turning it off every time by hand is very annoying. There's only a setting to disable it completely.
created time in 21 hours
issue closedclangd/clangd
No libc++ on system and clangd does not work with libstdc++: No user feedback of problem source
After installation via pacman on Manjaro, the header are not found by clangd. Clang++ and g++ work fine on execution though. Is there a helper tool to show all include paths from clang or how are they resolved? Why are clang and clangd using different methods for header including?
compile_flags.txt
g++
-std=c++17
-Wall
-Wextra
-Weffc++
-Wstrict-aliasing
-Werror
# -pretty # no effect
# -log=verbose # no effect
# -I/usr/include/c++/10.1.0/ # optional different messages
If you can, provide a minimal chunk of code that shows the problem (either inline, or attach it if larger).
#include <cstdint> /* defined int types */ // 'cstdint' file not found XOR in included file 'bits/c++config.h' file not found
#include <iostream> /* std::cout */ // 'iostream' not found XOR In included file 'bits/c++config.h' file not found
int32_t x; //Unknown type name 'int32_t'
std::string string() { //use of undeclared identifier 'std' XOR No member named 'string' in namespace 'std'
return "x";
}
Logs I cant find a way to extract error messages as text from the setup set, since there is no parameter option example and inserting into compile_flags.txt does not work.
System information
Output of clangd --version
: 10.0.0
Editor/LSP plugin: neovim NVIM v0.5.0-619-g1153ac903
Operating system: Manjaro (Arch derivate)
closed time in 21 hours
matu3baissue commentclangd/clangd
No libc++ on system and clangd does not work with libstdc++: No user feedback of problem source
Using cmake-generated content, ie with a vim plugin fixed the issue.
I would recommend strongly to use cmake-generated files ie with vim-cmake or have endless grief.
This generated for me a g++ command which just worked.
comment created time in 21 hours
push eventllvm/llvm-zorg
commit sha 3893eefc64995870dca30df472cabc4f5ff10f5c
Add a libc aarch64 worker and a debug builder running on it. Differential Revision: https://reviews.llvm.org/D95054
push time in a day
issue commentclangd/clangd
bits/stdc++.h is included when tab-completing std::size_t
Dupe of (or at least related to) #68?
comment created time in a day
issue openedclangd/clangd
bits/stdc++.h is included when tab-completing std::size_t
When I <kbd>Tab</kbd>-complete std::size_t
, the header bits/stdc++.h
gets included in a C++ file. Since this header file is not part of the C++ standard and is, therefore, non-portable, it should be avoided, shouldn't it?
System information Well it's actually YCM in Vim which uses clangd.
Editor: Vim with YCM Operating system: ArchLinux
created time in a day
issue commentclangd/clangd
Include completion fails at the end of file
It reproduces if the file has no code in and the include brackets are unbalanced and followed by eof
comment created time in a day
issue closedclangd/clangd
Nonsense include suggestions in empty files
If you have an empty file and write #include <
then bring up completion, The results are less than ideal
I've tried to test a few configurations and I've narrowed it down as best as I can.
If there is any code in the file it will work, this could be as simple as a single ';' this bug wont reproduce.
It can be observed with both quoted and angle bracket includes.
The quotes/brackets can't be closed and must be followed directly with eof.
#include <{EOF}
, #include "{EOF}
both trigger this issue, However this doesn't as there is a new line:
#include <
{EOF}
System information
Output of clangd --version
: clangd version 12.0.0 (git@github.com:llvm/llvm-project.git d18c3c7b18e9e78145d701c4687682848071ab98) - been observed on released versions too.
Editor/LSP plugin: vscode 1.52.1/ vscode-clangd 0.19
Operating system: ubuntu 20.04.1
closed time in a day
njames93issue commentclangd/clangd
Nonsense include suggestions in empty files
Good point, but I think this repro is a little more informative
comment created time in a day