[clang] e8cc37e - [clang][deps] Disable app extensions during scanning (#200041)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 27 14:49:28 PDT 2026
Author: Jan Svoboda
Date: 2026-05-27T14:49:23-07:00
New Revision: e8cc37e60d04ea2e25f03fbeeb8de59f4e640448
URL: https://github.com/llvm/llvm-project/commit/e8cc37e60d04ea2e25f03fbeeb8de59f4e640448
DIFF: https://github.com/llvm/llvm-project/commit/e8cc37e60d04ea2e25f03fbeeb8de59f4e640448.diff
LOG: [clang][deps] Disable app extensions during scanning (#200041)
Application extension contributes to the context hash, but only affects
the availability attribute on declarations. Since it cannot affect
dependencies, disable it for the scan to reduce the number of scanning
PCM variants.
Added:
Modified:
clang/lib/DependencyScanning/DependencyScannerImpl.cpp
Removed:
################################################################################
diff --git a/clang/lib/DependencyScanning/DependencyScannerImpl.cpp b/clang/lib/DependencyScanning/DependencyScannerImpl.cpp
index 42f87adba84c9..712e84ebedaf9 100644
--- a/clang/lib/DependencyScanning/DependencyScannerImpl.cpp
+++ b/clang/lib/DependencyScanning/DependencyScannerImpl.cpp
@@ -450,6 +450,10 @@ std::shared_ptr<CompilerInvocation> dependencies::createScanCompilerInvocation(
true;
ScanInvocation->getHeaderSearchOpts().ModulesForceValidateUserHeaders = false;
+ // Application extension only affects the handling of availability attributes,
+ // which cannot change the dependencies.
+ ScanInvocation->getLangOpts().AppExt = false;
+
// Ensure that the scanner does not create new dependency collectors,
// and thus won't write out the extra '.d' files to disk.
ScanInvocation->getDependencyOutputOpts() = {};
More information about the cfe-commits
mailing list