<div dir="ltr">Okay, I'm looking through the code to see if I can put together a patch. In this project, is it considered preferable to minimize the number of lines changed in the patch, or minimize the size of the code after the patch?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 2, 2015 at 9:55 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</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_quote"><span class=""><div dir="ltr">On Wed, Dec 2, 2015 at 10:47 AM Russell Wallace <<a href="mailto:russell.wallace@gmail.com" target="_blank">russell.wallace@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Then, if the database is not found, the tool can print a note like 'compilation database not found, using default options'.<br></div></blockquote><div><br></div></span><div>Ok, with that diagnostic I'd approve a change to that end.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 2, 2015 at 9:45 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</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_quote"><span><div dir="ltr">On Wed, Dec 2, 2015 at 10:43 AM Russell Wallace <<a href="mailto:russell.wallace@gmail.com" target="_blank">russell.wallace@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">There are none that are guaranteed to work in all cases; nonetheless, if Clang, GCC or Microsoft C++ is presented with a 'hello world' test program with no other options, it will successfully compile it with its built-in defaults, so the defaults for a tool should be those that Clang would use in the same circumstances. (I do have some ideas for automated search for the correct options if the defaults fail, but in the meantime 'do what the actual compiler would do' would be a good baseline.)<br></div></blockquote><div><br></div></span><div>The problem is that if this happens, it's hard to tell the user what they need to do to get the tool to work (set up a compilation database).</div><div>How about we add to the error if there is not compilation database how to run it in default mode (by adding -- at the end)?</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 2, 2015 at 9:39 AM, Manuel Klimek <span dir="ltr"><<a href="mailto:klimek@google.com" target="_blank">klimek@google.com</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_quote"><div><div><div dir="ltr">On Wed, Dec 2, 2015 at 10:35 AM Russell Wallace via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Tools built with LibTooling default to using a compilation database if one is available, which is good.<br><br>In the case where a compilation database is not available, there is a problem: the default behavior is to exit with an error message, whereas in some cases the tool would be required to do the best it can anyway. This can be achieved by adding -- to the end of the command line, but this wouldn't be obvious to someone unfamiliar with Clang tools.<br><br>One solution would be for the program to append -- to argv if it's not already present, but would this disable the default useful behavior of reading the compilation database if it is available?<br><br>If so, is there a way for the program to say 'okay, check for a compilation database as normal, but if it's not present, let me know and I'll fill in some best-guess default options'?<br></div></blockquote><div><br></div></div></div><div>The problem is that for C++ there really are no best guess default options. If you have ideas for what they should be, please make a proposal.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"></div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">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/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div>
</blockquote></div><br></div>
</blockquote></span></div></div>
</blockquote></div><br></div>
</blockquote></span></div></div>
</blockquote></div><br></div>