[clang] [Clang] Implement CWG2918 'Consideration of constraints for address of overloaded function' (PR #127773)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 19 21:06:38 PST 2025
================
@@ -1773,20 +1773,19 @@ bool Sema::IsAtLeastAsConstrained(NamedDecl *D1,
NamedDecl *D2,
MutableArrayRef<const Expr *> AC2,
bool &Result) {
+#ifndef NDEBUG
if (const auto *FD1 = dyn_cast<FunctionDecl>(D1)) {
auto IsExpectedEntity = [](const FunctionDecl *FD) {
FunctionDecl::TemplatedKind Kind = FD->getTemplatedKind();
----------------
zyn0217 wrote:
We have assumed FD2 to be non-null on line 1786, and besides that this change just gets rid of the if-body that is only intended for that assumption.
https://github.com/llvm/llvm-project/pull/127773
More information about the cfe-commits
mailing list