-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
false diagnostics with -fopenmp #113
Comments
@acowley seems to have the same issue. I'll investigate what |
Yes, I add it as a filtered flag to the ccls startup options. The only downside is warnings about unknown openmp pragmas in my code. |
With clang trunk, I cannot reproduce the spurious diagnostic with hg clone https://bitbucket.org/eigen/eigen
git clone https://github.com/google/glog
cd glog; ./autogen.sh; ./configure; make -j and Have you tried running
|
|
Sorry I can reproduce it, with either head or 3.3.5 It is an issue of preamble building with In - std::shared_ptr<PreambleData> preamble = session->GetPreamble();
std::shared_ptr<PreambleData> preamble; "use of undeclared identifier" is the fallout of an earlier issue.
|
To me it looks like this is actually very similar to the "-Werror leads to spurious diagnostics" case. It is an issue of preamble building with both SkipFunctionBodies and -fopenmp. Eigen/src/Core/products/Parallelizer.h:134:15 is a pragma clause related to OpenMP, it references a local variable which is skipped because of SkipFunctionBodies, but the pragma itself is not skipped, thus the error. |
@Riatre I feel this same. When I get more time I'll study more about clang's lexer/parser. |
another MVE for this
|
FYI this is still very much an issue in LLVM 9.0.1, with the latest ccls at time of writing. Turning off openmp in a project that utilizes Eigen fixes all the false diagnostics. Obviously, not a great option for development, but doable for now, would like to see a fix if possible, can help if needed. |
Latest ccls compiled with LLVM 7.
-fopenmp
causes false diagnostics.I just remove
-fopenmp
fromargs
manually at the time. May not be a good solution.The text was updated successfully, but these errors were encountered: