================ @@ -22,3 +29,21 @@ void pointee_uninit(void) { // checker, as described in the CallAndMessage comments! // CHECK: <key>issue_hash_content_of_line_in_context</key> // CHECK-SAME: <string>97a74322d64dca40aa57303842c745a1</string> + +typedef struct { + int i :2; + int :30; // unnamed bit-field +} B; + +extern void consume_B(B); + +void bitfield_B_init(void) { + B b1; + b1.i = 1; // b1 is initialized + consume_B(b1); +} + +void bitfield_B_uninit(void) { + B b2; + consume_B(b2); // arg-init-warning{{Passed-by-value struct argument contains uninitialized data (e.g., field: 'i') [core.CallAndMessage]}} +} ---------------- steakhal wrote:
Can you add a newline to the end to make GH happy? https://github.com/llvm/llvm-project/pull/145066 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits