]> granicus.if.org Git - clang/commit
[analyzer] Fix a crash on logical operators with vectors.
authorArtem Dergachev <artem.dergachev@gmail.com>
Wed, 8 Nov 2017 17:27:58 +0000 (17:27 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Wed, 8 Nov 2017 17:27:58 +0000 (17:27 +0000)
commita9a85a6f7686a079146debf56cec182ed6c884f7
treed439fd76a1a1e840400cbfefd67f2f057a5e88c6
parentdae5d856a417d34cf39731e2604d644e4108bdfc
[analyzer] Fix a crash on logical operators with vectors.

Do not crash when trying to compute x && y or x || y where x and y are
of a vector type.

For now we do not seem to properly model operations with vectors. In particular,
operations && and || on a pair of vectors are not short-circuit, unlike regular
logical operators, so even our CFG is incorrect.

Avoid the crash, add respective FIXME tests for later.

Differential Revision: https://reviews.llvm.org/D39682

rdar://problem/34317663

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@317700 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/ExprEngineC.cpp
test/Analysis/vector.c [new file with mode: 0644]