diff options
author | Douglas Gregor <dgregor@apple.com> | 2011-12-23 00:23:59 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2011-12-23 00:23:59 +0000 |
commit | 585ec93e1bd4fdd5a37aa19848e5f92084f0d923 (patch) | |
tree | 6b6eebdfe5d1fdd81de46746e7bfab2c7c066972 /test | |
parent | 682060c5d95f6e4f79536013781ab0870cdd3850 (diff) |
When building a module with an umbrella header, warn about any headers
found within that umbrella directory that were not actually included
by the umbrella header. They should either be referenced in the module
map or included by the umbrella header.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147207 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Modules/Inputs/Module.framework/Headers/Module.h | 2 | ||||
-rw-r--r-- | test/Modules/on-demand-build.m | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/test/Modules/Inputs/Module.framework/Headers/Module.h b/test/Modules/Inputs/Module.framework/Headers/Module.h index be88bb5adc..3d10112e55 100644 --- a/test/Modules/Inputs/Module.framework/Headers/Module.h +++ b/test/Modules/Inputs/Module.framework/Headers/Module.h @@ -1,3 +1,5 @@ +// expected-warning{{umbrella header}} + #ifndef MODULE_H #define MODULE_H const char *getModuleVersion(void); diff --git a/test/Modules/on-demand-build.m b/test/Modules/on-demand-build.m index 7843014453..644519b972 100644 --- a/test/Modules/on-demand-build.m +++ b/test/Modules/on-demand-build.m @@ -1,13 +1,15 @@ // RUN: rm -rf %t -// RUN: %clang_cc1 -fno-objc-infer-related-result-type -Werror -fmodule-cache-path %t -F %S/Inputs -verify %s -// RUN: %clang_cc1 -fno-objc-infer-related-result-type -Werror -x objective-c++ -fmodule-cache-path %t -F %S/Inputs -verify %s -// RUN: %clang_cc1 -fno-objc-infer-related-result-type -Werror -fmodule-cache-path %t -F %S/Inputs -verify %s +// RUN: %clang_cc1 -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -verify %s +// RUN: %clang_cc1 -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -x objective-c++ -fmodule-cache-path %t -F %S/Inputs -verify %s +// RUN: %clang_cc1 -fno-objc-infer-related-result-type -Werror -Wno-error=incomplete-umbrella -fmodule-cache-path %t -F %S/Inputs -verify %s #define FOO __import_module__ Module; @interface OtherClass @end + + // in module: expected-note{{class method 'alloc' is assumed to return an instance of its receiver type ('Module *')}} void test_getModuleVersion() { const char *version = getModuleVersion(); |