[clang] [clang] Simplify the overload resolution logic for operator new and new[] (PR #211482)

Oliver Hunt via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 28 18:35:10 PDT 2026


================
@@ -2915,9 +2917,9 @@ DiagnoseAllocationLookupFailure(Sema &SemaRef, const LookupResult &BaseLookup,
   auto Rerun = [&](ImplicitAllocationArguments &ArgumentList,
                    OverloadCandidateSet &Candidates,
                    SmallVectorImpl<Expr *> &Args) {
+    std::optional<LookupResult> MSVCFallback;
     const LookupResult &LocalLookup =
-        ArgumentList.updateLookupForMSVCCompatibility(SemaRef, BaseLookup,
-                                                      MSVCFallback);
+        ArgumentList.updateLookupForMSVCCompatibility(SemaRef, R, MSVCFallback);
----------------
ojhunt wrote:

But failing to do so leaves a non-obvious hazard for future work, and having it here does not have a meaningful cost?

https://github.com/llvm/llvm-project/pull/211482


More information about the cfe-commits mailing list