[clang] Diagnose misuse of the cleanup attribute (PR #80040)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 12 05:42:04 PST 2024


================
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 %s -verify -fsyntax-only
+// RUN: %clang_cc1 -Wfree-nonheap-object -fsyntax-only -verify %s
 
 void c1(int *a);
-
+typedef unsigned long size_t;
----------------
AaronBallman wrote:

```suggestion
typedef __typeof__(sizeof(0)) size_t;
```

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


More information about the cfe-commits mailing list