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
Allow arbitrary commandline arguments for the clang checker #207
Comments
@sethfowler I won't allow arbitrary command lines for syntax checkers. In many cases, error parsing depends on a given set of flags, and would break if arbitrary flags were passed. Tell me, which concrete flags you need, and I'll add corresponding options. |
Off hand I know I'd need |
I'll add these. |
Thanks so much! I looked over the compiler arguments used by our code and I think the only one not listed above that could affect flycheck results is |
@sethfowler Do you really need |
@sethfowler Do you have some example code to trigger RTTI warnings with |
@lunaryorn Yes, I need |
@lunaryorn I'm surprised, but you're right: clang does not warn about this. I remembered GCC warning about this, but in fact it gives an error rather than warning:
|
@sethfowler I meant no offense. I was just really surprised, for I never saw this option. In fact I didn't even know it existed. Just being curious: Do you have a concrete example for how this option is being used? Of course, if you need it, I'll add it. I'll also add |
I have added the requested options:
The first is a simple boolean flag, the second a string with the name of the standard, and the last two are lists of strings, where each string is a include file or definition respectively. If anything is unclear, please read the docstrings of these variables, and do not hesitate to ask further questions. |
@lunaryorn Sorry, tone is tricky on the internet, and I can see now that I didn't do a good job of saying what I was trying to say above. No offense meant or taken. =) Gecko (which is the project I mentioned that uses I really appreciate you adding all of these options! This is fantastic; I look forward to using them. |
Thanks for your explanation. I already figured that it would be used for this purpose, and it sounds reasonable. I have never seen this before, though. Hitherto I thought the typical way to deal with a lot of configuration
You are welcome. Please do not hesitate to open further issues, should you need more options for Clang. |
It'd be great if we could send arbitrary commandline arguments to clang. Right now there's
flycheck-clang-warnings
andflycheck-clang-include-path
, but some codebases I work on need a more complicated set of flags or else I get spurious warnings. I can easily write elisp to produce the appropriate flags for a file, but there doesn't seem to be any way for me to pass that information to flycheck. Ideally,flycheck-clang-arguments
or something along those lines would exist and would get appended to the other clang arguments.The text was updated successfully, but these errors were encountered: