[PATCH] D40737: [clang-tidy] Resubmit hicpp-multiway-paths-covered without breaking test
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 1 10:15:53 PST 2017
JonasToth created this revision.
Herald added subscribers: cfe-commits, xazax.hun, mgorny.
The original check did break the green buildbot in the sanitizer build.
It took a while to redroduce and understand the issue.
There occured a stackoverflow while parsing the AST. The testcase with
256 case labels was the problem because each case label added another
stackframe. It seemed that the issue occured only in 'RelWithDebInfo' builds
and not in normal sanitizer builds.
To simplify the matchers the recognition for the different kinds of switch
statements has been moved into a seperate function and will not be done with
ASTMatchers. This is an attempt to reduce recursion and stacksize as well.
The new check removed this big testcase. Covering all possible values is still
implemented for bitfields and works there. The same logic on integer types
will lead to the issue.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D40737
Files:
clang-tidy/hicpp/CMakeLists.txt
clang-tidy/hicpp/HICPPTidyModule.cpp
clang-tidy/hicpp/MultiwayPathsCoveredCheck.cpp
clang-tidy/hicpp/MultiwayPathsCoveredCheck.h
docs/ReleaseNotes.rst
docs/clang-tidy/checks/hicpp-multiway-paths-covered.rst
docs/clang-tidy/checks/list.rst
test/clang-tidy/hicpp-multiway-paths-covered-else.cpp
test/clang-tidy/hicpp-multiway-paths-covered.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40737.125170.patch
Type: text/x-patch
Size: 22380 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171201/19423bbf/attachment-0001.bin>
More information about the cfe-commits
mailing list