[all-commits] [llvm/llvm-project] 6685e5: Disallow dereferencing of void* in C++.

Erich Keane via All-commits all-commits at lists.llvm.org
Mon Oct 10 07:12:04 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6685e56ceddf7c88eb3c39e838a8164941aade05
      https://github.com/llvm/llvm-project/commit/6685e56ceddf7c88eb3c39e838a8164941aade05
  Author: Erich Keane <erich.keane at intel.com>
  Date:   2022-10-10 (Mon, 10 Oct 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/p1inst.cpp
    A clang/test/SemaCXX/disallow_void_deref.cpp
    M clang/test/SemaCXX/reinterpret-cast.cpp

  Log Message:
  -----------
  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




More information about the All-commits mailing list