================ @@ -0,0 +1,48 @@ +// RUN: %clang_cc1 %s -verify -fsyntax-only -triple x86_64-pc-linux-gnu +typedef int __attribute__((wraps)) wrapping_int; ---------------- JustinStitt wrote:
> Can we test more types? Yes, I'll add some more tests 😄 > > Can the attributes be applied to pointers? Both the pointer itself and the > pointee? It's worth adding tests, just to ensure nothing regresses here. Pointers no: ``` warning: using attribute 'wraps' with non-integer type 'char *' has no function and is potentially misleading [-Wuseless-wraps-attribute] 2 | char *A __attribute__((wraps)); ``` pointees yes: ``` char B __attribute__((wraps)) = 127; char *A = &B; (++B); // no -fsanitize=implicit-signed-integer-truncation splat! ``` https://github.com/llvm/llvm-project/pull/115094 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits