[cfe-commits] r98008 - in /cfe/trunk/test: CMakeLists.txt Headers/ Headers/typedef_guards.c
Ted Kremenek
kremenek at apple.com
Mon Mar 8 15:38:27 PST 2010
Author: kremenek
Date: Mon Mar 8 17:38:27 2010
New Revision: 98008
URL: http://llvm.org/viewvc/llvm-project?rev=98008&view=rev
Log:
Add test cases for r98003 and r98006.
Added:
cfe/trunk/test/Headers/
cfe/trunk/test/Headers/typedef_guards.c
Modified:
cfe/trunk/test/CMakeLists.txt
Modified: cfe/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CMakeLists.txt?rev=98008&r1=98007&r2=98008&view=diff
==============================================================================
--- cfe/trunk/test/CMakeLists.txt (original)
+++ cfe/trunk/test/CMakeLists.txt Mon Mar 8 17:38:27 2010
@@ -9,6 +9,7 @@
"Driver"
"FixIt"
"Frontend"
+ "Headers"
"Index"
"Lexer"
"Misc"
Added: cfe/trunk/test/Headers/typedef_guards.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Headers/typedef_guards.c?rev=98008&view=auto
==============================================================================
--- cfe/trunk/test/Headers/typedef_guards.c (added)
+++ cfe/trunk/test/Headers/typedef_guards.c Mon Mar 8 17:38:27 2010
@@ -0,0 +1,28 @@
+// RUN: %clang -fsyntax-only -verify %s
+
+// NULL is rdefined in stddef.h
+#define NULL ((void*) 0)
+
+// These are headers bundled with Clang.
+#include <stdarg.h>
+#include <stddef.h>
+
+#ifndef _VA_LIST
+typedef __builtin_va_list va_list;
+#endif
+
+#ifndef _SIZE_T
+typedef __typeof__(sizeof(int)) size_t;
+#endif
+
+#ifndef _WCHAR_T
+typedef __typeof__(*L"") wchar_t;
+#endif
+
+extern void foo(wchar_t x);
+extern void bar(size_t x);
+void *baz() { return NULL; }
+void quz() {
+ va_list y;
+}
+
More information about the cfe-commits
mailing list