klimek added inline comments.
================ Comment at: llvm/lib/Support/CommandLine.cpp:101 + SmallVector<Option*, 4> DefaultOptions; + ---------------- A comment explaining what this contains and how it'll be used would help. ================ Comment at: llvm/lib/Support/CommandLine.cpp:152 + // If it's a DefaultOption, check to make sure it isn't already there. + if (O->getMiscFlags() & cl::DefaultOption && + SC->OptionsMap.find(O->ArgStr) != SC->OptionsMap.end()) ---------------- This is used multiple times, add isDefault() to Option? ================ Comment at: llvm/lib/Support/CommandLine.cpp:196 + void addOption(Option *O, bool ProcessDefaultOption = false) { + // Handle DefaultOptions + if (!ProcessDefaultOption && O->getMiscFlags() & cl::DefaultOption) { ---------------- I'd delete this comment, I don't think it helps. ================ Comment at: llvm/lib/Support/CommandLine.cpp:1199 + // Handle DefaultOptions. + for (auto O: DefaultOptions) { ---------------- Same here, this comment doesn't say anything non-obvious. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D59746/new/ https://reviews.llvm.org/D59746 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits