Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [clang]

The tag has no usage guidance.

0
votes
1answer
14 views

How to clang-format the current buffer on save?

Whats the best way to clang-format a C/C++/GLSL a buffer on save, that does nothing in the case there is no clang-format file found for a project?
0
votes
0answers
43 views

company mode with clang

I am trying to get completion to work with company-clang. In particular, I would like to get completion candidates that are from header files that I provide with dir-locals.el When I look at the ...
0
votes
0answers
149 views

clang-format malfunctioning(?) Or am I not fully understanding how clang-format works?

I installed the clang-format package from melpa. I then added the following lines to my init file: (require 'clang-format) I then created a test directory, cpp-proj with one file, main.cpp. main....
1
vote
0answers
98 views

Structures are defined using a macro, flycheck gives errors

In our source code we surround structures with a macro (MKDIFF) that serves as a flag for the Makefile system. It does not expand into anything, just a flag. Flycheck (understandably) flags these ...
2
votes
0answers
190 views

Flycheck c/c++-clang check linux kernel headers

Currently I am working with the linux kernel, but I am struggling trying to check my syntax using flycheck, I already added the path of the headers in the clang-path but it is not enough. Does any of ...
0
votes
1answer
361 views

How do you add command line options to flycheck's C++ checker?

I needed to specify stdlib options in a certain environment, so I changed the flycheck executable to clang -std=c++11 -stdlib=libc++, which is needed to compile the file. However, I got the error ...
2
votes
1answer
1k views

How to use clang-format package?

I installed clang-format package from the MELPA repository. I added it to the load-path in my init file. Whenever I try to use it it says: Searching for program: No such file or directory, clang-...
1
vote
1answer
971 views

company-mode clang error

I am following this tutorial When having enabled company-node upon typing for instance std::vec I get error message in the mini buffer saying: clang failed with error 1: /usr/bin/clang -fsyntax-only ...
0
votes
1answer
2k views

How to configure flycheck (c/c++-clang) to ignore some files or directories?

My C++ code use third-party library, so I have to add the library path to flycheck-clang-include-path to avoid can't find header file error. But I don't want flycheck to do the syntax check on that ...
1
vote
2answers
2k views

customize the clang format

I know I can create a .clang-format file, and use this per project, but what I'd really like is a way to set the default clang-format style to one of the available formats, so I can experiment with ...