owenpan added inline comments.
================ Comment at: clang/lib/Format/NamespaceEndCommentsFixer.cpp:45-54 + int NestLevel = 1; + while (Tok && NestLevel > 0) { + Tok = Tok->getNextNonComment(); + if (Tok) { + if (Tok->is(tok::l_square)) + ++NestLevel; + if (Tok->is(tok::r_square)) ---------------- To make the loop simpler and more efficient. ================ Comment at: clang/lib/Format/NamespaceEndCommentsFixer.cpp:59-60 + + // Use the string after `namespace` until `{` or `::` or `(` as a name + // candidate. If the name is empty, use the candicate. + std::string FirstNSName; ---------------- Move "as a name candidate" to between "`namespace`" and "until". Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120931/new/ https://reviews.llvm.org/D120931 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits