Skip to content

Disable clang static analyzer in clang-tidy#2136

Merged
aheejin merged 1 commit intoWebAssembly:masterfrom
aheejin:disable_clang_analyzer
May 23, 2019
Merged

Disable clang static analyzer in clang-tidy#2136
aheejin merged 1 commit intoWebAssembly:masterfrom
aheejin:disable_clang_analyzer

Conversation

@aheejin
Copy link
Copy Markdown
Member

@aheejin aheejin commented May 23, 2019

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.

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.
@aheejin aheejin requested a review from kripken May 23, 2019 06:50
Copy link
Copy Markdown
Member

@tlively tlively left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@aheejin aheejin merged commit b1ecf05 into WebAssembly:master May 23, 2019
@aheejin aheejin deleted the disable_clang_analyzer branch May 23, 2019 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants