<div dir="ltr">Hi,<div><br></div><div>I think the usual way to do this is to disable checks and then select the ones you need. It's not a bug, it's a feature.</div><div><br></div><div>Matthieu</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 26 oct. 2019 à 11:55, Alexander Lanin via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Done, thanks.<br>
<a href="https://bugs.llvm.org/show_bug.cgi?id=43816" rel="noreferrer" target="_blank">https://bugs.llvm.org/show_bug.cgi?id=43816</a><br>
<br>
<br>
-----Ursprüngliche Nachricht-----<br>
Von: Jonas Toth <<a href="mailto:development@jonas-toth.eu" target="_blank">development@jonas-toth.eu</a>> <br>
Gesendet: Donnerstag, 24. Oktober 2019 20:13<br>
An: Alexander Lanin <<a href="mailto:alex@lanin.de" target="_blank">alex@lanin.de</a>>; <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
Betreff: Re: [cfe-dev] Using clang-tidy to fix compiler errors<br>
<br>
Hi Alexander,<br>
<br>
clang-tidy runs the frontend first, so if the frontend detects errors it will report them as well.<br>
<br>
There is a feature in the frontend itself that tries to fix bugs, e.g.<br>
s"foo.method()"/"foo->method()" fixits can be emitted.<br>
<br>
I think that is closer to what you want and might be a better place to request that feature.<br>
<br>
Best Regards<br>
Jonas<br>
<br>
Am 22.10.19 um 00:59 schrieb Alexander Lanin via cfe-dev:<br>
> Hello,<br>
><br>
> clang-tidy can not only be used to improve code, but also to make it <br>
> work in the first place.<br>
><br>
> Taking an example from<br>
> <a href="https://github.com/llvm-mirror/clang/blob/master/test/SemaTemplate/dep" rel="noreferrer" target="_blank">https://github.com/llvm-mirror/clang/blob/master/test/SemaTemplate/dep</a><br>
> endent<br>
> -template-recover.cpp<br>
><br>
>     template<typename T, typename U, int N><br>
>     struct X {<br>
>       void f(T* t) {<br>
>         t->f0<U>(); // expected-error{{use 'template' keyword to treat 'f0'<br>
> as a dependent template name}}<br>
>       }<br>
>     };<br>
><br>
> Clang-tidy is capable of fixing that error.<br>
> However it's not possible to fix it without running any other checks?!<br>
> e.g. this works fine: clang-tidy --checks="*" test.cpp -fix-errors but <br>
> it performs all sorts of other changes.<br>
><br>
> The best approach seems to be to pick some checker that doesn't find <br>
> anything in order to fix only errors ?!<br>
><br>
> Thanks,<br>
> Alexander Lanin<br>
><br>
><br>
> _______________________________________________<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="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br>
_______________________________________________<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="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Quantitative researcher, Ph.D.<br>Blog: <a href="http://blog.audio-tk.com/" target="_blank">http://blog.audio-tk.com/</a><br>LinkedIn: <a href="http://www.linkedin.com/in/matthieubrucher" target="_blank">http://www.linkedin.com/in/matthieubrucher</a></div></div></div></div></div></div></div>