Sarcasm / irony-mode

A C/C++ minor mode for Emacs powered by libclang
GNU General Public License v3.0
906 stars 99 forks source link

LLVM10 Support #562

Closed yfy- closed 4 years ago

yfy- commented 4 years ago

Hello,

Does irony-server linked with libclang.so.10 work? My compilation database setup looks ok as I checked the output of irony-cdb-menu, but neither auto-completion nor flycheck-irony work properly.

I tried enforcing libclang.so.9 by defining LIBCLANG_LIBRARY ("-DLIBCLANG_LIBRARY=/usr/local/lib/libclang.so.9") but cmake gives a warning ("Manually specified variables were not used by the project") and still link with libclang.so.10. Any help is appreciated, thanks.

pcaspers commented 4 years ago

Hi, I am also trying to build the server against lib clang 10. I get a "could not parse file.cpp" from here. When changing the call to clang_parseTranslationUnit2(...) to get an error code back, I get 2 meaning the clang parser crashed.

yfy- commented 4 years ago

I have realized that the problem was something else. Irony works fine with libclang10. The problem for me was that STL C++ headers were not found by the libclang. However, running a command from the json database which executes clang++ works fine, it adds STL C++ header directories as include search paths (you can use -v flag to see).

I manually added the include search paths to the irony-additional-clang-options using the "-isystem" compiler flag.