[clang][deps] Reset non-modular language and preprocessor options
authorJan Svoboda <jan_svoboda@apple.com>
Wed, 25 Aug 2021 16:45:46 +0000 (18:45 +0200)
committerJan Svoboda <jan_svoboda@apple.com>
Thu, 26 Aug 2021 06:43:21 +0000 (08:43 +0200)
commit6da811fd5c7158eecaf25f0e417131f2e7dfb35f
treec04833e2d611204a0644da8ac343752f1da044a5
parent6b26857dbfc1f8675382f5510f9ca02dad62729a
[clang][deps] Reset non-modular language and preprocessor options

There are a number of language and preprocessor options that are reset in the `CompilerInvocation` that describes the build of an implicit module. This patch uses the logic for explicit modules as well.

Reviewed By: dexonsmith

Differential Revision: https://reviews.llvm.org/D108710
clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp
clang/test/ClangScanDeps/Inputs/removed-args/cdb.json.template [new file with mode: 0644]
clang/test/ClangScanDeps/Inputs/removed-args/header.h [new file with mode: 0644]
clang/test/ClangScanDeps/Inputs/removed-args/mod_header.h [new file with mode: 0644]
clang/test/ClangScanDeps/Inputs/removed-args/mod_tu.h [new file with mode: 0644]
clang/test/ClangScanDeps/Inputs/removed-args/module.modulemap [new file with mode: 0644]
clang/test/ClangScanDeps/Inputs/removed-args/tu.c [new file with mode: 0644]
clang/test/ClangScanDeps/removed-args.c [new file with mode: 0644]