A long time ago CompilerInvocation::setLangDefaults was apparently copy-pasted into
TypeSystemClang. Since then Clang folks have been keeping this copy of the function
more or less in sync with the original Clang one.
This patch removes the copy and just calls the original function instead. The resulting
LangOpts are identical with the previous ones beside the fact that we now no longer
enable GNUInline (which would cause __GNUC_GNU_INLINE__ to be
defined in the PP and enables support for it in Sema), NoInlineDefine (defines the
__NO_INLINE__ macro) and Digraphs (which does what you would expect).
The last two of the changed options are only relevant for lexing/preprocessing and the
ASTs we create here are always manually populated (by the ASTImporter or us building
ASTNodes via the TypeSystemClang APIs), so this should be NFC.
The GNUInline options also defines whether Sema actually respects the respective
attribute, but from what I can see there is no way one can actually generate such
an attribute in LLDB. The option is disabled in all Clang parsers we have and we
never manually construct the attribute anywhere.
clang-tidy: error: 'Plugins/ExpressionParser/Clang/ClangPersistentVariables.h' file not found [clang-diagnostic-error]
not useful
clang-tidy: error: 'Plugins/ExpressionParser/Clang/ClangPersistentVariables.h' file not found [clang-diagnostic-error]
not useful