[libcxx-commits] [flang] [libcxx] [clang] [compiler-rt] [clang-tools-extra] [llvm] [Clang][Sema] Fix qualifier restriction of overriden methods (PR #71696)
Shafik Yaghmour via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Dec 2 22:45:13 PST 2023
================
@@ -18469,9 +18469,22 @@ bool Sema::CheckOverridingFunctionReturnType(const CXXMethodDecl *New,
// The new class type must have the same or less qualifiers as the old type.
- if (NewClassTy.isMoreQualifiedThan(OldClassTy)) {
+ if (!OldClassTy.isAtLeastAsQualifiedAs(NewClassTy)) {
----------------
shafik wrote:
and also add a release note.
https://github.com/llvm/llvm-project/pull/71696
More information about the libcxx-commits
mailing list