llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.24k stars 11.66k forks source link

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

Open llvmbot opened 10 years ago

llvmbot commented 10 years ago
Bugzilla Link 20624
Version unspecified
OS All
Reporter LLVM Bugzilla Contributor

Extended Description

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.

llvmbot 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.

llvmbot commented 10 years ago

assigned to @tkremenek