diff options
author | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2011-02-20 13:06:31 +0000 |
commit | 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df (patch) | |
tree | a9243275843fbeaa590afc07ee888e006b8d54ea /test/Preprocessor/has_include.c | |
parent | 69b4eca4a4255ba43baa5c1d9bbdec3ec17f479e (diff) | |
download | FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.zip FreeBSD-src-39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df.tar.gz |
Vendor import of clang trunk r126079:
http://llvm.org/svn/llvm-project/cfe/trunk@126079
Diffstat (limited to 'test/Preprocessor/has_include.c')
-rw-r--r-- | test/Preprocessor/has_include.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/Preprocessor/has_include.c b/test/Preprocessor/has_include.c index c34c348..fdcae78 100644 --- a/test/Preprocessor/has_include.c +++ b/test/Preprocessor/has_include.c @@ -1,23 +1,23 @@ -// RUN: %clang_cc1 -Eonly -verify %s +// RUN: %clang_cc1 -ffreestanding -Eonly -verify %s // Try different path permutations of __has_include with existing file. -#if __has_include("stdio.h") +#if __has_include("stdint.h") #else #error "__has_include failed (1)." #endif -#if __has_include(<stdio.h>) +#if __has_include(<stdint.h>) #else #error "__has_include failed (2)." #endif // Try unary expression. -#if !__has_include("stdio.h") +#if !__has_include("stdint.h") #error "__has_include failed (5)." #endif // Try binary expression. -#if __has_include("stdio.h") && __has_include("stddef.h") +#if __has_include("stdint.h") && __has_include("stddef.h") #else #error "__has_include failed (6)." #endif @@ -44,12 +44,12 @@ #endif // Try unary expression. -#if !__has_include_next("stdio.h") // expected-warning {{#include_next in primary source file}} +#if !__has_include_next("stdint.h") // expected-warning {{#include_next in primary source file}} #error "__has_include_next failed (5)." #endif // Try binary expression. -#if __has_include_next("stdio.h") && __has_include("stddef.h") // expected-warning {{#include_next in primary source file}} +#if __has_include_next("stdint.h") && __has_include("stddef.h") // expected-warning {{#include_next in primary source file}} #else #error "__has_include_next failed (6)." #endif @@ -68,16 +68,16 @@ // FIXME: I don't quite know how to avoid preprocessor side effects. // Use FileCheck? // It also assert due to unterminated #if's. -//#if __has_include("stdio.h" -//#if __has_include "stdio.h") -//#if __has_include(stdio.h) +//#if __has_include("stdint.h" +//#if __has_include "stdint.h") +//#if __has_include(stdint.h) //#if __has_include() //#if __has_include( //#if __has_include) //#if __has_include -//#if __has_include(<stdio.h> -//#if __has_include<stdio.h>) -//#if __has_include("stdio.h) -//#if __has_include(stdio.h") -//#if __has_include(<stdio.h) -//#if __has_include(stdio.h>) +//#if __has_include(<stdint.h> +//#if __has_include<stdint.h>) +//#if __has_include("stdint.h) +//#if __has_include(stdint.h") +//#if __has_include(<stdint.h) +//#if __has_include(stdint.h>) |