diff --git a/clang/unittests/StaticAnalyzer/SValTest.cpp b/clang/unittests/StaticAnalyzer/SValTest.cpp --- a/clang/unittests/StaticAnalyzer/SValTest.cpp +++ b/clang/unittests/StaticAnalyzer/SValTest.cpp @@ -143,11 +143,19 @@ // Actual tests //===----------------------------------------------------------------------===// +#ifdef _AIX +SVAL_TEST(DISABLED_GetConstType, R"( +void foo() { + int x = 42; + int *y = nullptr; +})") { +#else SVAL_TEST(GetConstType, R"( void foo() { int x = 42; int *y = nullptr; })") { +#endif SVal X = getByName("x"); ASSERT_FALSE(X.getType(Context).isNull()); EXPECT_EQ(Context.IntTy, X.getType(Context)); @@ -157,12 +165,21 @@ EXPECT_EQ(Context.getUIntPtrType(), Y.getType(Context)); } +#ifdef _AIX +SVAL_TEST(DISABLED_GetLocAsIntType, R"( +void foo(int *x) { + long int a = (long int)x; + unsigned b = (long unsigned)&a; + int c = (long int)nullptr; +})") { +#else SVAL_TEST(GetLocAsIntType, R"( void foo(int *x) { long int a = (long int)x; unsigned b = (long unsigned)&a; int c = (long int)nullptr; })") { +#endif SVal A = getByName("a"); ASSERT_FALSE(A.getType(Context).isNull()); // TODO: Turn it into signed long