diff options
author | Brad King <brad.king@kitware.com> | 2015-02-04 16:08:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-04 16:08:31 (GMT) |
commit | 1cf66488ca969eefcd4299e51122445474285238 (patch) | |
tree | 2b36998e949356a663a83507e74e9d08c5eea67e /test | |
parent | 8d8aacd65af229da0cadf81911ffa3ef77db7b57 (diff) | |
download | CastXML-1cf66488ca969eefcd4299e51122445474285238.zip CastXML-1cf66488ca969eefcd4299e51122445474285238.tar.gz CastXML-1cf66488ca969eefcd4299e51122445474285238.tar.bz2 |
Detect: Drop detected predefined macros starting in '__has'
These macros are builtin to Clang so we should not try to use any such
definitions detected from the compiler.
Diffstat (limited to 'test')
-rw-r--r-- | test/cc-gnu.c | 4 | ||||
-rw-r--r-- | test/cc-msvc.c | 4 | ||||
-rw-r--r-- | test/expect/cmd.cc-gnu-c-E.stdout.txt | 3 | ||||
-rw-r--r-- | test/expect/cmd.cc-gnu-cxx-E.stdout.txt | 3 | ||||
-rw-r--r-- | test/expect/cmd.cc-msvc-c-E.stdout.txt | 3 | ||||
-rw-r--r-- | test/expect/cmd.cc-msvc-cxx-E.stdout.txt | 3 |
6 files changed, 16 insertions, 4 deletions
diff --git a/test/cc-gnu.c b/test/cc-gnu.c index 2bf616d..10332a5 100644 --- a/test/cc-gnu.c +++ b/test/cc-gnu.c @@ -4,6 +4,10 @@ int main(void) { fprintf(stdout, "#define __cc_gnu__ 1\n" + "#define __has_include(x) x\n" + "#define __has_include_next(x) x\n" + "#define __cc_gnu_minor__ 1\n" + "#define __has_last(x) x" ); fprintf(stderr, "#include <...> search starts here:\n" diff --git a/test/cc-msvc.c b/test/cc-msvc.c index 8ddbac1..8f439b4 100644 --- a/test/cc-msvc.c +++ b/test/cc-msvc.c @@ -5,6 +5,10 @@ int main(void) fprintf(stdout, "\n" "#define __cc_msvc__ 1\n" + "#define __has_include(x) x\n" + "#define __has_include_next(x) x\n" + "#define __cc_msvc_minor__ 1\n" + "#define __has_last(x) x" ); return 0; } diff --git a/test/expect/cmd.cc-gnu-c-E.stdout.txt b/test/expect/cmd.cc-gnu-c-E.stdout.txt index 0a4a576..83be182 100644 --- a/test/expect/cmd.cc-gnu-c-E.stdout.txt +++ b/test/expect/cmd.cc-gnu-c-E.stdout.txt @@ -1 +1,2 @@ -^#define __cc_gnu__ 1$ +^#define __cc_gnu__ 1 +#define __cc_gnu_minor__ 1$ diff --git a/test/expect/cmd.cc-gnu-cxx-E.stdout.txt b/test/expect/cmd.cc-gnu-cxx-E.stdout.txt index 0a4a576..83be182 100644 --- a/test/expect/cmd.cc-gnu-cxx-E.stdout.txt +++ b/test/expect/cmd.cc-gnu-cxx-E.stdout.txt @@ -1 +1,2 @@ -^#define __cc_gnu__ 1$ +^#define __cc_gnu__ 1 +#define __cc_gnu_minor__ 1$ diff --git a/test/expect/cmd.cc-msvc-c-E.stdout.txt b/test/expect/cmd.cc-msvc-c-E.stdout.txt index 21445c4..a4cc19c 100644 --- a/test/expect/cmd.cc-msvc-c-E.stdout.txt +++ b/test/expect/cmd.cc-msvc-c-E.stdout.txt @@ -1 +1,2 @@ -^#define __cc_msvc__ 1$ +^#define __cc_msvc__ 1 +#define __cc_msvc_minor__ 1$ diff --git a/test/expect/cmd.cc-msvc-cxx-E.stdout.txt b/test/expect/cmd.cc-msvc-cxx-E.stdout.txt index 21445c4..a4cc19c 100644 --- a/test/expect/cmd.cc-msvc-cxx-E.stdout.txt +++ b/test/expect/cmd.cc-msvc-cxx-E.stdout.txt @@ -1 +1,2 @@ -^#define __cc_msvc__ 1$ +^#define __cc_msvc__ 1 +#define __cc_msvc_minor__ 1$ |