[PATCH] D135287: Disallow dereferencing of void* in C++.

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 5 10:40:46 PDT 2022


erichkeane added inline comments.


================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:6938
+def ext_typecheck_indirection_through_void_pointer_cpp
+    : ExtWarn<"ISO C++ does not allow indirection on operand of type %0">,
+      // Note: This uses a different diagnostics group than the C diagnostic
----------------
cor3ntin wrote:
> erichkeane wrote:
> > Bikeshedding appreciated here :)  Note that the diagnostic ALSO will show up in SFINAE/Concepts explanations, so we can't just say "will be removed" or something.
> > 
> The usual terminology is dereferencing. `"ISO C++ does not allow dereferencing a `void*`"
Yeah, I thought the 'indirection' phrasing in the diagnostic above was strange as well, but figured I'd be consistent until someone came up with a good replacement here :) 


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

https://reviews.llvm.org/D135287



More information about the cfe-commits mailing list