aaron.ballman added inline comments.
================ Comment at: clang/lib/Sema/SemaExpr.cpp:15789-15790 + : Context.getCorrespondingUnsignedType(UnderlyingType); + if (Context.typesAreCompatible(PromoteType, UnderlyingType, + /*CompareUnqualified*/ true)) + PromoteType = QualType(); ---------------- I believe I could switch to using `hasSameType()` here though, if you preferred. ================ Comment at: clang/lib/Sema/SemaExpr.cpp:15775 + if (Context.typesAreCompatible(PromoteType, UnderlyingType, + /*CompareUnqualified*/ true)) PromoteType = QualType(); ---------------- efriedma wrote: > If we're not going to take advantage of the C notion of compatibility, might > as well just check hasSameType(). We do still make use of that in C. For example, `mergeTypes()` (called by `typesAreCompatible()` in C mode) also does work for functions without a prototype (a distinctly C concept), special logic for merging enums and integers, qualifier handling, etc. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D103611/new/ https://reviews.llvm.org/D103611 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits