Disallow dereferencing of void* in C++.
authorErich Keane <erich.keane@intel.com>
Tue, 4 Oct 2022 19:41:43 +0000 (12:41 -0700)
committerErich Keane <erich.keane@intel.com>
Mon, 10 Oct 2022 14:11:46 +0000 (07:11 -0700)
commit6685e56ceddf7c88eb3c39e838a8164941aade05
treed32a278cc76c842c9b5e8de06812eb4dded1454d
parent79150279268ae7b4da95750585a71f3df405fa6e
Disallow dereferencing of void* in C++.

as Discussed:
https://discourse.llvm.org/t/rfc-can-we-stop-the-extension-to-allow-dereferencing-void-in-c/65708

There is no good reason to allow this when the other compilers all
reject this, and it messes with SFINAE/constraint checking.

Differential Revision: https://reviews.llvm.org/D135287
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaExpr.cpp
clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp
clang/test/SemaCXX/disallow_void_deref.cpp [new file with mode: 0644]
clang/test/SemaCXX/reinterpret-cast.cpp