diff options
Diffstat (limited to 'test/PCH')
-rw-r--r-- | test/PCH/designated-init.c.h | 22 | ||||
-rw-r--r-- | test/PCH/modified-module-dependency.m | 4 | ||||
-rw-r--r-- | test/PCH/module-hash-difference.m | 4 |
3 files changed, 26 insertions, 4 deletions
diff --git a/test/PCH/designated-init.c.h b/test/PCH/designated-init.c.h index 63b1f79..1821627 100644 --- a/test/PCH/designated-init.c.h +++ b/test/PCH/designated-init.c.h @@ -40,3 +40,25 @@ static void *FooTable[256] = { }, } }; + +struct P1 { + struct Q1 { + char a[6]; + char b[6]; + } q; +}; + +struct P1 l1 = { + (struct Q1){ "foo", "bar" }, + .q.b = { "boo" }, + .q.b = { [1] = 'x' } +}; + +extern struct Q1 *foo(); +static struct P1 test_foo() { + struct P1 l = { *foo(), + .q.b = { "boo" }, + .q.b = { [1] = 'x' } + }; + return l; +} diff --git a/test/PCH/modified-module-dependency.m b/test/PCH/modified-module-dependency.m index 3db8f3d..39fddb0 100644 --- a/test/PCH/modified-module-dependency.m +++ b/test/PCH/modified-module-dependency.m @@ -5,13 +5,13 @@ // RUN: cp %S/modified-module-dependency.module.map %t-dir/module.map // Precompile prefix.pch. -// RUN: %clang_cc1 -x objective-c -I %t-dir -fmodules -fmodules-cache-path=%t-dir/cache -fdisable-module-hash -emit-pch %t-dir/prefix.h -o %t-dir/prefix.pch +// RUN: %clang_cc1 -x objective-c -I %t-dir -fmodules -fimplicit-module-maps -fmodules-cache-path=%t-dir/cache -fdisable-module-hash -emit-pch %t-dir/prefix.h -o %t-dir/prefix.pch // Modify the dependency. // RUN: echo ' ' >> %t-dir/test.h // Run and check the diagnostics. -// RUN: not %clang_cc1 -x objective-c -I %t-dir -include-pch %t-dir/prefix.pch -fmodules -fmodules-cache-path=%t-dir/cache -fdisable-module-hash -fsyntax-only %s 2> %t-dir/log +// RUN: not %clang_cc1 -x objective-c -I %t-dir -include-pch %t-dir/prefix.pch -fmodules -fimplicit-module-maps -fmodules-cache-path=%t-dir/cache -fdisable-module-hash -fsyntax-only %s 2> %t-dir/log // RUN: FileCheck %s < %t-dir/log // CHECK: file '[[TEST_H:.*[/\\]test\.h]]' has been modified since the precompiled header '[[PREFIX_PCH:.*/prefix\.pch]]' was built diff --git a/test/PCH/module-hash-difference.m b/test/PCH/module-hash-difference.m index 073540e..fc542b0 100644 --- a/test/PCH/module-hash-difference.m +++ b/test/PCH/module-hash-difference.m @@ -1,7 +1,7 @@ // RUN: rm -rf %t.mcp // RUN: rm -rf %t.err -// RUN: %clang_cc1 -emit-pch -o %t.pch %s -I %S/Inputs/modules -fmodules -fmodules-cache-path=%t.mcp -// RUN: not %clang_cc1 -fsyntax-only -include-pch %t.pch %s -I %S/Inputs/modules -fmodules -fmodules-cache-path=%t.mcp -fdisable-module-hash 2> %t.err +// RUN: %clang_cc1 -emit-pch -o %t.pch %s -I %S/Inputs/modules -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp +// RUN: not %clang_cc1 -fsyntax-only -include-pch %t.pch %s -I %S/Inputs/modules -fmodules -fimplicit-module-maps -fmodules-cache-path=%t.mcp -fdisable-module-hash 2> %t.err // RUN: FileCheck -input-file=%t.err %s // CHECK: error: PCH was compiled with module cache path {{.*}}, but the path is currently {{.*}} |