[PATCH] D36820: [Bash-autocompletion] Add support for -std=

Rui Ueyama via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 17 13:09:11 PDT 2017


ruiu added inline comments.


================
Comment at: llvm/utils/TableGen/OptParserEmitter.cpp:314
       for (const std::string &Pref : R.getValueAsListOfStrings("Prefixes")) {
-        OS << "bool ValuesWereAdded = ";
+        OS << "ValuesWereAdded = ";
         OS << "Opt.addValues(";
----------------
yamaguchi wrote:
> ruiu wrote:
> > Why do you have to change this? The previous code looks nicer.
> Because I got an error that ValuesWereAdded are defined several times.
Okay, but I think at least you want to move the definition into the scope that line 310 defines, so that the scope of the variable ends at the code that line 322 emits.


https://reviews.llvm.org/D36820





More information about the cfe-commits mailing list