Skip to content

Commit b1ecf05

Browse files
authored
Disable clang static analyzer in clang-tidy (#2136)
clang-tidy by default enables two groups of checks: clang-diagnostic-* and clang-analyzer-*. Between the two, clang-analyzer is a static analyzer, but it seems to often produces false warnings. For example, when you write `object->someFunction()`, if it is not sure if object is not a NULL, i.e., if there's no assert(object) before, it produces a warning. This is sometimes annoying and inserting `assert` everywhere does not seem to be very appealing. I also noticed LLVM and V8 also disabled this analyzer. `-*` disables all checks. Then I re-enabled clang-diagnostic and readability-braces-around-statements.
1 parent 257a4c5 commit b1ecf05

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.clang-tidy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Checks: 'readability-braces-around-statements'
1+
Checks: '-*,clang-diagnostic-*,readability-braces-around-statements'
22
CheckOptions:
33
- key: readability-identifier-naming.ClassCase
44
value: CamelCase

0 commit comments

Comments
 (0)