]> granicus.if.org Git - clang/commit
Analyzer: Teach analyzer how to handle TypeTraitExpr
authorIsmail Pazarbasi <ismail.pazarbasi@gmail.com>
Tue, 22 Sep 2015 19:33:15 +0000 (19:33 +0000)
committerIsmail Pazarbasi <ismail.pazarbasi@gmail.com>
Tue, 22 Sep 2015 19:33:15 +0000 (19:33 +0000)
commit838cb5dcc14a6f1e5217110e314b520ee5f1cee5
treeea8153bbfbb83b356d61b8ce1373cc0876b4a0c5
parent675c6b4346cdde41712c89a9c80cb4d1ffb7267e
Analyzer: Teach analyzer how to handle TypeTraitExpr

Summary:
`TypeTraitExpr`s are not supported by the ExprEngine today. Analyzer
creates a sink, and aborts the block. Therefore, certain bugs that
involve type traits intrinsics cannot be detected (see PR24710).

This patch creates boolean `SVal`s for `TypeTraitExpr`s, which are
evaluated by the compiler.

Test within the patch is a summary of PR24710.

Reviewers: zaks.anna, dcoughlin, krememek

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12482

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@248314 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Core/Environment.cpp
lib/StaticAnalyzer/Core/ExprEngine.cpp
lib/StaticAnalyzer/Core/SValBuilder.cpp
test/Analysis/dtor.cpp