ruiu added inline comments.
================ Comment at: clang/include/clang/Driver/CC1Options.td:104 + ValuesCode<[{ + const char* Values = + #define GET_CHECKERS ---------------- `const char* Values` -> `const char *Values` ================ Comment at: llvm/utils/TableGen/OptParserEmitter.cpp:308 + const Record &R = *Opts[I]; + if (!isa<UnsetInit>(R.getValueInit("ValuesCode"))) { + OS << "{\n"; ---------------- Maybe it is better to do early continue to reduce indentation depth. if (isa<UnsetInit>(R.getValueInit("ValuesCode"))) continue; ================ Comment at: llvm/utils/TableGen/OptParserEmitter.cpp:313-314 + for (const std::string &Pref : R.getValueAsListOfStrings("Prefixes")) { + OS << "bool ValuesWereAdded = "; + OS << "Opt.addValues("; + std::string S = (Pref + R.getValueAsString("Name")).str(); ---------------- You can combine these two lines: OS << "bool ValuesWereAdded = Opt.addValues("; ================ Comment at: llvm/utils/TableGen/OptParserEmitter.cpp:318-319 + OS << ", Values);\n"; + OS << "(void)ValuesWereAdded;\nassert(ValuesWereAdded &&"; + OS << " \"Couldn't add values to OptTable!\");\n"; + } ---------------- It is more readable if you split it at a natural boundary: OS << "(void)ValuesWereAdded;\n"; OS << "assert(ValuesWereAdded && \"Couldn't add values to OptTable!\");\n"; https://reviews.llvm.org/D36782 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits