[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Modules / diag-mappings-affecting.c
blobf485fe8e3f2e5338731657aa0a769dfb74a2c113
1 // Test that pruning non-affecting input files happens before serializing
2 // diagnostic pragma mappings.
4 // RUN: rm -rf %t
5 // RUN: split-file %s %t
7 // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/cache \
8 // RUN: -I %t/include_a -I %t/include_textual -fsyntax-only %t/tu.c
10 //--- tu.c
11 #include "a1.h"
13 //--- include_a/module.modulemap
14 module A {
15 header "a1.h"
16 header "a2.h"
18 //--- include_a/a1.h
19 #include "textual.h" // This will also load the non-affecting
20 // include_textual/module.modulemap.
21 #include "a2.h"
22 //--- include_a/a2.h
23 #pragma clang diagnostic push
24 #pragma clang diagnostic ignored "-Wfloat-equal"
25 #pragma clang diagnostic pop
27 //--- include_textual/module.modulemap
28 //--- include_textual/textual.h