[PATCH] D77168: Add a flag to debug automatic variable initialization

JF Bastien via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 31 17:39:36 PDT 2020


jfb added a comment.

I'd much rather see folks bisect using something like:

  void use(void*);
  
  #pragma clang attribute push ([[clang::uninitialized]], apply_to = variable)
  void buggy() {
      int arr[256];
      int boom;
      float bam;
      struct { int oops; } oops;
      union { int oof; float aaaaa; } oof;
  
      use(&arr);
      use(&boom);
      use(&bam);
      use(&oops);
      use(&oof);
  }
  #pragma clang attribute pop

This should be easy to add support for.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77168/new/

https://reviews.llvm.org/D77168





More information about the cfe-commits mailing list