[clang] No longer assert when using noderef on an _Atomic type (PR #116237)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 14 06:55:51 PST 2024


================
@@ -183,3 +183,8 @@ int *const_cast_check(NODEREF const int *x) {
 const int *const_cast_check(NODEREF int *x) {
   return const_cast<const int *>(x); // expected-warning{{casting to dereferenceable pointer removes 'noderef' attribute}}
 }
+
+namespace GH116124 {
+// This declaration would previously cause a failed assertion.
+int *_Atomic a __attribute__((noderef));
----------------
erichkeane wrote:

I see you removed the bit that causes a warning, I would expect this to still warn, right?  Can you explain that?

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


More information about the cfe-commits mailing list