[PATCH] D115433: [CommandLine] Reset option to its default if its Default field is undefined

David Greene via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 12 13:44:47 PST 2022


greened added a comment.

> IIUC, the point of this change is not to alter the behavior for options that have a `cl::init`, but rather to alter behavior for options that _don't_ have a default provided. Right now, those options don't get reset when `ResetAllOptionOccurrences` is called. With this patch, options _without_ `cl::init` should get reset to the default-constructed value of the option type, and options with `cl::init` get initialized to the default value.

Ah, ok, thank you!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115433/new/

https://reviews.llvm.org/D115433



More information about the llvm-commits mailing list