[clang] [StructuralEquivalence] fix crash & improve comparing on GenericSelectionExpr (PR #67458)

Tom Roeder via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 26 10:28:43 PDT 2023


================
@@ -247,6 +247,20 @@ class StmtComparer {
 
   bool IsStmtEquivalent(const GenericSelectionExpr *E1,
                         const GenericSelectionExpr *E2) {
+    if (!IsStructurallyEquivalent(Context,
----------------
tmroeder wrote:

Could you please add comments to the new checks that explains why they are needed?

I don't doubt that they are important, but I haven't touched this code in a very long time, and I'm sure that other readers of this code would appreciate it.

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


More information about the cfe-commits mailing list