Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

clang-tidy can take a long time to run for -checks=clang-analyzer-llvm.Conventions #20623

Open Quuxplusone opened 10 years ago

Quuxplusone commented 10 years ago
Bugzilla Link PR20624
Status NEW
Importance P normal
Reported by Jim Grosbach (grosbach@apple.com)
Reported on 2014-08-11 16:46:39 -0700
Last modified on 2014-08-20 03:33:18 -0700
Version unspecified
Hardware PC All
CC alexfh@google.com, djasper@google.com, klimek@google.com, llvm-bugs@lists.llvm.org
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
enkidu: ~/sources/llvm $ time ~/sources/build-llvm-ra/bin/clang-tidy -p
~/sources/build-llvm-ra -checks=clang-analyzer-llvm.Conventions
lib/Target/AArch64/AArch64ISelLowering.cpp
Suppressed 254 warnings (254 in non-user code).
Use -header-filter='.*' to display errors from all non-system headers.

real    0m48.818s
user    0m47.744s
sys 0m0.809s

Not sure what sorts of times I should be expecting here. This is a moderately
beefy system, though. 3.4 GHhz Ivy Bridge iMac, 16GB RAM, SSD.
Quuxplusone commented 10 years ago
Well, if you want to run only clang-analyzer-llvm.Conventions, you should
specify -checks=-*,clang-analyzer-llvm.Conventions. With just one check, clang-
tidy analyzes this file on my machine in ~39s. Just parsing of this file takes
~3s, so the rest time is spent inside the static analyzer.

Static analyzer folks may want to take a look at why analyzing this file takes
so much time.