[PATCH] D74684: [Sema][C++] Adopt DR2171 relaxed triviality requirements

Richard Smith - zygoloid via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 25 10:56:59 PST 2020


rsmith added a comment.

This change should be guarded by `-fclang-abi-compat=` so that users can opt to using the old ABI.



================
Comment at: clang/lib/Sema/SemaDeclCXX.cpp:9200-9202
-  // C++11 [class.copy]p12, p25: [DR1593]
-  //   A [special member] is trivial if [...] its parameter-type-list is
-  //   equivalent to the parameter-type-list of an implicit declaration [...]
----------------
There is corresponding code in lib/AST/DeclCXX.cpp that attempts to determine whether special members are trivial "on the fly" (without performing overload resolution etc). Please check whether that needs to be updated too.


================
Comment at: clang/test/CXX/class/class.union/p1.cpp:94-96
-  struct s8 {
-    s8(...) = delete; // expected-note {{because it is a variadic function}} expected-warning {{C++11}}
-  } m8; // expected-error {{union member 'm8' has a non-trivial default constructor}}
----------------
Do we still have test coverage for this somewhere? It'd generally be good to keep around the old tests but with updated diagnostic expectations.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74684





More information about the cfe-commits mailing list