Comments (6)
warning: argument unused during compilation: '-Wall'
The command line used in compile_commands.json
will be more helpful.
https://github.com/MaskRay/ccls/wiki/FAQ#diagnostics-in-headers
from emacs-ccls.
{
"directory": "/MY_BUILD_DIR/src",
"command": "/usr/bin/c++ -DIO_USE_ASSIMP -DIO_USE_CAMERA_LOADER -DIO_USE_TINYPLY -DQT_CORE_LIB -DQT_GUI_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -DRA_ENGINE_EXPORTS -DradiumEngine_EXPORTS -I/MY_BUILD_DIR/src -I/MY_PROJECT_DIR/src -I/MY_PROJECT_DIR/Bundle-GNU/3rdPartyLibraries/include -isystem /usr/include/x86_64-linux-gnu/qt5 -isystem /usr/include/x86_64-linux-gnu/qt5/QtOpenGL -isystem /usr/include/x86_64-linux-gnu/qt5/QtWidgets -isystem /usr/include/x86_64-linux-gnu/qt5/QtGui -isystem /usr/include/x86_64-linux-gnu/qt5/QtCore -isystem /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -Wall -Wextra -pthread -msse3 -Wno-sign-compare -Wno-unused-parameter -D_DEBUG -DCORE_DEBUG -g3 -ggdb -g -fPIC -Wno-ignored-attributes -Wno-misleading-indentation -Wno-unknown-pragmas -fPIC -std=c++17 -o CMakeFiles/radiumEngine.dir/Engine/Component/Component.cpp.o -c /MY_PROJECT_DIR/src/Engine/Component/Component.cpp",
"file": "/MY_PROJECT_DIR/src/Engine/Component/Component.cpp"
},
I just notice I also get some Error from the Language Server: failed to index MY_SOURCE_FILE (Internal Error)
from emacs-ccls.
Any suggestions ? I read the FAQ but it do not help me so much.
At least how can I get "simple" syntax highlighting (now everything is fontified like comments)
Seems like a header is included two time, the #define guard make the header as not to be defined (and so fontify like comments).
from emacs-ccls.
warning: argument unused during compilation: '-Wall'
The problem is that you have some flags changing the compilation mode in a way that these flags are all considered unused. I recommend starting from no flags and gradually adding them.
I just notice I also get some Error from the Language Server: failed to index MY_SOURCE_FILE (Internal Error)
When a file fails to parse, there is no index information and you'll see such error message.
from emacs-ccls.
Here is a minimal example. The thing is that if compile command have a -DDEBUG that is #undef then #define it produce a ccls warning. I dunno if it's correct or not, but seems strange for me.
from emacs-ccls.
warning: argument unused during compilation: '-Wall'
I believe you have misconfigured something.
Change you wrapper script to: ccls -log-file=/tmp/ccls.log -v=1 "$@"
-v=1
will give you the command line used to parse files, e.g.
12:11:34 indexer2 pipeline.cc:310 I parse /tmp/Downloads/ex/main.cpp
/usr/bin/c++ -DDEBUG -std=c++17 -o out.o -c /tmp/Downloads/ex/main.cpp -working-directory=/tmp/Downloads/ex
exemple.zip
This example works fine for me.
If you have some non self-contained header files, the PR just gets merged may help you MaskRay/ccls#171
e.g. .ccls
:
%compile_commands.json
%h -DH
from emacs-ccls.
Related Issues (20)
- c++17, std::optional HOT 1
- Header files not found with emacs-ccls, but works fine at vscode. HOT 1
- imenu: show static member variable instead of function
- Help wanted with configuration: C++ headers not found HOT 1
- conditional highlights doesn't work HOT 2
- Is there a way to manually suspend/resume ccls indexing?
- ccls stuck in "starting"
- Cannot find the references via ccls.xref HOT 2
- Open all hierachy tree at once
- Customize initialization options in S-exp has no effect HOT 1
- Multi-root project setup HOT 2
- Compilation warnings (as of 29.3)
- Using function prototypes auto-completion has strange behavior
- (void-function lsp:ccls-semantic-highlight-symbol-ranges). HOT 11
- use eval-and-compile instead of eval-when-compile HOT 1
- Function definition lsp:ccls-call-children is void HOT 3
- imenu not showing symbol types HOT 3
- Help with .ccls file config: Header file correctly parsed but "file not found" error appears.
- can not jump to std definition
- How to prevent buffers *ccls-tree call/inheritance hierarchy to use same window than buffer Treemacs ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-ccls.