[cfe-commits] r115617 - in /cfe/trunk/test: Index/c-index-api-loadTU-test.m PCH/Inputs/va_arg.h PCH/va_arg.cpp
Douglas Gregor
dgregor at apple.com
Tue Oct 5 07:55:45 PDT 2010
Author: dgregor
Date: Tue Oct 5 09:55:45 2010
New Revision: 115617
URL: http://llvm.org/viewvc/llvm-project?rev=115617&view=rev
Log:
Register the __builtin_va_list_type node when we parse it, rather than
waiting until we think we need it: we didn't catch all of the places
where we actually needed it, and we probably wouldn't ever. Fixes a
C++ PCH crasher.
Added:
cfe/trunk/test/PCH/Inputs/va_arg.h (with props)
cfe/trunk/test/PCH/va_arg.cpp (with props)
Modified:
cfe/trunk/test/Index/c-index-api-loadTU-test.m
Modified: cfe/trunk/test/Index/c-index-api-loadTU-test.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Index/c-index-api-loadTU-test.m?rev=115617&r1=115616&r2=115617&view=diff
==============================================================================
--- cfe/trunk/test/Index/c-index-api-loadTU-test.m (original)
+++ cfe/trunk/test/Index/c-index-api-loadTU-test.m Tue Oct 5 09:55:45 2010
@@ -28,7 +28,7 @@
@protocol SubP <Proto>
- spMethod;
- at end
+ at endxb
@interface Baz : Bar <SubP>
{
Added: cfe/trunk/test/PCH/Inputs/va_arg.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/Inputs/va_arg.h?rev=115617&view=auto
==============================================================================
--- cfe/trunk/test/PCH/Inputs/va_arg.h (added)
+++ cfe/trunk/test/PCH/Inputs/va_arg.h Tue Oct 5 09:55:45 2010
@@ -0,0 +1,2 @@
+#include <stdarg.h>
+
Propchange: cfe/trunk/test/PCH/Inputs/va_arg.h
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/trunk/test/PCH/Inputs/va_arg.h
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cfe/trunk/test/PCH/Inputs/va_arg.h
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: cfe/trunk/test/PCH/va_arg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/PCH/va_arg.cpp?rev=115617&view=auto
==============================================================================
--- cfe/trunk/test/PCH/va_arg.cpp (added)
+++ cfe/trunk/test/PCH/va_arg.cpp Tue Oct 5 09:55:45 2010
@@ -0,0 +1,16 @@
+// Test this without pch.
+// RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -include %S/Inputs/va_arg.h %s -emit-llvm -o -
+
+// Test with pch.
+// RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -emit-pch -x c++-header -o %t %S/Inputs/va_arg.h
+// RUN: %clang_cc1 -triple=x86_64-unknown-freebsd7.0 -include-pch %t %s -emit-llvm -o -
+
+typedef __SIZE_TYPE__ size_t;
+
+extern "C" {
+int vsnprintf(char * , size_t, const char * , va_list) ;
+}
+
+void f(char *buffer, unsigned count, const char* format, va_list argptr) {
+ vsnprintf(buffer, count, format, argptr);
+}
Propchange: cfe/trunk/test/PCH/va_arg.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: cfe/trunk/test/PCH/va_arg.cpp
------------------------------------------------------------------------------
svn:keywords = Id
Propchange: cfe/trunk/test/PCH/va_arg.cpp
------------------------------------------------------------------------------
svn:mime-type = text/plain
More information about the cfe-commits
mailing list