[all-commits] [llvm/llvm-project] 3bb5eb: [Clang] Adjust triviality computation in QualType:...
Roy Jacobson via All-commits
all-commits at lists.llvm.org
Fri Mar 3 23:57:56 PST 2023
Branch: refs/heads/release/16.x
Home: https://github.com/llvm/llvm-project
Commit: 3bb5ebc4eddf517d7e36c9b61dd7474e202cf216
https://github.com/llvm/llvm-project/commit/3bb5ebc4eddf517d7e36c9b61dd7474e202cf216
Author: Roy Jacobson <roi.jacobson1 at gmail.com>
Date: 2023-03-03 (Fri, 03 Mar 2023)
Changed paths:
M clang/lib/AST/Type.cpp
M clang/test/SemaCXX/constrained-special-member-functions.cpp
Log Message:
-----------
[Clang] Adjust triviality computation in QualType::isTrivialType to C++20 cases.
Up to C++20, hasDefaultConstructor and !hasNonTrivialDefaultConstructor together implied
hasTrivialDefaultConstructor. In C++20, a constructor might be ineligible and can set
hasDefaultConstructor without setting hasNonTrivialDefaultConstructor.
Fix this by querying hasTrivialDefaultConstructor instead of hasDefaultConstructor.
I'd like to backport this to Clang 16.
I only change isTrivialType and in a way that should only affect code that uses
constrained constructors, so I think this is relatively safe to backport.
Fixes https://github.com/llvm/llvm-project/issues/60697
Reviewed By: aaron.ballman
Differential Revision: https://reviews.llvm.org/D143891
More information about the All-commits
mailing list