diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-10-03 00:31:35 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2014-10-03 00:31:35 +0000 |
commit | ef99e4d88a251ca162e5611b05ea769a8574a68d (patch) | |
tree | ebbd3fcf8eeb5f511d5fc2b355c2934df09d341c /clang/test/Modules/system_headers.m | |
parent | 5312afe7e1b9646d096e92b30fcaf720c93186f9 (diff) | |
download | bcm5719-llvm-ef99e4d88a251ca162e5611b05ea769a8574a68d.tar.gz bcm5719-llvm-ef99e4d88a251ca162e5611b05ea769a8574a68d.zip |
Fix interaction of max_align_t and modules.
When building with modules enabled, we were defining max_align_t as a typedef
for a different anonymous struct type each time it was included, resulting in
an error if <stddef.h> is not covered by a module map and is included more than
once in the same modules-enabled compilation of C11 or C++11 code.
llvm-svn: 218931
Diffstat (limited to 'clang/test/Modules/system_headers.m')
-rw-r--r-- | clang/test/Modules/system_headers.m | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/test/Modules/system_headers.m b/clang/test/Modules/system_headers.m index 39b13ca5fc4..8adc7e85769 100644 --- a/clang/test/Modules/system_headers.m +++ b/clang/test/Modules/system_headers.m @@ -1,8 +1,13 @@ // Test that system-headerness works for building modules. // RUN: rm -rf %t -// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -isystem %S/Inputs -pedantic -Werror %s -verify +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t/cache -isystem %S/Inputs -pedantic -Werror %s -verify -std=c11 // expected-no-diagnostics @import warning; int i = bigger_than_int; + +#include <stddef.h> + +#define __need_size_t +#include <stddef.h> |