Go to file
Jordan Rose 61e221f68d [analyzer] Replace isIntegerType() with isIntegerOrEnumerationType().
Previously, the analyzer used isIntegerType() everywhere, which uses the C
definition of "integer". The C++ predicate with the same behavior is
isIntegerOrUnscopedEnumerationType().

However, the analyzer is /really/ using this to ask if it's some sort of
"integrally representable" type, i.e. it should include C++11 scoped
enumerations as well. hasIntegerRepresentation() sounds like the right
predicate, but that includes vectors, which the analyzer represents by its
elements.

This commit audits all uses of isIntegerType() and replaces them with the
general isIntegerOrEnumerationType(), except in some specific cases where
it makes sense to exclude scoped enumerations, or any enumerations. These
cases now use isIntegerOrUnscopedEnumerationType() and getAs<BuiltinType>()
plus BuiltinType::isInteger().

isIntegerType() is hereby banned in the analyzer - lib/StaticAnalysis and
include/clang/StaticAnalysis. :-)

Fixes real assertion failures. PR15703 / <rdar://problem/12350701>

llvm-svn: 179081
2013-04-09 02:30:33 +00:00
clang [analyzer] Replace isIntegerType() with isIntegerOrEnumerationType(). 2013-04-09 02:30:33 +00:00
clang-tools-extra Fix UseNullptr fails to replace explict casts surrounded by another implicit 2013-04-05 20:32:36 +00:00
compiler-rt Revert r179012: "[msan] Intercept glob()." 2013-04-08 20:59:44 +00:00
debuginfo-tests Remove IR scenario tests. 2013-03-15 20:52:10 +00:00
libclc Update the copyright coredits -- Happy new year 2013! 2013-01-01 10:00:19 +00:00
libcxx Change <cwchar> and <cstring> to look out for flags which may or may not be set by the C headers <wchar.h> and <string.h> indicating C support for the C++-altered wcschr, wcspbrk, wcsrchr, wcsstr, wmemchr, strchr, strpbrk, strrchr, memchr, and strstr. This was already done in <cstring> for other platforms using other flags, so just had to add one more flag to the list there. 2013-04-08 18:59:28 +00:00
libcxxabi Bruce Mitchener: Typo fixes. 2013-02-15 15:48:49 +00:00
lld Add VTune as an optional external dependency and add task tracking. 2013-04-06 00:56:40 +00:00
lldb Fixed the way we allocate executable memory on 2013-04-09 01:13:08 +00:00
llvm More uses for SymbolTableEntryBase. 2013-04-09 01:04:06 +00:00
polly IndependentBlocks: translate out of SSA all uses escaping the region 2013-04-08 13:05:41 +00:00