davrec added inline comments.

================
Comment at: clang/lib/AST/ASTContext.cpp:12767
+        Ctx.getQualifiedType(Underlying),
+        ::getCommonDecl(EX->getOwnedTagDecl(), EY->getOwnedTagDecl()));
+  }
----------------
This last argument should probably be omitted/nullptr passed, since
# We probably won't encounter any owned tag decls in the types passed to this 
function;
# Even if we did, it would not necessarily be true that they both have non-null 
owned tag decls, and I don't see any nullptr checks in getCommonDecl; and
# Even if we checked for nullptr there, and say passed the same argument to X 
and Y so EX==EY, and that had an owned tag decl, it is not clear to me it would 
be appropriate to construct a new type with the same owned tag decl as another 
type.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130308/new/

https://reviews.llvm.org/D130308

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to