[clang] [analyzer] Fix crash in BasicValueFactory.cpp with __int128_t integers (PR #67212)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 2 05:07:03 PDT 2023


================
@@ -0,0 +1,10 @@
+// RUN: %clang_analyze_cc1 -analyzer-checker=optin.portability.UnixAPI \
+// RUN:    -triple x86_64-pc-linux-gnu -x c %s
+
+// Don't crash!
+// expected-no-diagnostics
+const __int128_t a = ( (__int128_t)1 << 64 );
----------------
AaronBallman wrote:

It'd be good to add a test case using `_BitInt(72)` or something along those lines to ensure we handle that properly as well.

https://github.com/llvm/llvm-project/pull/67212


More information about the cfe-commits mailing list