lebedev.ri added inline comments.
================ Comment at: lib/Sema/SemaCast.cpp:94-101 + void updatePartOfExplicitCastFlags(CastExpr *CE) { + // Walk down from the CE to the OrigSrcExpr, and mark all immediate + // ImplicitCastExpr's as being part of ExplicitCastExpr. The original CE + // (which is a ExplicitCastExpr), and the OrigSrcExpr are not touched. + while (OrigSrcExpr.get() != CE->getSubExpr() && + (CE = dyn_cast<ImplicitCastExpr>(CE->getSubExpr()))) + CE->setIsPartOfExplicitCast(true); ---------------- rsmith wrote: > You don't need to track the `OrigSrcExpr` here. You can just recurse down > through all the `ImplicitCastExpr`s (they're always all notionally part of > the explicit cast). We do sometimes have `OrigSrcExpr` being `ImplicitCastExpr`. https://godbolt.org/g/S5951G <- that `ImplicitCastExpr` would now get marked, even though it is `OrigSrcExpr`. Is that expected? Repository: rC Clang https://reviews.llvm.org/D49508 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits