1

I'm working on an embedded system and need to limit clang to only the header files of the embedded system code while I'm editing its code. I need to make the following work:

  1. Make sure that company-mode with the clang backend only includes stuff inside the header files of the embedded system.

  2. Make sure that C-c C-e includes system headers of the embedded platform

In other words, if a file contains #include <stdio.h> it should look into the folder /home/<user>/src/include and not e.g. /usr/include. I assume this should be done by making sure that -nobuiltininc is always passed to clang together with the appropriate -I/home/<user>/src/include. My question is what should I put in the .dir-locals.el file under ~/src?

  • You need to set company-clang-arguments. Are you familiar with how to do that? – Dmitry May 11 '15 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.