]> granicus.if.org Git - clang/commit
[analyzer] Add support for __builtin_constant_p.
authorArtem Dergachev <artem.dergachev@gmail.com>
Sat, 10 Feb 2018 00:51:47 +0000 (00:51 +0000)
committerArtem Dergachev <artem.dergachev@gmail.com>
Sat, 10 Feb 2018 00:51:47 +0000 (00:51 +0000)
commit6e050d9bef4498d98610a01e548dce3e8814bb0d
tree66fae4a0f75d412e381bab8c0100c70a8c0dc0ab
parent1774e274acf780c3ca203e40f8968f5fee1682c2
[analyzer] Add support for __builtin_constant_p.

This builtin is evaluated in compile time. But in the analyzer we don't yet
automagically evaluate all calls that can be evaluated in compile time.

Patch by Felix Kostenzer!

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@324789 91177308-0d34-0410-b5e6-96231b3b80d8
lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp
test/Analysis/builtin-functions.cpp