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
14 lines
302 B
C
14 lines
302 B
C
// RUN: rm -rf %t
|
|
// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I%S/Inputs/StdDef %s -verify -fno-modules-error-recovery
|
|
|
|
#include "ptrdiff_t.h"
|
|
|
|
ptrdiff_t pdt;
|
|
|
|
size_t st; // expected-error {{must be imported}}
|
|
// expected-note@stddef.h:* {{previous}}
|
|
|
|
#include "include_again.h"
|
|
|
|
size_t st2;
|