<div dir="ltr">Stanislav,<div><br></div><div>I believe this functionality is already in clang-tidy (look at clang-tools-extra/test/clang-tidy/readability-function-size.cpp test; "readability-function-size.BranchThreshold" option essentially computes cyclomatic complexity, though it does so in a non-traditional way -- which actually might produce more useful results for C++ developers).</div><div><br></div><div>Yours,</div><div>Andrey</div><div>=====</div><div>Software Engineer</div><div>Intel Compiler Team</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 21, 2016 at 10:45 AM, Stanislav Pankevich 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">Hello everyone,<br>
<br>
I skimmed through available checkers in Clang Static Analyzer [1] and didn’t find a checker for cyclomatic complexity.<br>
<br>
My assumption is that checker is not implemented because it doesn’t help to find bugs directly [2]. However I believe that this checker would help to reduce a number of bugs indirectly by decreasing a complexity of a source code.<br>
<br>
Is there a way to see this checker in the upstream? If not what would be the best way to have it?<br>
<br>
[1] <a href="http://clang-analyzer.llvm.org/available_checks.html" rel="noreferrer" target="_blank">http://clang-analyzer.llvm.org/available_checks.html</a><br>
[2] By definition, "The Clang Static Analyzer is a source code analysis tool that finds bugs in C, C++, and Objective-C programs.” (from <a href="http://clang-analyzer.llvm.org/index.html" rel="noreferrer" target="_blank">http://clang-analyzer.llvm.org/index.html</a>)<br>
<br>
Thanks.<br>
<span class="HOEnZb"><font color="#888888"><br>
Stanislav<br>
<br>
</font></span><br>_______________________________________________<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/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>