[llvm-branch-commits] [cfe-branch] r115673 - in /cfe/branches/Apple/whitney/test: Index/c-index-api-loadTU-test.m PCH/Inputs/va_arg.h PCH/va_arg.cpp

Daniel Dunbar daniel at zuster.org
Tue Oct 5 13:55:35 PDT 2010


Author: ddunbar
Date: Tue Oct  5 15:55:34 2010
New Revision: 115673

URL: http://llvm.org/viewvc/llvm-project?rev=115673&view=rev
Log:
Merge r115617:
--
Author: Douglas Gregor <dgregor at apple.com>
Date:   Tue Oct 5 14:55:45 2010 +0000

    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/branches/Apple/whitney/test/PCH/Inputs/va_arg.h
    cfe/branches/Apple/whitney/test/PCH/va_arg.cpp
Modified:
    cfe/branches/Apple/whitney/test/Index/c-index-api-loadTU-test.m

Modified: cfe/branches/Apple/whitney/test/Index/c-index-api-loadTU-test.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/Index/c-index-api-loadTU-test.m?rev=115673&r1=115672&r2=115673&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/test/Index/c-index-api-loadTU-test.m (original)
+++ cfe/branches/Apple/whitney/test/Index/c-index-api-loadTU-test.m Tue Oct  5 15:55:34 2010
@@ -28,7 +28,7 @@
 
 @protocol SubP <Proto>
 - spMethod;
- at end
+ at endxb
 
 @interface Baz : Bar <SubP>
 {

Added: cfe/branches/Apple/whitney/test/PCH/Inputs/va_arg.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/PCH/Inputs/va_arg.h?rev=115673&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/PCH/Inputs/va_arg.h (added)
+++ cfe/branches/Apple/whitney/test/PCH/Inputs/va_arg.h Tue Oct  5 15:55:34 2010
@@ -0,0 +1,2 @@
+#include <stdarg.h>
+

Added: cfe/branches/Apple/whitney/test/PCH/va_arg.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/PCH/va_arg.cpp?rev=115673&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/PCH/va_arg.cpp (added)
+++ cfe/branches/Apple/whitney/test/PCH/va_arg.cpp Tue Oct  5 15:55:34 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);
+}





More information about the llvm-branch-commits mailing list