[clang] [Clang][Sema] Fix lookup of dependent operator= outside of complete-class contexts (PR #91498)
Erich Keane via cfe-commits
cfe-commits at lists.llvm.org
Wed May 8 12:32:10 PDT 2024
================
@@ -1269,19 +1269,19 @@ struct FindLocalExternScope {
};
} // end anonymous namespace
+static bool isDependentAssignmentOperator(DeclarationName Name,
+ DeclContext *LookupContext) {
+ auto *LookupRecord = dyn_cast_if_present<CXXRecordDecl>(LookupContext);
+ return Name.getCXXOverloadedOperator() == OO_Equal && LookupRecord &&
+ !LookupRecord->isBeingDefined() && LookupRecord->isDependentContext();
----------------
erichkeane wrote:
Why the `!isBeingDefined`? That seems weird given the name of this function.
Also, instead of making it static, can you just toss it in the anonymous NS above?
https://github.com/llvm/llvm-project/pull/91498
More information about the cfe-commits
mailing list