summaryrefslogtreecommitdiffstats
path: root/clang/test/Modules
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-01-27 19:52:33 +0000
committerDouglas Gregor <dgregor@apple.com>2012-01-27 19:52:33 +0000
commita686e1b05df915030897ec670d9cb15d2a6d0221 (patch)
tree0c45700a788869289d4dad2a57e18b4e317629bf /clang/test/Modules
parent63fe5697f4d9f760fef8ec828d535deec296d119 (diff)
downloadbcm5719-llvm-a686e1b05df915030897ec670d9cb15d2a6d0221.tar.gz
bcm5719-llvm-a686e1b05df915030897ec670d9cb15d2a6d0221.zip
Introduce module attributes into the module map grammar, along with a
single attribute ("system") that allows us to mark a module as being a "system" module. Each of the headers that makes up a system module is considered to be a system header, so that we (for example) suppress warnings there. If a module is being inferred for a framework, and that framework directory is within a system frameworks directory, infer it as a system framework. llvm-svn: 149143
Diffstat (limited to 'clang/test/Modules')
-rw-r--r--clang/test/Modules/Inputs/NoUmbrella.framework/Headers/A.h7
-rw-r--r--clang/test/Modules/Inputs/NoUmbrella.framework/module.map2
2 files changed, 8 insertions, 1 deletions
diff --git a/clang/test/Modules/Inputs/NoUmbrella.framework/Headers/A.h b/clang/test/Modules/Inputs/NoUmbrella.framework/Headers/A.h
index 0de118c4f87..73f32bff402 100644
--- a/clang/test/Modules/Inputs/NoUmbrella.framework/Headers/A.h
+++ b/clang/test/Modules/Inputs/NoUmbrella.framework/Headers/A.h
@@ -1 +1,8 @@
int no_umbrella_A;
+
+inline int has_warning(int x) {
+ if (x > 0)
+ return x;
+ // Note: warning here is suppressed because this module is considered a
+ // "system" module.
+}
diff --git a/clang/test/Modules/Inputs/NoUmbrella.framework/module.map b/clang/test/Modules/Inputs/NoUmbrella.framework/module.map
index 986cca995c1..4a4d9702c5f 100644
--- a/clang/test/Modules/Inputs/NoUmbrella.framework/module.map
+++ b/clang/test/Modules/Inputs/NoUmbrella.framework/module.map
@@ -1,4 +1,4 @@
-framework module NoUmbrella {
+framework module NoUmbrella [system] {
umbrella "Headers"
module * { }
OpenPOWER on IntegriCloud