]> granicus.if.org Git - clang/commit
[analyzer] Suppress reports coming from std::__independent_bits_engine
authorAnna Zaks <ganna@apple.com>
Wed, 6 Jan 2016 00:32:52 +0000 (00:32 +0000)
committerAnna Zaks <ganna@apple.com>
Wed, 6 Jan 2016 00:32:52 +0000 (00:32 +0000)
commit7594f317602670684384bc6358608f549ac2b72f
tree37b2f6154309f79e904eae084a5fdfac70e02536
parent8cc8e2a0fbf4b25e7539e80b0cbe4cc3818025d2
[analyzer] Suppress reports coming from std::__independent_bits_engine

The analyzer reports a shift by a negative value in the constructor. The bug can
be easily triggered by calling std::random_shuffle on a vector
(<rdar://problem/19658126>).

(The shift by a negative value is reported because __w0_ gets constrained to
63 by the conditions along the path:__w0_ < _WDt && __w0_ >= _WDt-1,
where _WDt is 64. In normal execution, __w0_ is not 63, it is 1 and there is
no overflow. The path is infeasible, but the analyzer does not know about that.)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@256886 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
test/Analysis/Inputs/system-header-simulator-cxx.h
test/Analysis/inlining/stl.cpp