hazohelet added a comment. In D153690#4624726 <https://reviews.llvm.org/D153690#4624726>, @michael-jabbour-sonarsource wrote:
> The removal of the early return in this patch causes a crash when parsing the > following example: > > struct S { > bool operator==(int) const; > }; > > void func() { > S __unaligned s; > s == 42; > } > > See this Compiler Explorer link with a stacktrace: > https://godbolt.org/z/n9vscYoYa. > > Maybe we want to avoid the call to `DiagnoseBadConversion` here? I think that > we don't want `OverloadCandidateSet::BestViableFunction` (called in > `Sema::CreateOverloadedBinOp`) to return `OR_No_Viable_Function` in this case? Thank you for the report and reproducer! @rnk This reproducer code should be accepted for clang to be aligned with msvc's behavior, correct? About the fix, there's probably some code that makes a candidate that loses const qualifier invalid, and the __unaligned is likely to be handled in the same place. (I haven't checked the code, so may be off base) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D153690/new/ https://reviews.llvm.org/D153690 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits