<div dir="ltr">I think that you can use `clang::createInvocationFromCommandLine` to parse your compiler arguments into an instance of CompilerInvocation. Then you can call `CompilerInstance::setInvocation` to update the invocation in your compiler instance.<div><br></div><div>I hope that helps,</div><div>Alex</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 7 November 2016 at 10:41, peter jacobsen via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Hi,</div><div class="gmail_extra"><br></div><div class="gmail_extra">I am developing a static analyzer using clang. I setup a CompilerInstance, ASTConsumer etc. as copied from a number of examples. I would like to know how to set compiler options. In particular I would like to suppress 'warning: expression result unused' (-Wunused-value)</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks,</div><div class="gmail_extra"><br></div><div class="gmail_extra">peter</div></div>
<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>