[PATCH] D113694: [Clang] Conform to C++17 definition of literal types

Léo Lam via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 11 10:24:19 PST 2021


leoetlino created this revision.
leoetlino requested review of this revision.
Herald added a project: clang.

C++17 changed the definition of literal types so that unions that
have at least one non-static data member of non-volatile literal type
are also considered literal types.

This patch implements that new rule and also adds a test for closure
types (10.5.2) and for unions (10.5.3) to the existing test file for
literal types.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D113694

Files:
  clang/include/clang/AST/CXXRecordDeclDefinitionBits.def
  clang/include/clang/AST/DeclCXX.h
  clang/lib/AST/DeclCXX.cpp
  clang/test/CXX/basic/basic.types/p10.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113694.386580.patch
Type: text/x-patch
Size: 6491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211111/b9d04511/attachment-0001.bin>


More information about the cfe-commits mailing list