Reapply "[clang][cli] Port DiagnosticOpts to new option parsing system"
authorJan Svoboda <jan_svoboda@apple.com>
Fri, 8 Jan 2021 10:05:16 +0000 (11:05 +0100)
committerJan Svoboda <jan_svoboda@apple.com>
Mon, 11 Jan 2021 09:05:53 +0000 (10:05 +0100)
commit97100646d1b4526de1eac3aacdb0b098739c6ec9
tree565398e18314f30c2d5639f97fd44b6fdc17b21f
parentb7ccaca53700fce21b0e8e5d7bd2a956bd391fee
Reapply "[clang][cli] Port DiagnosticOpts to new option parsing system"

This reverts commit 8e3e148c

This commit fixes two issues with the original patch:
* The sanitizer build bot reported an uninitialized value. This was caused by normalizeStringIntegral not returning None on failure.
* Some build bots complained about inaccessible keypaths. To mitigate that, "this->" was added back to the keypath to restore the previous behavior.
clang/include/clang/Basic/DiagnosticOptions.h
clang/include/clang/Driver/Options.td
clang/lib/Frontend/CompilerInvocation.cpp
clang/unittests/Frontend/CompilerInvocationTest.cpp
llvm/include/llvm/Option/OptParser.td
llvm/utils/TableGen/OptParserEmitter.cpp