diff options
Diffstat (limited to 'test/Modules')
-rw-r--r-- | test/Modules/Inputs/Module.framework/Headers/Module.h | 6 | ||||
-rw-r--r-- | test/Modules/Inputs/category_right.h | 2 | ||||
-rw-r--r-- | test/Modules/Inputs/import-decl.h | 1 | ||||
-rw-r--r-- | test/Modules/Inputs/module.map | 3 | ||||
-rw-r--r-- | test/Modules/cstd.m | 2 | ||||
-rw-r--r-- | test/Modules/import-decl.cpp | 10 | ||||
-rw-r--r-- | test/Modules/lookup.cpp | 2 | ||||
-rw-r--r-- | test/Modules/objc-categories.m | 1 | ||||
-rw-r--r-- | test/Modules/on-demand-build.m | 5 |
9 files changed, 25 insertions, 7 deletions
diff --git a/test/Modules/Inputs/Module.framework/Headers/Module.h b/test/Modules/Inputs/Module.framework/Headers/Module.h index 738b222..f894984 100644 --- a/test/Modules/Inputs/Module.framework/Headers/Module.h +++ b/test/Modules/Inputs/Module.framework/Headers/Module.h @@ -1,4 +1,8 @@ -// expected-warning{{umbrella header}} +// expected-warning 0-1 {{umbrella header}} + +// FIXME: The "umbrella header" warning should be moved to a separate test. +// This "0-1" is only here because the warning is only emitted when the +// module is (otherwise) successfully included. #ifndef MODULE_H #define MODULE_H diff --git a/test/Modules/Inputs/category_right.h b/test/Modules/Inputs/category_right.h index d993b50..812a840 100644 --- a/test/Modules/Inputs/category_right.h +++ b/test/Modules/Inputs/category_right.h @@ -8,5 +8,5 @@ -(void)right2; @end -@interface Foo(Duplicate) // expected-warning {{duplicate definition of category}} +@interface Foo(Duplicate) @end diff --git a/test/Modules/Inputs/import-decl.h b/test/Modules/Inputs/import-decl.h new file mode 100644 index 0000000..9741d6c --- /dev/null +++ b/test/Modules/Inputs/import-decl.h @@ -0,0 +1 @@ +struct T {}; diff --git a/test/Modules/Inputs/module.map b/test/Modules/Inputs/module.map index e8d1f2c..79056cb 100644 --- a/test/Modules/Inputs/module.map +++ b/test/Modules/Inputs/module.map @@ -84,3 +84,6 @@ module MethodPoolA { module MethodPoolB { header "MethodPoolB.h" } +module import_decl { + header "import-decl.h" +} diff --git a/test/Modules/cstd.m b/test/Modules/cstd.m index 1752cd3..e262c7e 100644 --- a/test/Modules/cstd.m +++ b/test/Modules/cstd.m @@ -13,7 +13,7 @@ void test_fprintf(FILE *file) { fprintf(file, "Hello, modules\n"); } -// Supplied by compiler, which forwards to the the "/usr/include" version. +// Supplied by compiler, which forwards to the "/usr/include" version. @__experimental_modules_import cstd.stdint; my_awesome_nonstandard_integer_type value; diff --git a/test/Modules/import-decl.cpp b/test/Modules/import-decl.cpp new file mode 100644 index 0000000..7696693 --- /dev/null +++ b/test/Modules/import-decl.cpp @@ -0,0 +1,10 @@ +// RUN: rm -rf %t +// RUN: %clang -fmodule-cache-path %t -fmodules -x objective-c -I %S/Inputs -emit-ast -o %t.ast %s +// RUN: %clang -cc1 -ast-print -x ast - < %t.ast | FileCheck %s + +@__experimental_modules_import import_decl; +// CHECK: struct T + +int main() { + return 0; +} diff --git a/test/Modules/lookup.cpp b/test/Modules/lookup.cpp index 9839035..70d2107 100644 --- a/test/Modules/lookup.cpp +++ b/test/Modules/lookup.cpp @@ -5,6 +5,8 @@ import lookup_left_cxx; #define IMPORT(X) @__experimental_modules_import X IMPORT(lookup_right_cxx); +// in lookup_left.hpp: expected-warning@3 {{weak identifier 'weak_identifier' never declared}} + void test(int i, float f) { // unqualified lookup f0(&i); diff --git a/test/Modules/objc-categories.m b/test/Modules/objc-categories.m index 340f279..b267592 100644 --- a/test/Modules/objc-categories.m +++ b/test/Modules/objc-categories.m @@ -12,6 +12,7 @@ // in category_left.h: expected-note {{previous definition}} +// in category_right.h: expected-warning@11 {{duplicate definition of category}} @interface Foo(Source) -(void)source; diff --git a/test/Modules/on-demand-build.m b/test/Modules/on-demand-build.m index cf1ae99..4ee6b58 100644 --- a/test/Modules/on-demand-build.m +++ b/test/Modules/on-demand-build.m @@ -7,10 +7,7 @@ @interface OtherClass @end - - - -// in module: expected-note{{class method 'alloc' is assumed to return an instance of its receiver type ('Module *')}} +// in module: expected-note@17{{class method 'alloc' is assumed to return an instance of its receiver type ('Module *')}} void test_getModuleVersion() { const char *version = getModuleVersion(); const char *version2 = [Module version]; |