getAPSIntType crashes when analzying a simple case that uses a fixed
point type. getAPSIntType needs to handle fixed point types differently
to get sign information. LIT and Unittests were added since there were
none previously added.
clang: <root>/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:155: clang::ento::APSIntType clang::ento::BasicValueFactory::getAPSIntType(clang::QualType) const: Assertion `T->isIntegralOrEnumerationType() || Loc::isLocType(T)' failed. Program received signal SIGABRT, Aborted. 0x00007ffff66e2387 in raise () from /lib64/libc.so.6 (gdb) bt at <root>/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:155 at <root>/clang/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h:172 LHS=0x108965a0, op=clang::BO_Shr, RHS=..., resultTy=...) at <root>/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:213 (this=0x1088e460, state=..., op=clang::BO_Shr, lhs=..., rhs=..., resultTy=...) at <root>/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp:681
I was thinking of using isFixedPointOrIntegerType(). However, that would not accept scoped enums.
It looked so neat at first. Ah. I just had to share this.