================
@@ -2896,17 +2899,20 @@ DiagnoseAllocationLookupFailure(Sema &SemaRef, const 
LookupResult &R,
   ImplicitAllocationArguments *UnalignedArgumentList = nullptr;
   ImplicitAllocationArguments *AlignedArgumentList = nullptr;
   bool IncludedMSVCFallback = false;
+  bool AlignedBeforeUnaligned = true;
   for (ImplicitAllocationArguments &AllocationArguments : ArgumentCandidates) {
     if (AllocationArguments.IsMSVCCompatibilityFallback) {
       IncludedMSVCFallback = true;
       continue;
     }
     if (AllocationArguments.PassTypeIdentity == TypeAwareAllocationMode::Yes)
       continue;
-    if (AllocationArguments.PassAlignment == AlignedAllocationMode::Yes)
+    if (AllocationArguments.PassAlignment == AlignedAllocationMode::Yes) {
       AlignedArgumentList = &AllocationArguments;
-    else
+      AlignedBeforeUnaligned = !UnalignedArgumentList;
+    } else {
       UnalignedArgumentList = &AllocationArguments;
+    }
----------------
ojhunt wrote:

~~Why is this needed?~~ 

Oh ugh, we don't pass the candidate selector information to diagnosis just the 
parameter lists. Will deal with this when I re-work the diagnostics.

https://github.com/llvm/llvm-project/pull/215157
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to