forked from OSchip/llvm-project
Teach tgmath.h to only include <complex.h> if it's available.
llvm-svn: 149213
This commit is contained in:
parent
8277797e3d
commit
e8f900bdcc
|
@ -30,7 +30,9 @@
|
|||
|
||||
/* C++ handles type genericity with overloading in math.h. */
|
||||
#ifndef __cplusplus
|
||||
#include <complex.h>
|
||||
#if __has_include(<complex.h>)
|
||||
# include <complex.h>
|
||||
#endif
|
||||
|
||||
#define _TG_ATTRSp __attribute__((__overloadable__))
|
||||
#define _TG_ATTRS __attribute__((__overloadable__, __always_inline__))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// RUN: rm -rf %t
|
||||
// RUN: %clang -fsyntax-only -fmodules -fmodule-cache-path %t %s
|
||||
// RUN: %clang -fsyntax-only -fmodules -fmodule-cache-path %t %s -Xclang -verify
|
||||
|
||||
@import __compiler_builtins.float_constants;
|
||||
|
||||
|
@ -9,4 +9,4 @@ float getFltMax() { return FLT_MAX; }
|
|||
|
||||
char getCharMax() { return CHAR_MAX; }
|
||||
|
||||
//size_t size; // expected-error{{unknown type name 'size_t'}}
|
||||
size_t size; // expected-error{{unknown type name 'size_t'}}
|
||||
|
|
Loading…
Reference in New Issue