[PATCH] D74103: Implement P1766R1: diagnose giving non-C-compatible classes a typedef name for linkage purposes.

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 5 18:57:49 PST 2020


rsmith created this revision.
rsmith added a reviewer: rjmccall.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Due to a recent (but retroactive) C++ rule change, only sufficiently
C-compatible classes are permitted to be given a typedef name for
linkage purposes. Add an enabled-by-default warning for these cases, and
rephrase our existing error for the case where we encounter the typedef
name for linkage after we've already computed and used a wrong linkage
in terms of the new rule.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74103

Files:
  clang/docs/ReleaseNotes.rst
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/Sema/SemaDecl.cpp
  clang/test/Analysis/inlining/eager-reclamation-path-notes.cpp
  clang/test/Analysis/padding_cpp.cpp
  clang/test/Analysis/padding_message.cpp
  clang/test/CXX/class/class.local/p4.cpp
  clang/test/CXX/class/class.union/p2-0x.cpp
  clang/test/CXX/drs/dr4xx.cpp
  clang/test/Modules/submodules-merge-defs.cpp
  clang/test/OpenMP/target_map_codegen.cpp
  clang/test/SemaCXX/anonymous-struct.cpp
  clang/test/SemaCXX/linkage.cpp
  clang/test/SemaCXX/linkage2.cpp
  clang/test/SemaCXX/undefined-internal.cpp
  clang/test/SemaCXX/warn-unused-filescoped.cpp
  clang/test/SemaCXX/warn-unused-local-typedef.cpp
  clang/test/SemaTemplate/instantiate-function-2.cpp
  clang/www/cxx_status.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74103.242798.patch
Type: text/x-patch
Size: 25824 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200206/882dc0f5/attachment-0001.bin>


More information about the cfe-commits mailing list