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.
Will you follow-up this change by updating CXXRecordDecl::isTrivial as well or is that a more difficult issue?