arphaman added inline comments.
================ Comment at: clang/lib/AST/Expr.cpp:531 + llvm::raw_svector_ostream Out(Buffer); + if (auto *DCFunc = dyn_cast<FunctionDecl>(DC)) { + Out << ComputeName(IT, DCFunc); ---------------- I think it's possible to avoid the braces by simplifying down to something like this: ``` if (auto *DCFunc = dyn_cast<FunctionDecl>(DC)) Out << ComputeName(IT, DCFunc) << "_block_invoke"; else // For nested blocks, propagate up to the parent. Out << ComputeName(IT, cast<BlockDecl>(DC)); ``` ================ Comment at: clang/lib/CodeGen/CGExpr.cpp:2325 + if (!Name.empty()) { + unsigned discriminator = + CGM.getCXXABI().getMangleContext().getBlockId(BD, true); ---------------- `discriminator` should be `Discriminator` ================ Comment at: clang/lib/CodeGen/CGExpr.cpp:2327 + CGM.getCXXABI().getMangleContext().getBlockId(BD, true); + if (discriminator != 0) + Name += "_" + Twine(discriminator + 1).str(); ---------------- `!= 0` is redundant here https://reviews.llvm.org/D26522 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits