mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-05-13 17:37:00 +00:00

Diagnostic for `-Wauto-import` shouldn't be a warning because it doesn't represent a potential problem in code that should be fixed. And the emitted fix-it is likely to trigger `-Watimport-in-framework-header` which makes it challenging to have a warning-free codebase. But it is still useful to see how include directives are translated into modular imports and which module a header belongs to, that's why keep it as a remark. Keep `-Wauto-import` for now to allow a gradual migration for codebases using `-Wno-auto-import`, e.g., `-Weverything -Wno-auto-import`. rdar://79594287 Differential Revision: https://reviews.llvm.org/D130138
20 lines
933 B
Objective-C
20 lines
933 B
Objective-C
// RUN: rm -rf %t
|
|
// Run without global module index
|
|
// RUN: %clang_cc1 -Rmodule-include-translation -Wno-private-module -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fimplicit-module-maps -fno-modules-global-index -F %S/Inputs %s -verify
|
|
// RUN: ls %t|not grep modules.idx
|
|
// Run and create the global module index
|
|
// RUN: %clang_cc1 -Rmodule-include-translation -Wno-private-module -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify
|
|
// RUN: ls %t|grep modules.idx
|
|
// Run and use the global module index
|
|
// RUN: %clang_cc1 -Rmodule-include-translation -Wno-private-module -fmodules-cache-path=%t -fdisable-module-hash -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify -print-stats 2>&1 | FileCheck %s
|
|
|
|
// expected-no-diagnostics
|
|
@import DependsOnModule;
|
|
@import Module;
|
|
|
|
// CHECK: *** Global Module Index Statistics:
|
|
|
|
int *get_sub(void) {
|
|
return Module_Sub;
|
|
}
|