[llvm-branch-commits] [cfe-branch] r159190 [2/2] - in /cfe/branches/tooling: ./ docs/ examples/PrintFunctionNames/ examples/analyzer-plugin/ examples/clang-interpreter/ include/clang-c/ include/clang/AST/ include/clang/Analysis/ include/clang/Basic/ include/clang/Comments/ include/clang/Driver/ include/clang/Frontend/ include/clang/Lex/ include/clang/Parse/ include/clang/Sema/ include/clang/Serialization/ include/clang/StaticAnalyzer/Core/ include/clang/StaticAnalyzer/Core/PathSensitive/ lib/ARCMigrate/ lib/AST/ lib/ASTMatche...
Manuel Klimek
klimek at google.com
Tue Jun 26 01:48:18 PDT 2012
Modified: cfe/branches/tooling/test/Rewriter/ivar-encoding-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/ivar-encoding-2.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/ivar-encoding-2.m (original)
+++ cfe/branches/tooling/test/Rewriter/ivar-encoding-2.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@implementation Intf
{
Modified: cfe/branches/tooling/test/Rewriter/metadata-test-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/metadata-test-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/metadata-test-1.m (original)
+++ cfe/branches/tooling/test/Rewriter/metadata-test-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@interface Intf
@end
Modified: cfe/branches/tooling/test/Rewriter/metadata-test-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/metadata-test-2.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/metadata-test-2.m (original)
+++ cfe/branches/tooling/test/Rewriter/metadata-test-2.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
typedef struct _NSPoint {
float x;
Modified: cfe/branches/tooling/test/Rewriter/method-encoding-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/method-encoding-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/method-encoding-1.m (original)
+++ cfe/branches/tooling/test/Rewriter/method-encoding-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@protocol P1
- (void) MyProtoMeth : (int **) arg1 : (void*) arg2;
Modified: cfe/branches/tooling/test/Rewriter/objc-encoding-bug-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/objc-encoding-bug-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/objc-encoding-bug-1.m (original)
+++ cfe/branches/tooling/test/Rewriter/objc-encoding-bug-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
typedef struct NSMethodFrameArgInfo {
struct NSMethodFrameArgInfo *subInfo;
Modified: cfe/branches/tooling/test/Rewriter/objc-ivar-receiver-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/objc-ivar-receiver-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/objc-ivar-receiver-1.m (original)
+++ cfe/branches/tooling/test/Rewriter/objc-ivar-receiver-1.m Tue Jun 26 03:48:15 2012
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o - | grep 'newInv->_container'
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o - | grep 'newInv->_container'
@interface NSMutableArray
- (void)addObject:(id)addObject;
Modified: cfe/branches/tooling/test/Rewriter/objc-modern-getclass-proto.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/objc-modern-getclass-proto.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/objc-modern-getclass-proto.mm (original)
+++ cfe/branches/tooling/test/Rewriter/objc-modern-getclass-proto.mm Tue Jun 26 03:48:15 2012
@@ -1,5 +1,5 @@
// RUN: %clang_cc1 -E %s -o %t.mm
-// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %t.mm -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %t.mm -o %t-rw.cpp
// rdar://11375495
@interface I @end
Modified: cfe/branches/tooling/test/Rewriter/objc-string-concat-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/objc-string-concat-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/objc-string-concat-1.m (original)
+++ cfe/branches/tooling/test/Rewriter/objc-string-concat-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@class NSString;
Modified: cfe/branches/tooling/test/Rewriter/objc-super-test.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/objc-super-test.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/objc-super-test.m (original)
+++ cfe/branches/tooling/test/Rewriter/objc-super-test.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o - | grep objc_msgSendSuper | grep MainMethod
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o - | grep objc_msgSendSuper | grep MainMethod
typedef struct objc_selector *SEL;
typedef struct objc_object *id;
Modified: cfe/branches/tooling/test/Rewriter/objc-synchronized-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/objc-synchronized-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/objc-synchronized-1.m (original)
+++ cfe/branches/tooling/test/Rewriter/objc-synchronized-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
id SYNCH_EXPR();
void SYNCH_BODY();
Modified: cfe/branches/tooling/test/Rewriter/properties.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/properties.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/properties.m (original)
+++ cfe/branches/tooling/test/Rewriter/properties.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fms-extensions -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
void *sel_registerName(const char *);
Modified: cfe/branches/tooling/test/Rewriter/property-dot-syntax.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/property-dot-syntax.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/property-dot-syntax.mm (original)
+++ cfe/branches/tooling/test/Rewriter/property-dot-syntax.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// rdar:// 8520727
Modified: cfe/branches/tooling/test/Rewriter/protocol-rewrite-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/protocol-rewrite-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/protocol-rewrite-1.m (original)
+++ cfe/branches/tooling/test/Rewriter/protocol-rewrite-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
typedef struct MyWidget {
int a;
Modified: cfe/branches/tooling/test/Rewriter/protocol-rewrite-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/protocol-rewrite-2.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/protocol-rewrite-2.m (original)
+++ cfe/branches/tooling/test/Rewriter/protocol-rewrite-2.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o %t.cpp
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t.cpp
// RUN: %clang_cc1 -fsyntax-only %t.cpp
// rdar://10234024
Modified: cfe/branches/tooling/test/Rewriter/rewrite-anonymous-union.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-anonymous-union.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-anonymous-union.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-anonymous-union.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi -o - %s
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -o - %s
// rdar://6948022
typedef unsigned int uint32_t;
Modified: cfe/branches/tooling/test/Rewriter/rewrite-api-bug.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-api-bug.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-api-bug.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-api-bug.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@interface MyDerived
- (void) instanceMethod;
Modified: cfe/branches/tooling/test/Rewriter/rewrite-block-argument.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-block-argument.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-block-argument.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-block-argument.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" -emit-llvm -o %t %t-rw.cpp
// radar 7987817
Modified: cfe/branches/tooling/test/Rewriter/rewrite-block-consts.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-block-consts.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-block-consts.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-block-consts.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D__block="" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// rdar:// 8243071
Modified: cfe/branches/tooling/test/Rewriter/rewrite-block-ivar-call.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-block-ivar-call.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-block-ivar-call.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-block-ivar-call.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -fblocks -rewrite-objc -fobjc-fragile-abi -o - %s
+// RUN: %clang_cc1 -x objective-c++ -fblocks -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -o - %s
@interface Foo {
void (^_block)(void);
Modified: cfe/branches/tooling/test/Rewriter/rewrite-block-literal-1.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-block-literal-1.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-block-literal-1.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-block-literal-1.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// radar 9254348
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-block-literal.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-block-literal.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-block-literal.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-block-literal.mm Tue Jun 26 03:48:15 2012
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 -E %s -o %t.mm
// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-block-pointer.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-block-pointer.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-block-pointer.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-block-pointer.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-block-property.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-block-property.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-block-property.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-block-property.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// rdar://9055596
Modified: cfe/branches/tooling/test/Rewriter/rewrite-byref-in-nested-blocks.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-byref-in-nested-blocks.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-byref-in-nested-blocks.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-byref-in-nested-blocks.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-modern-rw.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-byref-vars.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-byref-vars.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-byref-vars.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-byref-vars.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// radar 7540194
@@ -53,5 +53,5 @@
- (void) Meth { __attribute__((__blocks__(byref))) void ** listp = (void **)list; }
@end
-// $CLANG -cc1 -fms-extensions -rewrite-objc -fobjc-fragile-abi -x objective-c++ -fblocks bug.mm
+// $CLANG -cc1 -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -x objective-c++ -fblocks bug.mm
// g++ -c -D"__declspec(X)=" bug.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-cast-ivar-access.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-cast-ivar-access.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-cast-ivar-access.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-cast-ivar-access.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s
// radar 7575882
Modified: cfe/branches/tooling/test/Rewriter/rewrite-cast-to-bool.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-cast-to-bool.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-cast-to-bool.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-cast-to-bool.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// radar 9899834
Modified: cfe/branches/tooling/test/Rewriter/rewrite-category-property.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-category-property.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-category-property.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-category-property.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s
// radar 7630636
Modified: cfe/branches/tooling/test/Rewriter/rewrite-constructor-init.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-constructor-init.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-constructor-init.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-constructor-init.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// rdar : // 8213998
Modified: cfe/branches/tooling/test/Rewriter/rewrite-eh.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-eh.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-eh.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-eh.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi -fobjc-exceptions -o - %s
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -fobjc-exceptions -o - %s
// rdar://7522880
@interface NSException
Modified: cfe/branches/tooling/test/Rewriter/rewrite-elaborated-type.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-elaborated-type.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-elaborated-type.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-elaborated-type.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D_Bool=bool -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D_Bool=bool -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-extern-c.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-extern-c.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-extern-c.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-extern-c.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -fblocks -rewrite-objc -fobjc-fragile-abi -o - %s
+// RUN: %clang_cc1 -x objective-c++ -fblocks -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -o - %s
// radar 7546096
extern "C" {
Modified: cfe/branches/tooling/test/Rewriter/rewrite-foreach-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-foreach-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-foreach-1.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-foreach-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@protocol P @end
Modified: cfe/branches/tooling/test/Rewriter/rewrite-foreach-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-foreach-2.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-foreach-2.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-foreach-2.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@protocol P @end
Modified: cfe/branches/tooling/test/Rewriter/rewrite-foreach-3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-foreach-3.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-foreach-3.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-foreach-3.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@protocol P @end
Modified: cfe/branches/tooling/test/Rewriter/rewrite-foreach-4.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-foreach-4.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-foreach-4.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-foreach-4.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@interface MyList
- (id) allKeys;
Modified: cfe/branches/tooling/test/Rewriter/rewrite-foreach-5.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-foreach-5.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-foreach-5.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-foreach-5.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
void *sel_registerName(const char *);
Modified: cfe/branches/tooling/test/Rewriter/rewrite-foreach-6.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-foreach-6.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-foreach-6.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-foreach-6.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// rdar://5716356
// FIXME: Should be able to pipe into clang, but code is not
Modified: cfe/branches/tooling/test/Rewriter/rewrite-foreach-7.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-foreach-7.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-foreach-7.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-foreach-7.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@class NSArray;
int main() {
Modified: cfe/branches/tooling/test/Rewriter/rewrite-foreach-in-block.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-foreach-in-block.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-foreach-in-block.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-foreach-in-block.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-foreach-protocol-id.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-foreach-protocol-id.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-foreach-protocol-id.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-foreach-protocol-id.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// rdar:// 9039342
Modified: cfe/branches/tooling/test/Rewriter/rewrite-forward-class.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-forward-class.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-forward-class.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-forward-class.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// rdar://6969189
Modified: cfe/branches/tooling/test/Rewriter/rewrite-forward-class.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-forward-class.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-forward-class.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-forward-class.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
extern "C" {
Modified: cfe/branches/tooling/test/Rewriter/rewrite-function-decl.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-function-decl.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-function-decl.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-function-decl.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fms-extensions -rewrite-objc -fobjc-fragile-abi -x objective-c++ -fblocks -o - %s
+// RUN: %clang_cc1 -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -x objective-c++ -fblocks -o - %s
extern "C" __declspec(dllexport) void BreakTheRewriter(void) {
__block int aBlockVariable = 0;
Modified: cfe/branches/tooling/test/Rewriter/rewrite-implementation.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-implementation.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-implementation.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-implementation.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// radar 7649577
Modified: cfe/branches/tooling/test/Rewriter/rewrite-ivar-use.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-ivar-use.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-ivar-use.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-ivar-use.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"Class=void*" -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// radar 7490331
Modified: cfe/branches/tooling/test/Rewriter/rewrite-local-externs-in-block.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-local-externs-in-block.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-local-externs-in-block.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-local-externs-in-block.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// radar 7735987
Modified: cfe/branches/tooling/test/Rewriter/rewrite-local-static-id.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-local-static-id.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-local-static-id.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-local-static-id.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" -emit-llvm -o %t %t-rw.cpp
// radar 7946975
Modified: cfe/branches/tooling/test/Rewriter/rewrite-message-expr.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-message-expr.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-message-expr.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-message-expr.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s
// radar 7617047
Modified: cfe/branches/tooling/test/Rewriter/rewrite-nest.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-nest.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-nest.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-nest.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@interface NSMapTable @end
@interface NSEnumerator @end
Modified: cfe/branches/tooling/test/Rewriter/rewrite-nested-blocks-1.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-nested-blocks-1.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-nested-blocks-1.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-nested-blocks-1.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-nested-blocks-2.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-nested-blocks-2.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-nested-blocks-2.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-nested-blocks-2.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// grep "static void __FUNC_block_copy_" %t-rw.cpp | count 2
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-nested-blocks.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-nested-blocks.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-nested-blocks.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-nested-blocks.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-nested-ivar.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-nested-ivar.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-nested-ivar.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-nested-ivar.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw-modern.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw-modern.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-nested-property-in-blocks.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-nested-property-in-blocks.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-nested-property-in-blocks.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-nested-property-in-blocks.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fms-extensions -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fms-extensions -Wno-address-of-temporary -Did="void *" -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-no-nextline.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-no-nextline.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-no-nextline.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-no-nextline.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// radar 7946975
Modified: cfe/branches/tooling/test/Rewriter/rewrite-property-attributes.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-property-attributes.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-property-attributes.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-property-attributes.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// radar 7214439
Modified: cfe/branches/tooling/test/Rewriter/rewrite-property-set-cfstring.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-property-set-cfstring.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-property-set-cfstring.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-property-set-cfstring.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// rdar:// 8527018
Modified: cfe/branches/tooling/test/Rewriter/rewrite-protocol-property.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-protocol-property.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-protocol-property.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-protocol-property.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -Did="void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// rdar:// 8558702
Modified: cfe/branches/tooling/test/Rewriter/rewrite-protocol-qualified.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-protocol-qualified.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-protocol-qualified.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-protocol-qualified.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"id=void*" -D"__declspec(X)=" %t-rw.cpp
// radar 7589414
Modified: cfe/branches/tooling/test/Rewriter/rewrite-protocol-type-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-protocol-type-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-protocol-type-1.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-protocol-type-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@protocol MyProto1
@end
Modified: cfe/branches/tooling/test/Rewriter/rewrite-qualified-id.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-qualified-id.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-qualified-id.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-qualified-id.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// radar 7680953
Modified: cfe/branches/tooling/test/Rewriter/rewrite-rewritten-initializer.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-rewritten-initializer.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-rewritten-initializer.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-rewritten-initializer.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw.cpp
// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc %s -o %t-rw-modern.cpp
// RUN: %clang_cc1 -fsyntax-only -Werror -Wno-address-of-temporary -D"SEL=void*" -U__declspec -D"__declspec(X)=" %t-rw-modern.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-static-block.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-static-block.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-static-block.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-static-block.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp -emit-llvm -o %t-rw.ll
// RUN: FileCheck --input-file=%t-rw.ll %s
Modified: cfe/branches/tooling/test/Rewriter/rewrite-super-message.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-super-message.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-super-message.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-super-message.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -DKEEP_ATTRIBUTES -D"id=struct objc_object *" -D"Class=struct objc_class *" -D"SEL=void*" -D"__declspec(X)=" -emit-llvm -o - %t-rw.cpp | FileCheck %t-rw.cpp
// radar 7738453
Modified: cfe/branches/tooling/test/Rewriter/rewrite-trivial-constructor.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-trivial-constructor.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-trivial-constructor.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-trivial-constructor.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fms-extensions -rewrite-objc -fobjc-fragile-abi -x objective-c++ -fblocks -o - %s
+// RUN: %clang_cc1 -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -x objective-c++ -fblocks -o - %s
// radar 7537770
typedef struct {
Modified: cfe/branches/tooling/test/Rewriter/rewrite-try-catch.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-try-catch.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-try-catch.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-try-catch.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@interface Foo @end
@interface GARF @end
Modified: cfe/branches/tooling/test/Rewriter/rewrite-typeof.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-typeof.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-typeof.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-typeof.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: FileCheck -check-prefix LP --input-file=%t-rw.cpp %s
extern "C" {
Modified: cfe/branches/tooling/test/Rewriter/rewrite-unique-block-api.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-unique-block-api.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-unique-block-api.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-unique-block-api.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %s -o %t-modern-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -Wno-address-of-temporary -D"SEL=void*" -D"__declspec(X)=" %t-modern-rw.cpp
Modified: cfe/branches/tooling/test/Rewriter/rewrite-user-defined-accessors.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-user-defined-accessors.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-user-defined-accessors.mm (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-user-defined-accessors.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -Did="void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// rdar:// 8570020
Modified: cfe/branches/tooling/test/Rewriter/rewrite-vararg.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-vararg.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-vararg.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-vararg.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-fragile-abi %s -o %t-rw.cpp
+// RUN: %clang_cc1 -x objective-c++ -Wno-return-type -fblocks -fms-extensions -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o %t-rw.cpp
// RUN: %clang_cc1 -fsyntax-only -fblocks -Wno-address-of-temporary -D"id=void*" -D"SEL=void*" -D"__declspec(X)=" %t-rw.cpp
// rdar://9056351
Modified: cfe/branches/tooling/test/Rewriter/rewrite-weak-attr.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/rewrite-weak-attr.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/rewrite-weak-attr.m (original)
+++ cfe/branches/tooling/test/Rewriter/rewrite-weak-attr.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i686-pc-win32 -fms-extensions -fblocks -Dnil=0 -rewrite-objc -fobjc-fragile-abi -o - %s
+// RUN: %clang_cc1 -triple i686-pc-win32 -fms-extensions -fblocks -Dnil=0 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 -o - %s
int main() {
__weak __block id foo = nil;
__block id foo2 = nil;
Modified: cfe/branches/tooling/test/Rewriter/static-type-protocol-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/static-type-protocol-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/static-type-protocol-1.m (original)
+++ cfe/branches/tooling/test/Rewriter/static-type-protocol-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@protocol Proto
- (void) ProtoDidget;
Modified: cfe/branches/tooling/test/Rewriter/undecl-objc-h.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/undecl-objc-h.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/undecl-objc-h.m (original)
+++ cfe/branches/tooling/test/Rewriter/undecl-objc-h.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
typedef struct S {
int * pint;
Modified: cfe/branches/tooling/test/Rewriter/undeclared-method-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/undeclared-method-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/undeclared-method-1.m (original)
+++ cfe/branches/tooling/test/Rewriter/undeclared-method-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@interface Derived @end
Modified: cfe/branches/tooling/test/Rewriter/undef-field-reference-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/undef-field-reference-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/undef-field-reference-1.m (original)
+++ cfe/branches/tooling/test/Rewriter/undef-field-reference-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
@interface MyDerived
{
Modified: cfe/branches/tooling/test/Rewriter/va-method.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/va-method.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/va-method.m (original)
+++ cfe/branches/tooling/test/Rewriter/va-method.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
#include <stdarg.h>
Modified: cfe/branches/tooling/test/Rewriter/weak_byref_objects.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Rewriter/weak_byref_objects.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Rewriter/weak_byref_objects.m (original)
+++ cfe/branches/tooling/test/Rewriter/weak_byref_objects.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fblocks -triple i386-apple-darwin9 -fobjc-gc -rewrite-objc -fobjc-fragile-abi %s -o -
+// RUN: %clang_cc1 -fblocks -triple i386-apple-darwin9 -fobjc-gc -rewrite-objc -fobjc-runtime=macosx-fragile-10.5 %s -o -
#define nil 0
int main() {
Modified: cfe/branches/tooling/test/Sema/MicrosoftCompatibility.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Sema/MicrosoftCompatibility.c?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Sema/MicrosoftCompatibility.c (original)
+++ cfe/branches/tooling/test/Sema/MicrosoftCompatibility.c Tue Jun 26 03:48:15 2012
@@ -1,6 +1,6 @@
// RUN: %clang_cc1 %s -fsyntax-only -Wno-unused-value -Wmicrosoft -verify -fms-compatibility
-enum ENUM1; // expected-warning {{forward references to 'enum' types are a Microsoft extension}}
+enum ENUM1; // expected-warning {{forward references to 'enum' types are a Microsoft extension}}
enum ENUM1 var1 = 3;
enum ENUM1* var2 = 0;
@@ -14,3 +14,8 @@
__declspec(noreturn) void f6( void ) {
return; // expected-warning {{function 'f6' declared 'noreturn' should not return}}
}
+
+__declspec(align(32768)) struct S1 { int a; } s; /* expected-error {{requested alignment must be 8192 bytes or smaller}} */
+struct __declspec(aligned) S2 {}; /* expected-warning {{unknown __declspec attribute 'aligned' ignored}} */
+
+struct __declspec(appdomain) S3 {}; /* expected-warning {{__declspec attribute 'appdomain' is not supported}} */
\ No newline at end of file
Modified: cfe/branches/tooling/test/Sema/MicrosoftExtensions.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Sema/MicrosoftExtensions.c?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Sema/MicrosoftExtensions.c (original)
+++ cfe/branches/tooling/test/Sema/MicrosoftExtensions.c Tue Jun 26 03:48:15 2012
@@ -93,6 +93,8 @@
#define MY_TEXT "This is also deprecated"
__declspec(deprecated(MY_TEXT)) void Dfunc1( void ) {} // expected-note {{'Dfunc1' declared here}}
+struct __declspec(deprecated(123)) DS2 {}; // expected-error {{argument to deprecated attribute was not a string literal}}
+
void test( void ) {
e1 = one; // expected-warning {{'e1' is deprecated: This is deprecated}}
struct DS1 s = { 0 }; // expected-warning {{'DS1' is deprecated}}
Modified: cfe/branches/tooling/test/Sema/alloc_size.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Sema/alloc_size.c?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Sema/alloc_size.c (original)
+++ cfe/branches/tooling/test/Sema/alloc_size.c Tue Jun 26 03:48:15 2012
@@ -17,6 +17,10 @@
void* fn7(unsigned) __attribute__((alloc_size)); // expected-error {{attribute takes at least 1 argument}}
-void *fn8(int, int) __attribute__((alloc_size(1, 1))); // expected-error {{attribute parameter 2 is duplicated}}
+void *fn8(int, int) __attribute__((alloc_size(1, 1))); // OK
void* fn9(unsigned) __attribute__((alloc_size(12345678901234567890123))); // expected-warning {{integer constant is too large for its type}} // expected-error {{attribute parameter 1 is out of bounds}}
+
+void* fn10(size_t, size_t) __attribute__((alloc_size(1,2))); // expected-error{{redefinition of parameter}} \
+ // expected-error{{a parameter list without types is only allowed in a function definition}} \
+ // expected-warning{{alloc_size attribute only applies to functions and methods}}
Modified: cfe/branches/tooling/test/Sema/inline.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Sema/inline.c?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Sema/inline.c (original)
+++ cfe/branches/tooling/test/Sema/inline.c Tue Jun 26 03:48:15 2012
@@ -1,6 +1,78 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
+#if defined(INCLUDE)
+// -------
+// This section acts like a header file.
+// -------
+
+// Check the use of static variables in non-static inline functions.
+static int staticVar; // expected-note + {{'staticVar' declared here}}
+static int staticFunction(); // expected-note + {{'staticFunction' declared here}}
+static struct { int x; } staticStruct; // expected-note + {{'staticStruct' declared here}}
+
+inline int useStatic () { // expected-note 3 {{use 'static' to give inline function 'useStatic' internal linkage}}
+ staticFunction(); // expected-warning{{static function 'staticFunction' is used in an inline function with external linkage}}
+ (void)staticStruct.x; // expected-warning{{static variable 'staticStruct' is used in an inline function with external linkage}}
+ return staticVar; // expected-warning{{static variable 'staticVar' is used in an inline function with external linkage}}
+}
+
+extern inline int useStaticFromExtern () { // no suggestions
+ staticFunction(); // expected-warning{{static function 'staticFunction' is used in an inline function with external linkage}}
+ return staticVar; // expected-warning{{static variable 'staticVar' is used in an inline function with external linkage}}
+}
+
+static inline int useStaticFromStatic () {
+ staticFunction(); // no-warning
+ return staticVar; // no-warning
+}
+
+extern inline int useStaticInlineFromExtern () {
+ // Heuristic: if the function we're using is also inline, don't warn.
+ // This can still be wrong (in this case, we end up inlining calls to
+ // staticFunction and staticVar) but this got very noisy even using
+ // standard headers.
+ return useStaticFromStatic(); // no-warning
+}
+
+static int constFunction() __attribute__((const));
+
+inline int useConst () {
+ return constFunction(); // no-warning
+}
+
+#else
+// -------
+// This is the main source file.
+// -------
+
+#define INCLUDE
+#include "inline.c"
+
// Check that we don't allow illegal uses of inline
inline int a; // expected-error{{'inline' can only appear on functions}}
typedef inline int b; // expected-error{{'inline' can only appear on functions}}
int d(inline int a); // expected-error{{'inline' can only appear on functions}}
+
+// Check that the warnings from the "header file" aren't on by default in
+// the main source file.
+
+inline int useStaticMainFile () {
+ staticFunction(); // no-warning
+ return staticVar; // no-warning
+}
+
+// Check that the warnings show up when explicitly requested.
+
+#pragma clang diagnostic push
+#pragma clang diagnostic warning "-Wstatic-in-inline"
+
+inline int useStaticAgain () { // expected-note 2 {{use 'static' to give inline function 'useStaticAgain' internal linkage}}
+ staticFunction(); // expected-warning{{static function 'staticFunction' is used in an inline function with external linkage}}
+ return staticVar; // expected-warning{{static variable 'staticVar' is used in an inline function with external linkage}}
+}
+
+#pragma clang diagnostic pop
+
+#endif
+
+
Modified: cfe/branches/tooling/test/Sema/uninit-variables.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/Sema/uninit-variables.c?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/Sema/uninit-variables.c (original)
+++ cfe/branches/tooling/test/Sema/uninit-variables.c Tue Jun 26 03:48:15 2012
@@ -437,3 +437,32 @@
int c; // expected-note {{initialize the variable 'c' to silence this warning}}
ASSIGN(int, c, d); // expected-warning {{variable 'c' is uninitialized when used here}}
}
+
+// Taking the address is fine
+struct { struct { void *p; } a; } test55 = { { &test55.a }}; // no-warning
+struct { struct { void *p; } a; } test56 = { { &(test56.a) }}; // no-warning
+
+void uninit_in_loop() {
+ int produce(void);
+ void consume(int);
+ for (int n = 0; n < 100; ++n) {
+ int k; // expected-note {{initialize}}
+ consume(k); // expected-warning {{variable 'k' is uninitialized}}
+ k = produce();
+ }
+}
+
+void uninit_in_loop_goto() {
+ int produce(void);
+ void consume(int);
+ for (int n = 0; n < 100; ++n) {
+ goto skip_decl;
+ int k; // expected-note {{initialize}}
+skip_decl:
+ // FIXME: This should produce the 'is uninitialized' diagnostic, but we
+ // don't have enough information in the CFG to easily tell that the
+ // variable's scope has been left and re-entered.
+ consume(k); // expected-warning {{variable 'k' may be uninitialized}}
+ k = produce();
+ }
+}
Modified: cfe/branches/tooling/test/SemaCXX/conversion.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaCXX/conversion.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaCXX/conversion.cpp (original)
+++ cfe/branches/tooling/test/SemaCXX/conversion.cpp Tue Jun 26 03:48:15 2012
@@ -69,6 +69,7 @@
char ch = NULL; // expected-warning {{implicit conversion of NULL constant to 'char'}}
unsigned char uch = NULL; // expected-warning {{implicit conversion of NULL constant to 'unsigned char'}}
short sh = NULL; // expected-warning {{implicit conversion of NULL constant to 'short'}}
+ double dbl = NULL; // expected-warning {{implicit conversion of NULL constant to 'double'}}
// Use FileCheck to ensure we don't get any unnecessary macro-expansion notes
// (that don't appear as 'real' notes & can't be seen/tested by -verify)
@@ -89,6 +90,14 @@
;
do ;
while(NULL_COND(true));
+ int *ip = NULL;
+ int (*fp)() = NULL;
+ struct foo {
+ int n;
+ void func();
+ };
+ int foo::*datamem = NULL;
+ int (foo::*funmem)() = NULL;
}
namespace test4 {
Modified: cfe/branches/tooling/test/SemaCXX/cxx98-compat-pedantic.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaCXX/cxx98-compat-pedantic.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaCXX/cxx98-compat-pedantic.cpp (original)
+++ cfe/branches/tooling/test/SemaCXX/cxx98-compat-pedantic.cpp Tue Jun 26 03:48:15 2012
@@ -9,7 +9,7 @@
#line 32768 // expected-warning {{#line number greater than 32767 is incompatible with C++98}}
#define VA_MACRO(x, ...) x // expected-warning {{variadic macros are incompatible with C++98}}
-VA_MACRO(,x) // expected-warning {{empty macro argument list is incompatible with C++98}}
+VA_MACRO(,x) // expected-warning {{empty macro arguments are incompatible with C++98}}
; // expected-warning {{extra ';' outside of a function is incompatible with C++98}}
Modified: cfe/branches/tooling/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp (original)
+++ cfe/branches/tooling/test/SemaCXX/switch-implicit-fallthrough-per-method.cpp Tue Jun 26 03:48:15 2012
@@ -1,18 +1,18 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wimplicit-fallthrough-per-method %s
+// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 -Wimplicit-fallthrough-per-function %s
int fallthrough(int n) {
switch (n / 10) {
case 0:
n += 100;
- case 1: // expected-warning{{unannotated fall-through between switch labels in partly annotated method}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
+ case 1: // expected-warning{{unannotated fall-through}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
switch (n) {
case 111:
n += 111;
[[clang::fallthrough]];
case 112:
n += 112;
- case 113: // expected-warning{{unannotated fall-through between switch labels in partly annotated method}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
+ case 113: // expected-warning{{unannotated fall-through}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
n += 113;
break ;
}
@@ -37,3 +37,15 @@
}
return n;
}
+
+void unscoped(int n) {
+ switch (n % 2) {
+ case 0:
+ // FIXME: This should be typo-corrected, probably.
+ [[fallthrough]];
+ case 2: // expected-warning{{unannotated fall-through}} expected-note{{clang::fallthrough}} expected-note{{break;}}
+ [[clang::fallthrough]];
+ case 1:
+ break;
+ }
+}
Modified: cfe/branches/tooling/test/SemaCXX/switch-implicit-fallthrough.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaCXX/switch-implicit-fallthrough.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaCXX/switch-implicit-fallthrough.cpp (original)
+++ cfe/branches/tooling/test/SemaCXX/switch-implicit-fallthrough.cpp Tue Jun 26 03:48:15 2012
@@ -156,6 +156,24 @@
case 223: // expected-warning{{unannotated fall-through between switch labels}} expected-note{{insert '[[clang::fallthrough]];' to silence this warning}} expected-note{{insert 'break;' to avoid fall-through}}
[[clang::fallthrough]]; // expected-warning{{fallthrough annotation does not directly precede switch label}}
}
+
+ // TODO: uncomment this test after CFG gets more options to deal with
+ // unreachable code:
+ // http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120507/057370.html
+#if 0
+ long p = static_cast<long>(n) * n;
+ switch (sizeof(p)) {
+ case 9: // this test will not work on compilers with 72-bit long
+ n += static_cast<int>(p >> 32);
+ [[clang::fallthrough]]; // no warning here
+ case 5: // it is not intended to work on compilers with 40-bit long as well
+ n += static_cast<int>(p);
+ break;
+ default:
+ break;
+ }
+#endif
+
return n;
}
Modified: cfe/branches/tooling/test/SemaCXX/typo-correction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaCXX/typo-correction.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaCXX/typo-correction.cpp (original)
+++ cfe/branches/tooling/test/SemaCXX/typo-correction.cpp Tue Jun 26 03:48:15 2012
@@ -219,3 +219,11 @@
f(&S<int>::foo); // expected-error-re{{no member named 'foo' in 'PR13051::S<int>'$}}
}
}
+
+namespace PR6325 {
+class foo { }; // expected-note{{'foo' declared here}}
+// Note that for this example (pulled from the PR), if keywords are not excluded
+// as correction candidates then no suggestion would be given; correcting
+// 'boo' to 'bool' is the same edit distance as correcting 'boo' to 'foo'.
+class bar : boo { }; // expected-error{{unknown class name 'boo'; did you mean 'foo'?}}
+}
Modified: cfe/branches/tooling/test/SemaCXX/user-defined-conversions.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaCXX/user-defined-conversions.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaCXX/user-defined-conversions.cpp (original)
+++ cfe/branches/tooling/test/SemaCXX/user-defined-conversions.cpp Tue Jun 26 03:48:15 2012
@@ -69,7 +69,7 @@
}
struct X1 {
- X1(X1&); // expected-note{{candidate constructor not viable: no known conversion from 'X1' to 'X1 &' for 1st argument}}
+ X1(X1&); // expected-note{{candidate constructor not viable: expects an l-value for 1st argument}}
};
struct X2 {
Modified: cfe/branches/tooling/test/SemaCXX/warn-thread-safety-analysis.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaCXX/warn-thread-safety-analysis.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaCXX/warn-thread-safety-analysis.cpp (original)
+++ cfe/branches/tooling/test/SemaCXX/warn-thread-safety-analysis.cpp Tue Jun 26 03:48:15 2012
@@ -178,14 +178,11 @@
void sls_fun_bad_4() {
if (getBool())
- sls_mu.Lock(); // \
- expected-warning{{mutex 'sls_mu2' is not locked on every path through here}} \
- expected-note{{mutex acquired here}}
-
+ sls_mu.Lock(); // expected-note{{mutex acquired here}}
else
- sls_mu2.Lock(); // \
- expected-note{{mutex acquired here}}
-} // expected-warning{{mutex 'sls_mu' is not locked on every path through here}}
+ sls_mu2.Lock(); // expected-note{{mutex acquired here}}
+} // expected-warning{{mutex 'sls_mu' is not locked on every path through here}} \
+ // expected-warning{{mutex 'sls_mu2' is not locked on every path through here}}
void sls_fun_bad_5() {
sls_mu.Lock(); // expected-note {{mutex acquired here}}
@@ -226,15 +223,14 @@
void sls_fun_bad_8() {
sls_mu.Lock(); // expected-note{{mutex acquired here}}
- // FIXME: TERRIBLE SOURCE LOCATION!
- do { // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
- sls_mu.Unlock();
+ do {
+ sls_mu.Unlock(); // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
} while (getBool());
}
void sls_fun_bad_9() {
do {
- sls_mu.Lock(); // \
+ sls_mu.Lock(); // \
// expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}} \
// expected-note{{mutex acquired here}}
} while (getBool());
@@ -242,15 +238,15 @@
}
void sls_fun_bad_10() {
- sls_mu.Lock(); // expected-note 2{{mutex acquired here}}
- while(getBool()) {
- sls_mu.Unlock(); // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
+ sls_mu.Lock(); // expected-note 2{{mutex acquired here}}
+ while(getBool()) { // expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
+ sls_mu.Unlock();
}
} // expected-warning{{mutex 'sls_mu' is still locked at the end of function}}
void sls_fun_bad_11() {
while (getBool()) { // \
- expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
+ expected-warning{{expecting mutex 'sls_mu' to be locked at start of each loop}}
sls_mu.Lock(); // expected-note {{mutex acquired here}}
}
sls_mu.Unlock(); // \
@@ -2239,6 +2235,26 @@
}
-} // end namespace
+} // end namespace MoreLockExpressions
+
+
+namespace TrylockJoinPoint {
+
+class Foo {
+ Mutex mu;
+ bool c;
+
+ void foo() {
+ if (c) {
+ if (!mu.TryLock())
+ return;
+ } else {
+ mu.Lock();
+ }
+ mu.Unlock();
+ }
+};
+
+} // end namespace TrylockJoinPoint
Propchange: cfe/branches/tooling/test/SemaCXX/warn-unreachable.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jun 26 03:48:15 2012
@@ -1,2 +1,2 @@
/cfe/branches/type-system-rewrite/test/SemaCXX/warn-unreachable.cpp:134693-134817
-/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,146581-158512
+/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,146581-159133
Modified: cfe/branches/tooling/test/SemaCXX/warn-unused-member.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaCXX/warn-unused-member.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaCXX/warn-unused-member.cpp (original)
+++ cfe/branches/tooling/test/SemaCXX/warn-unused-member.cpp Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -Wunused-private-field -verify -std=c++11 %s
+// RUN: %clang_cc1 -fsyntax-only -Wunused-private-field -Wused-but-marked-unused -verify -std=c++11 %s
class NotFullyDefined {
public:
@@ -93,6 +93,7 @@
trivial_(), user_constructor_(42),
initialized_with_side_effect_(side_effect()) {
used_ = 42;
+ attr_used_ = 42; // expected-warning{{'attr_used_' was marked unused but was used}}
}
A(int x, A* a) : pointer_(a) {}
@@ -116,7 +117,8 @@
NonTrivialConstructor non_trivial_constructor_;
NonTrivialDestructor non_trivial_destructor_;
- int attr_ __attribute__((unused));
+ int attr_ __attribute__((unused));
+ int attr_used_ __attribute__((unused));
};
class EverythingUsed {
Modified: cfe/branches/tooling/test/SemaObjC/at-defs.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/at-defs.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/at-defs.m (original)
+++ cfe/branches/tooling/test/SemaObjC/at-defs.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-unknown-unknown -fobjc-fragile-abi %s -fsyntax-only
+// RUN: %clang_cc1 -triple i386-unknown-unknown -fobjc-runtime=macosx-fragile-10.5 %s -fsyntax-only
@interface Test {
double a;
Modified: cfe/branches/tooling/test/SemaObjC/blocks.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/blocks.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/blocks.m (original)
+++ cfe/branches/tooling/test/SemaObjC/blocks.m Tue Jun 26 03:48:15 2012
@@ -73,3 +73,130 @@
NSLog(@"%@", myBlock);
}
+
+// In C, enum constants have the type of the underlying integer type, not the
+// enumeration they are part of. We pretend the constants have enum type when
+// inferring block return types, so that they can be mixed-and-matched with
+// other expressions of enum type.
+enum CStyleEnum {
+ CSE_Value = 1
+};
+enum CStyleEnum getCSE();
+typedef enum CStyleEnum (^cse_block_t)();
+
+void testCStyleEnumInference(bool arg) {
+ cse_block_t a;
+
+ // No warnings here.
+ a = ^{ return CSE_Value; };
+ a = ^{ return getCSE(); };
+
+ a = ^{ // expected-error {{incompatible block pointer types assigning to 'cse_block_t' (aka 'enum CStyleEnum (^)()') from 'int (^)(void)'}}
+ return 1;
+ };
+
+ // No warnings here.
+ a = ^{ if (arg) return CSE_Value; else return CSE_Value; };
+ a = ^{ if (arg) return getCSE(); else return getCSE(); };
+ a = ^{ if (arg) return CSE_Value; else return getCSE(); };
+ a = ^{ if (arg) return getCSE(); else return CSE_Value; };
+
+ // Technically these two blocks should return 'int'.
+ // The first case is easy to handle -- just don't cast the enum constant
+ // to the enum type. However, the second guess would require going back
+ // and REMOVING the cast from the first return statement, which isn't really
+ // feasible (there may be more than one previous return statement with enum
+ // type). For symmetry, we just treat them the same way.
+ a = ^{ // expected-error {{incompatible block pointer types assigning to 'cse_block_t' (aka 'enum CStyleEnum (^)()') from 'int (^)(void)'}}
+ if (arg)
+ return 1;
+ else
+ return CSE_Value; // expected-error {{return type 'enum CStyleEnum' must match previous return type 'int'}}
+ };
+
+ a = ^{
+ if (arg)
+ return CSE_Value;
+ else
+ return 1; // expected-error {{return type 'int' must match previous return type 'enum CStyleEnum'}}
+ };
+}
+
+
+enum FixedTypeEnum : unsigned {
+ FTE_Value = 1U
+};
+enum FixedTypeEnum getFTE();
+typedef enum FixedTypeEnum (^fte_block_t)();
+
+void testFixedTypeEnumInference(bool arg) {
+ fte_block_t a;
+
+ // No warnings here.
+ a = ^{ return FTE_Value; };
+ a = ^{ return getFTE(); };
+
+ // Since we fixed the underlying type of the enum, this is considered a
+ // compatible block type.
+ a = ^{
+ return 1U;
+ };
+
+ // No warnings here.
+ a = ^{ if (arg) return FTE_Value; else return FTE_Value; };
+ a = ^{ if (arg) return getFTE(); else return getFTE(); };
+ a = ^{ if (arg) return FTE_Value; else return getFTE(); };
+ a = ^{ if (arg) return getFTE(); else return FTE_Value; };
+
+ // Technically these two blocks should return 'unsigned'.
+ // The first case is easy to handle -- just don't cast the enum constant
+ // to the enum type. However, the second guess would require going back
+ // and REMOVING the cast from the first return statement, which isn't really
+ // feasible (there may be more than one previous return statement with enum
+ // type). For symmetry, we just treat them the same way.
+ a = ^{
+ if (arg)
+ return 1U;
+ else
+ return FTE_Value; // expected-error{{return type 'enum FixedTypeEnum' must match previous return type 'unsigned int'}}
+ };
+
+ a = ^{
+ if (arg)
+ return FTE_Value;
+ else
+ return 1U; // expected-error{{return type 'unsigned int' must match previous return type 'enum FixedTypeEnum'}}
+ };
+}
+
+
+enum {
+ AnonymousValue = 1
+};
+
+enum : short {
+ FixedAnonymousValue = 1
+};
+
+typedef enum {
+ TDE_Value
+} TypeDefEnum;
+
+typedef enum : short {
+ TDFTE_Value
+} TypeDefFixedTypeEnum;
+
+
+typedef int (^int_block_t)();
+typedef short (^short_block_t)();
+void testAnonymousEnumTypes() {
+ int_block_t IB;
+ IB = ^{ return AnonymousValue; };
+ IB = ^{ return TDE_Value; }; // expected-error {{incompatible block pointer types assigning to 'int_block_t' (aka 'int (^)()') from 'TypeDefEnum (^)(void)'}}
+ IB = ^{ return CSE_Value; }; // expected-error {{incompatible block pointer types assigning to 'int_block_t' (aka 'int (^)()') from 'enum CStyleEnum (^)(void)'}}
+
+ short_block_t SB;
+ SB = ^{ return FixedAnonymousValue; };
+ // This is not an error anyway since the enum has a fixed underlying type.
+ SB = ^{ return TDFTE_Value; };
+}
Modified: cfe/branches/tooling/test/SemaObjC/class-bitfield.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/class-bitfield.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/class-bitfield.m (original)
+++ cfe/branches/tooling/test/SemaObjC/class-bitfield.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fobjc-fragile-abi -fsyntax-only -verify
+// RUN: %clang_cc1 %s -fobjc-runtime=macosx-fragile-10.5 -fsyntax-only -verify
@interface X
{
Modified: cfe/branches/tooling/test/SemaObjC/conflicting-ivar-test-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/conflicting-ivar-test-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/conflicting-ivar-test-1.m (original)
+++ cfe/branches/tooling/test/SemaObjC/conflicting-ivar-test-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fobjc-fragile-abi -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -fsyntax-only -verify -Wno-objc-root-class %s
@interface INTF
{
Modified: cfe/branches/tooling/test/SemaObjC/default-synthesize-2.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/default-synthesize-2.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/default-synthesize-2.m (original)
+++ cfe/branches/tooling/test/SemaObjC/default-synthesize-2.m Tue Jun 26 03:48:15 2012
@@ -41,12 +41,13 @@
// Test3
@interface Test3
{
- id uid;
+ id uid; // expected-note {{ivar is declared here}}
}
- at property (readwrite, assign) id uid;
+ at property (readwrite, assign) id uid; // expected-note {{property declared here}}
@end
- at implementation Test3
+// rdar://11671080
+ at implementation Test3 // expected-warning {{autosynthesized property 'uid' will use synthesized instance variable '_uid', not existing instance variable 'uid'}}
// Oops, forgot to write @synthesize! will be default synthesized
- (void) myMethod {
self.uid = 0; // Use of the âsetterâ
@@ -114,3 +115,15 @@
}
@end
+// rdar://11671080
+ at interface Test8
+{
+ id _y;
+ id y; // expected-note {{ivar is declared here}}
+}
+ at property(copy) id y; // expected-note {{property declared here}}
+ at end
+
+
+ at implementation Test8 @end // expected-warning {{autosynthesized property 'y' will use instance variable '_y', not existing instance variable 'y'}}
+
Removed: cfe/branches/tooling/test/SemaObjC/id-isa-ref.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/id-isa-ref.m?rev=159189&view=auto
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/id-isa-ref.m (original)
+++ cfe/branches/tooling/test/SemaObjC/id-isa-ref.m (removed)
@@ -1,35 +0,0 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
-
-typedef struct objc_object {
- struct objc_class *isa;
-} *id;
-
- at interface NSObject {
- struct objc_class *isa;
-}
- at end
- at interface Whatever : NSObject
-+self;
- at end
-
-static void func() {
-
- id x;
-
- // rdar://8290002
- [(*x).isa self]; // expected-warning {{direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()}}
- [x->isa self]; // expected-warning {{direct access to objective-c's isa is deprecated in favor of object_setClass() and object_getClass()}}
-
- Whatever *y;
-
- // GCC allows this, with the following warning:
- // instance variable 'isa' is @protected; this will be a hard error in the future
- //
- // FIXME: see if we can avoid the 2 warnings that follow the error.
- [(*y).isa self]; // expected-error {{instance variable 'isa' is protected}} \
- expected-warning{{receiver type 'struct objc_class *' is not 'id' or interface pointer, consider casting it to 'id'}} \
- expected-warning{{method '-self' not found (return type defaults to 'id')}}
- [y->isa self]; // expected-error {{instance variable 'isa' is protected}} \
- expected-warning{{receiver type 'struct objc_class *' is not 'id' or interface pointer, consider casting it to 'id'}} \
- expected-warning{{method '-self' not found (return type defaults to 'id')}}
-}
Modified: cfe/branches/tooling/test/SemaObjC/interface-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/interface-1.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/interface-1.m (original)
+++ cfe/branches/tooling/test/SemaObjC/interface-1.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-fragile-abi %s -fsyntax-only -verify
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 %s -fsyntax-only -verify
// rdar://5957506
@interface NSWhatever :
Modified: cfe/branches/tooling/test/SemaObjC/interface-layout.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/interface-layout.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/interface-layout.m (original)
+++ cfe/branches/tooling/test/SemaObjC/interface-layout.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify -triple i386-apple-darwin9 -fobjc-fragile-abi
+// RUN: %clang_cc1 %s -fsyntax-only -verify -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5
typedef struct objc_object {} *id;
typedef signed char BOOL;
typedef unsigned int NSUInteger;
Modified: cfe/branches/tooling/test/SemaObjC/ivar-in-class-extension-error.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/ivar-in-class-extension-error.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/ivar-in-class-extension-error.m (original)
+++ cfe/branches/tooling/test/SemaObjC/ivar-in-class-extension-error.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fobjc-fragile-abi -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fobjc-runtime=macosx-fragile-10.5 -fsyntax-only -verify %s
// rdar://6812436
@interface A @end
Modified: cfe/branches/tooling/test/SemaObjC/method-prototype-scope.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/method-prototype-scope.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/method-prototype-scope.m (original)
+++ cfe/branches/tooling/test/SemaObjC/method-prototype-scope.m Tue Jun 26 03:48:15 2012
@@ -7,7 +7,7 @@
@class NSString, NSArray;
@interface Test
-- Func:(int)XXXX, id object;
+- Func:(int)XXXX, id object; // expected-warning {{use of C-style parameters in Objective-C method declarations is deprecated}}
- doSomethingElseWith:(id)object;
@@ -23,7 +23,7 @@
return object; // expected-warning {{incompatible pointer types returning 'NSArray *' from a function with result type 'NSString *'}}
}
-- Func:(int)XXXX, id object { return object; }
+- Func:(int)XXXX, id object { return object; } // expected-warning {{use of C-style parameters in Objective-C method declarations is deprecated}}
- doSomethingElseWith:(id)object { return object; }
Modified: cfe/branches/tooling/test/SemaObjC/mismatched-undefined-method.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/mismatched-undefined-method.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/mismatched-undefined-method.m (original)
+++ cfe/branches/tooling/test/SemaObjC/mismatched-undefined-method.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-deprecated-declarations -verify %s
// rdar://11460990
typedef unsigned int CGDirectDisplayID;
Modified: cfe/branches/tooling/test/SemaObjC/objc-cstyle-args-in-methods.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/objc-cstyle-args-in-methods.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/objc-cstyle-args-in-methods.m (original)
+++ cfe/branches/tooling/test/SemaObjC/objc-cstyle-args-in-methods.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-deprecated-declarations -verify -Wno-objc-root-class %s
@interface Foo
- (id)test:(id)one, id two;
Modified: cfe/branches/tooling/test/SemaObjC/property-12.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/property-12.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/property-12.m (original)
+++ cfe/branches/tooling/test/SemaObjC/property-12.m Tue Jun 26 03:48:15 2012
@@ -29,4 +29,39 @@
@end
+// rdar://11656982
+ at interface I0 <P0> @end
+ at implementation I0
+ at synthesize X;
+ at end
+
+ at interface I1 <P1> @end
+ at implementation I1
+ at synthesize X;
+ at end
+
+ at interface I2 <P2> @end
+ at implementation I2
+ at synthesize X;
+ at end
+
+ at interface I3 <P3> @end
+ at implementation I3
+ at synthesize X;
+ at end
+
+ at interface I4 <P4> @end
+ at implementation I4
+ at synthesize X;
+ at end
+
+ at interface I5 <P5> @end
+ at implementation I5
+ at synthesize X;
+ at end
+
+ at interface I6 <P6> @end
+ at implementation I6
+ at synthesize X;
+ at end
Modified: cfe/branches/tooling/test/SemaObjC/property.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/property.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/property.m (original)
+++ cfe/branches/tooling/test/SemaObjC/property.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-fragile-abi -fsyntax-only -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -fobjc-runtime=macosx-fragile-10.5 -fsyntax-only -verify -Wno-objc-root-class %s
@interface I
{
Modified: cfe/branches/tooling/test/SemaObjC/protocols.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/protocols.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/protocols.m (original)
+++ cfe/branches/tooling/test/SemaObjC/protocols.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -Wno-deprecated-declarations -verify %s
@interface INTF1
@required // expected-error {{directive may only be specified in protocols only}}
Modified: cfe/branches/tooling/test/SemaObjC/related-result-type-inference.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjC/related-result-type-inference.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjC/related-result-type-inference.m (original)
+++ cfe/branches/tooling/test/SemaObjC/related-result-type-inference.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -verify -Wno-deprecated-declarations -Wno-objc-root-class %s
@interface Unrelated
@end
Modified: cfe/branches/tooling/test/SemaObjCXX/arc-0x.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjCXX/arc-0x.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjCXX/arc-0x.mm (original)
+++ cfe/branches/tooling/test/SemaObjCXX/arc-0x.mm Tue Jun 26 03:48:15 2012
@@ -60,15 +60,21 @@
auto x = obj; // expected-warning{{'auto' deduced as 'id' in declaration of 'x'}}
}
+ at interface Array
++ (instancetype)new;
+- (id)objectAtIndex:(int)index;
+ at end
+
// ...but don't warn if it's coming from a template parameter.
-template<typename T>
-void autoTemplateFunction(T param, id obj) {
+template<typename T, int N>
+void autoTemplateFunction(T param, id obj, Array *arr) {
auto x = param; // no-warning
auto y = obj; // expected-warning{{'auto' deduced as 'id' in declaration of 'y'}}
+ auto z = [arr objectAtIndex:N]; // expected-warning{{'auto' deduced as 'id' in declaration of 'z'}}
}
void testAutoIdTemplate(id obj) {
- autoTemplateFunction(obj, obj); // no-warning
+ autoTemplateFunction<id, 2>(obj, obj, [Array new]); // no-warning
}
Modified: cfe/branches/tooling/test/SemaObjCXX/exceptions-fragile.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjCXX/exceptions-fragile.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjCXX/exceptions-fragile.mm (original)
+++ cfe/branches/tooling/test/SemaObjCXX/exceptions-fragile.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fobjc-fragile-abi -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fcxx-exceptions -fexceptions -fobjc-runtime=macosx-fragile-10.5 -fsyntax-only -verify %s
@interface NSException @end
void opaque();
Modified: cfe/branches/tooling/test/SemaObjCXX/fragile-abi-object-assign.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjCXX/fragile-abi-object-assign.m?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjCXX/fragile-abi-object-assign.m (original)
+++ cfe/branches/tooling/test/SemaObjCXX/fragile-abi-object-assign.m Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-fragile-abi -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -x objective-c++ -triple x86_64-apple-darwin11 -fsyntax-only -fobjc-runtime=macosx-fragile-10.5 -verify -Wno-objc-root-class %s
// rdar://10731065
@interface MyView {}
Modified: cfe/branches/tooling/test/SemaObjCXX/instantiate-stmt.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjCXX/instantiate-stmt.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjCXX/instantiate-stmt.mm (original)
+++ cfe/branches/tooling/test/SemaObjCXX/instantiate-stmt.mm Tue Jun 26 03:48:15 2012
@@ -38,20 +38,20 @@
template<typename E, typename T>
void fast_enumeration_test(T collection) {
for (E element in collection) { // expected-error{{selector element type 'int' is not a valid object}} \
- // expected-error{{collection expression type 'vector' is not a valid object}}
+ // expected-error{{the type 'vector' is not a pointer to a fast-enumerable object}}
eat(element);
}
E element;
for (element in collection) // expected-error{{selector element type 'int' is not a valid object}} \
- // expected-error{{collection expression type 'vector' is not a valid object}}
+ // expected-error{{the type 'vector' is not a pointer to a fast-enumerable object}}
eat(element);
- for (NSString *str in collection) // expected-error{{collection expression type 'vector' is not a valid object}}
+ for (NSString *str in collection) // expected-error{{the type 'vector' is not a pointer to a fast-enumerable object}}
eat(str);
NSString *str;
- for (str in collection) // expected-error{{collection expression type 'vector' is not a valid object}}
+ for (str in collection) // expected-error{{the type 'vector' is not a pointer to a fast-enumerable object}}
eat(str);
}
Modified: cfe/branches/tooling/test/SemaObjCXX/message.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaObjCXX/message.mm?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaObjCXX/message.mm (original)
+++ cfe/branches/tooling/test/SemaObjCXX/message.mm Tue Jun 26 03:48:15 2012
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -fsyntax-only -fobjc-fragile-abi -verify -Wno-objc-root-class %s
+// RUN: %clang_cc1 -fsyntax-only -fobjc-runtime=macosx-fragile-10.5 -verify -Wno-objc-root-class %s
@interface I1
- (int*)method;
@end
Modified: cfe/branches/tooling/test/SemaTemplate/ms-lookup-template-base-classes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaTemplate/ms-lookup-template-base-classes.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaTemplate/ms-lookup-template-base-classes.cpp (original)
+++ cfe/branches/tooling/test/SemaTemplate/ms-lookup-template-base-classes.cpp Tue Jun 26 03:48:15 2012
@@ -143,3 +143,32 @@
template class A<C>;
}
+
+namespace PR12701 {
+
+class A {};
+class B {};
+
+template <class T>
+class Base {
+ public:
+ bool base_fun(void* p) { return false; } // expected-note {{must qualify identifier to find this declaration in dependent base clas}}
+ operator T*() const { return 0; }
+};
+
+template <class T>
+class Container : public Base<T> {
+ public:
+ template <typename S>
+ bool operator=(const Container<S>& rhs) {
+ return base_fun(rhs); // expected-warning {{use of identifier 'base_fun' found via unqualified lookup into dependent bases of class templates is a Microsoft extension}}
+ }
+};
+
+void f() {
+ Container<A> text_provider;
+ Container<B> text_provider2;
+ text_provider2 = text_provider; // expected-note {{in instantiation of function template specialization}}
+}
+
+} // namespace PR12701
Modified: cfe/branches/tooling/test/SemaTemplate/recovery-crash.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/test/SemaTemplate/recovery-crash.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/test/SemaTemplate/recovery-crash.cpp (original)
+++ cfe/branches/tooling/test/SemaTemplate/recovery-crash.cpp Tue Jun 26 03:48:15 2012
@@ -1,7 +1,6 @@
// RUN: %clang_cc1 -fsyntax-only -verify %s
-// We don't expect a fix-it to be applied in this case. Clang used to crash
-// trying to recover while adding 'this->' before Work(x);
+// Clang used to crash trying to recover while adding 'this->' before Work(x);
template <typename> struct A {
static void Work(int); // expected-note{{must qualify identifier}}
Modified: cfe/branches/tooling/tools/arcmt-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/arcmt-test/CMakeLists.txt?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/arcmt-test/CMakeLists.txt (original)
+++ cfe/branches/tooling/tools/arcmt-test/CMakeLists.txt Tue Jun 26 03:48:15 2012
@@ -1,9 +1,3 @@
-set(LLVM_USED_LIBS
- clangARCMigrate
- clangEdit
- clangRewrite
- )
-
set( LLVM_LINK_COMPONENTS
support
mc
@@ -12,3 +6,9 @@
add_clang_executable(arcmt-test
arcmt-test.cpp
)
+
+target_link_libraries(arcmt-test
+ clangARCMigrate
+ clangEdit
+ clangRewrite
+ )
Modified: cfe/branches/tooling/tools/arcmt-test/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/arcmt-test/Makefile?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/arcmt-test/Makefile (original)
+++ cfe/branches/tooling/tools/arcmt-test/Makefile Tue Jun 26 03:48:15 2012
@@ -19,6 +19,7 @@
LINK_COMPONENTS := support mc
USEDLIBS = clangARCMigrate.a clangRewrite.a \
clangFrontend.a clangDriver.a clangSerialization.a clangParse.a \
- clangSema.a clangEdit.a clangAnalysis.a clangAST.a clangLex.a clangBasic.a
+ clangSema.a clangEdit.a clangAnalysis.a clangAST.a clangLex.a \
+ clangBasic.a
include $(CLANG_LEVEL)/Makefile
Modified: cfe/branches/tooling/tools/ast-query/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/ast-query/CMakeLists.txt?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/ast-query/CMakeLists.txt (original)
+++ cfe/branches/tooling/tools/ast-query/CMakeLists.txt Tue Jun 26 03:48:15 2012
@@ -1,6 +1,8 @@
-set(LLVM_USED_LIBS clangTooling clangBasic clangAST clangASTMatchers
- clangDynamicASTMatchers)
-
add_clang_executable(ast-query
ASTQuery.cpp
)
+
+target_link_libraries(ast-query
+ clangTooling clangBasic clangAST clangASTMatchers
+ clangDynamicASTMatchers)
+
Modified: cfe/branches/tooling/tools/c-arcmt-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/c-arcmt-test/CMakeLists.txt?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/c-arcmt-test/CMakeLists.txt (original)
+++ cfe/branches/tooling/tools/c-arcmt-test/CMakeLists.txt Tue Jun 26 03:48:15 2012
@@ -1,5 +1,3 @@
-set(LLVM_USED_LIBS libclang)
-
set( LLVM_LINK_COMPONENTS
support
mc
@@ -9,6 +7,10 @@
c-arcmt-test.c
)
+target_link_libraries(c-arcmt-test
+ libclang
+ )
+
set_target_properties(c-arcmt-test
PROPERTIES
LINKER_LANGUAGE CXX)
Modified: cfe/branches/tooling/tools/c-index-test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/c-index-test/CMakeLists.txt?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/c-index-test/CMakeLists.txt (original)
+++ cfe/branches/tooling/tools/c-index-test/CMakeLists.txt Tue Jun 26 03:48:15 2012
@@ -1,5 +1,3 @@
-set(LLVM_USED_LIBS libclang)
-
set( LLVM_LINK_COMPONENTS
support
mc
@@ -9,6 +7,10 @@
c-index-test.c
)
+target_link_libraries(c-index-test
+ libclang
+ )
+
set_target_properties(c-index-test
PROPERTIES
LINKER_LANGUAGE CXX)
Modified: cfe/branches/tooling/tools/c-index-test/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/c-index-test/Makefile?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/c-index-test/Makefile (original)
+++ cfe/branches/tooling/tools/c-index-test/Makefile Tue Jun 26 03:48:15 2012
@@ -20,6 +20,7 @@
LINK_COMPONENTS := support mc
USEDLIBS = clang.a clangFrontend.a clangDriver.a \
clangSerialization.a clangParse.a clangSema.a \
- clangAnalysis.a clangEdit.a clangAST.a clangLex.a clangBasic.a
+ clangAnalysis.a clangEdit.a clangAST.a clangLex.a \
+ clangBasic.a
include $(CLANG_LEVEL)/Makefile
Modified: cfe/branches/tooling/tools/c-index-test/c-index-test.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/c-index-test/c-index-test.c?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/c-index-test/c-index-test.c (original)
+++ cfe/branches/tooling/tools/c-index-test/c-index-test.c Tue Jun 26 03:48:15 2012
@@ -218,7 +218,9 @@
CXPlatformAvailability PlatformAvailability[2];
int NumPlatformAvailability;
int I;
-
+ CXString Comment;
+ const char *CommentCString;
+
ks = clang_getCursorKindSpelling(Cursor.kind);
string = want_display_name? clang_getCursorDisplayName(Cursor)
: clang_getCursorSpelling(Cursor);
@@ -398,6 +400,22 @@
if (!clang_equalRanges(CursorExtent, RefNameRange))
PrintRange(RefNameRange, "RefName");
}
+
+ Comment = clang_Cursor_getRawCommentText(Cursor);
+ CommentCString = clang_getCString(Comment);
+ if (CommentCString != NULL && CommentCString[0] != '\0') {
+ printf(" Comment=[");
+ for ( ; *CommentCString; ++CommentCString) {
+ if (*CommentCString != '\n')
+ putchar(*CommentCString);
+ else
+ printf("\\n");
+ }
+ printf("]");
+
+ PrintRange(clang_Cursor_getCommentRange(Cursor), "CommentRange");
+ }
+ clang_disposeString(Comment);
}
}
Modified: cfe/branches/tooling/tools/clang-check/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/clang-check/CMakeLists.txt?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/clang-check/CMakeLists.txt (original)
+++ cfe/branches/tooling/tools/clang-check/CMakeLists.txt Tue Jun 26 03:48:15 2012
@@ -1,5 +1,8 @@
-set(LLVM_USED_LIBS clangTooling clangBasic)
-
add_clang_executable(clang-check
ClangCheck.cpp
)
+
+target_link_libraries(clang-check
+ clangTooling
+ clangBasic
+ )
Modified: cfe/branches/tooling/tools/diagtool/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/diagtool/CMakeLists.txt?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/diagtool/CMakeLists.txt (original)
+++ cfe/branches/tooling/tools/diagtool/CMakeLists.txt Tue Jun 26 03:48:15 2012
@@ -2,21 +2,26 @@
support
)
-set( LLVM_USED_LIBS
- clangBasic
- clangLex
- clangSema
- clangFrontend
- )
-
add_clang_executable(diagtool
diagtool_main.cpp
DiagTool.cpp
DiagnosticNames.cpp
ListWarnings.cpp
ShowEnabledWarnings.cpp
+ TreeView.cpp
)
+add_dependencies(diagtool
+ ClangDiagnosticIndexName
+ )
+
+target_link_libraries(diagtool
+ clangBasic
+ clangLex
+ clangSema
+ clangFrontend
+ )
+
if(UNIX)
set(CLANGXX_LINK_OR_COPY create_symlink)
else()
Modified: cfe/branches/tooling/tools/diagtool/DiagnosticNames.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/diagtool/DiagnosticNames.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/diagtool/DiagnosticNames.cpp (original)
+++ cfe/branches/tooling/tools/diagtool/DiagnosticNames.cpp Tue Jun 26 03:48:15 2012
@@ -9,17 +9,69 @@
#include "DiagnosticNames.h"
#include "clang/Basic/AllDiagnostics.h"
+#include "llvm/ADT/STLExtras.h"
using namespace clang;
+using namespace diagtool;
-const diagtool::DiagnosticRecord diagtool::BuiltinDiagnostics[] = {
+static const DiagnosticRecord BuiltinDiagnosticsByName[] = {
#define DIAG_NAME_INDEX(ENUM) { #ENUM, diag::ENUM, STR_SIZE(#ENUM, uint8_t) },
#include "clang/Basic/DiagnosticIndexName.inc"
#undef DIAG_NAME_INDEX
- { 0, 0, 0 }
};
-const size_t diagtool::BuiltinDiagnosticsCount =
- sizeof(diagtool::BuiltinDiagnostics) /
- sizeof(diagtool::BuiltinDiagnostics[0]) - 1;
+llvm::ArrayRef<DiagnosticRecord> diagtool::getBuiltinDiagnosticsByName() {
+ return llvm::makeArrayRef(BuiltinDiagnosticsByName);
+}
+
+// FIXME: Is it worth having two tables, especially when this one can get
+// out of sync easily?
+static const DiagnosticRecord BuiltinDiagnosticsByID[] = {
+#define DIAG(ENUM,CLASS,DEFAULT_MAPPING,DESC,GROUP, \
+ SFINAE,ACCESS,NOWERROR,SHOWINSYSHEADER, \
+ CATEGORY) \
+ { #ENUM, diag::ENUM, STR_SIZE(#ENUM, uint8_t) },
+#include "clang/Basic/DiagnosticCommonKinds.inc"
+#include "clang/Basic/DiagnosticDriverKinds.inc"
+#include "clang/Basic/DiagnosticFrontendKinds.inc"
+#include "clang/Basic/DiagnosticSerializationKinds.inc"
+#include "clang/Basic/DiagnosticLexKinds.inc"
+#include "clang/Basic/DiagnosticParseKinds.inc"
+#include "clang/Basic/DiagnosticASTKinds.inc"
+#include "clang/Basic/DiagnosticSemaKinds.inc"
+#include "clang/Basic/DiagnosticAnalysisKinds.inc"
+#undef DIAG
+};
+
+static bool orderByID(const DiagnosticRecord &Left,
+ const DiagnosticRecord &Right) {
+ return Left.DiagID < Right.DiagID;
+}
+
+const DiagnosticRecord &diagtool::getDiagnosticForID(short DiagID) {
+ DiagnosticRecord Key = {0, DiagID, 0};
+
+ const DiagnosticRecord *Result =
+ std::lower_bound(BuiltinDiagnosticsByID,
+ llvm::array_endof(BuiltinDiagnosticsByID),
+ Key, orderByID);
+ assert(Result && "diagnostic not found; table may be out of date");
+ return *Result;
+}
+
+
+#define GET_DIAG_ARRAYS
+#include "clang/Basic/DiagnosticGroups.inc"
+#undef GET_DIAG_ARRAYS
+
+// Second the table of options, sorted by name for fast binary lookup.
+static const GroupRecord OptionTable[] = {
+#define GET_DIAG_TABLE
+#include "clang/Basic/DiagnosticGroups.inc"
+#undef GET_DIAG_TABLE
+};
+
+llvm::ArrayRef<GroupRecord> diagtool::getDiagnosticGroups() {
+ return llvm::makeArrayRef(OptionTable);
+}
Modified: cfe/branches/tooling/tools/diagtool/DiagnosticNames.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/diagtool/DiagnosticNames.h?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/diagtool/DiagnosticNames.h (original)
+++ cfe/branches/tooling/tools/diagtool/DiagnosticNames.h Tue Jun 26 03:48:15 2012
@@ -7,22 +7,122 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/DataTypes.h"
namespace diagtool {
+
struct DiagnosticRecord {
const char *NameStr;
- unsigned short DiagID;
+ short DiagID;
uint8_t NameLen;
llvm::StringRef getName() const {
return llvm::StringRef(NameStr, NameLen);
}
+
+ bool operator<(const DiagnosticRecord &Other) const {
+ return getName() < Other.getName();
+ }
};
- extern const DiagnosticRecord BuiltinDiagnostics[];
- extern const size_t BuiltinDiagnosticsCount;
+ /// \brief Get every diagnostic in the system, sorted by name.
+ llvm::ArrayRef<DiagnosticRecord> getBuiltinDiagnosticsByName();
+
+ /// \brief Get a diagnostic by its ID.
+ const DiagnosticRecord &getDiagnosticForID(short DiagID);
+
+
+ struct GroupRecord {
+ // Be safe with the size of 'NameLen' because we don't statically check if
+ // the size will fit in the field; the struct size won't decrease with a
+ // shorter type anyway.
+ size_t NameLen;
+ const char *NameStr;
+ const short *Members;
+ const short *SubGroups;
+
+ llvm::StringRef getName() const {
+ return llvm::StringRef(NameStr, NameLen);
+ }
+
+ template<typename RecordType>
+ class group_iterator {
+ const short *CurrentID;
+
+ friend struct GroupRecord;
+ group_iterator(const short *Start) : CurrentID(Start) {
+ if (CurrentID && *CurrentID == -1)
+ CurrentID = 0;
+ }
+
+ public:
+ typedef RecordType value_type;
+ typedef const value_type & reference;
+ typedef const value_type * pointer;
+ typedef std::forward_iterator_tag iterator_category;
+ typedef std::ptrdiff_t difference_type;
+
+ inline reference operator*() const;
+ inline pointer operator->() const {
+ return &operator*();
+ }
+
+ inline short getID() const {
+ return *CurrentID;
+ }
+
+ group_iterator &operator++() {
+ ++CurrentID;
+ if (*CurrentID == -1)
+ CurrentID = 0;
+ return *this;
+ }
+
+ bool operator==(group_iterator &Other) const {
+ return CurrentID == Other.CurrentID;
+ }
+
+ bool operator!=(group_iterator &Other) const {
+ return CurrentID != Other.CurrentID;
+ }
+ };
+
+ typedef group_iterator<GroupRecord> subgroup_iterator;
+ subgroup_iterator subgroup_begin() const {
+ return SubGroups;
+ }
+ subgroup_iterator subgroup_end() const {
+ return 0;
+ }
+
+ typedef group_iterator<DiagnosticRecord> diagnostics_iterator;
+ diagnostics_iterator diagnostics_begin() const {
+ return Members;
+ }
+ diagnostics_iterator diagnostics_end() const {
+ return 0;
+ }
+
+ bool operator<(const GroupRecord &Other) const {
+ return getName() < Other.getName();
+ }
+ };
+
+ /// \brief Get every diagnostic group in the system, sorted by name.
+ llvm::ArrayRef<GroupRecord> getDiagnosticGroups();
+
+ template<>
+ inline GroupRecord::subgroup_iterator::reference
+ GroupRecord::subgroup_iterator::operator*() const {
+ return getDiagnosticGroups()[*CurrentID];
+ }
+ template<>
+ inline GroupRecord::diagnostics_iterator::reference
+ GroupRecord::diagnostics_iterator::operator*() const {
+ return getDiagnosticForID(*CurrentID);
+ }
} // end namespace diagtool
Modified: cfe/branches/tooling/tools/diagtool/ListWarnings.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/diagtool/ListWarnings.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/diagtool/ListWarnings.cpp (original)
+++ cfe/branches/tooling/tools/diagtool/ListWarnings.cpp Tue Jun 26 03:48:15 2012
@@ -25,6 +25,7 @@
ListWarnings)
using namespace clang;
+using namespace diagtool;
namespace {
struct Entry {
@@ -52,9 +53,11 @@
std::vector<Entry> Flagged, Unflagged;
llvm::StringMap<std::vector<unsigned> > flagHistogram;
- for (const diagtool::DiagnosticRecord *di = diagtool::BuiltinDiagnostics,
- *de = di + diagtool::BuiltinDiagnosticsCount; di != de; ++di) {
-
+ ArrayRef<DiagnosticRecord> AllDiagnostics = getBuiltinDiagnosticsByName();
+
+ for (ArrayRef<DiagnosticRecord>::iterator di = AllDiagnostics.begin(),
+ de = AllDiagnostics.end();
+ di != de; ++di) {
unsigned diagID = di->DiagID;
if (DiagnosticIDs::isBuiltinNote(diagID))
@@ -74,9 +77,6 @@
}
}
- std::sort(Flagged.begin(), Flagged.end());
- std::sort(Unflagged.begin(), Unflagged.end());
-
out << "Warnings with flags (" << Flagged.size() << "):\n";
printEntries(Flagged, out);
Modified: cfe/branches/tooling/tools/diagtool/ShowEnabledWarnings.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/diagtool/ShowEnabledWarnings.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/diagtool/ShowEnabledWarnings.cpp (original)
+++ cfe/branches/tooling/tools/diagtool/ShowEnabledWarnings.cpp Tue Jun 26 03:48:15 2012
@@ -21,6 +21,7 @@
ShowEnabledWarnings)
using namespace clang;
+using namespace diagtool;
namespace {
struct PrettyDiag {
@@ -109,10 +110,12 @@
// which ones are turned on.
// FIXME: It would be very nice to print which flags are turning on which
// diagnostics, but this can be done with a diff.
+ ArrayRef<DiagnosticRecord> AllDiagnostics = getBuiltinDiagnosticsByName();
std::vector<PrettyDiag> Active;
- for (const diagtool::DiagnosticRecord *I = diagtool::BuiltinDiagnostics,
- *E = I + diagtool::BuiltinDiagnosticsCount; I != E; ++I) {
+ for (ArrayRef<DiagnosticRecord>::iterator I = AllDiagnostics.begin(),
+ E = AllDiagnostics.end();
+ I != E; ++I) {
unsigned DiagID = I->DiagID;
if (DiagnosticIDs::isBuiltinNote(DiagID))
@@ -130,8 +133,6 @@
Active.push_back(PrettyDiag(I->getName(), WarningOpt, DiagLevel));
}
- std::sort(Active.begin(), Active.end());
-
// Print them all out.
for (std::vector<PrettyDiag>::const_iterator I = Active.begin(),
E = Active.end(); I != E; ++I) {
Modified: cfe/branches/tooling/tools/diagtool/diagtool_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/diagtool/diagtool_main.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/diagtool/diagtool_main.cpp (original)
+++ cfe/branches/tooling/tools/diagtool/diagtool_main.cpp Tue Jun 26 03:48:15 2012
@@ -18,7 +18,7 @@
int main(int argc, char *argv[]) {
if (argc > 1)
if (DiagTool *tool = diagTools->getTool(argv[1]))
- return tool->run(argc - 2, &argv[2], llvm::errs());
+ return tool->run(argc - 2, &argv[2], llvm::outs());
llvm::errs() << "usage: diagtool <command> [<args>]\n\n";
diagTools->printCommands(llvm::errs());
Modified: cfe/branches/tooling/tools/driver/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/driver/CMakeLists.txt?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/driver/CMakeLists.txt (original)
+++ cfe/branches/tooling/tools/driver/CMakeLists.txt Tue Jun 26 03:48:15 2012
@@ -1,4 +1,22 @@
-set( LLVM_USED_LIBS
+set( LLVM_LINK_COMPONENTS
+ ${LLVM_TARGETS_TO_BUILD}
+ asmparser
+ bitreader
+ bitwriter
+ codegen
+ instrumentation
+ ipo
+ linker
+ selectiondag
+ )
+
+add_clang_executable(clang
+ driver.cpp
+ cc1_main.cpp
+ cc1as_main.cpp
+ )
+
+target_link_libraries(clang
clangFrontendTool
clangAST
clangAnalysis
@@ -19,24 +37,6 @@
clangStaticAnalyzerCore
)
-set( LLVM_LINK_COMPONENTS
- ${LLVM_TARGETS_TO_BUILD}
- asmparser
- bitreader
- bitwriter
- codegen
- instrumentation
- ipo
- linker
- selectiondag
- )
-
-add_clang_executable(clang
- driver.cpp
- cc1_main.cpp
- cc1as_main.cpp
- )
-
set_target_properties(clang PROPERTIES VERSION ${CLANG_EXECUTABLE_VERSION})
if(UNIX)
Modified: cfe/branches/tooling/tools/fix-llvm-style/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/fix-llvm-style/CMakeLists.txt?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/fix-llvm-style/CMakeLists.txt (original)
+++ cfe/branches/tooling/tools/fix-llvm-style/CMakeLists.txt Tue Jun 26 03:48:15 2012
@@ -1,5 +1,6 @@
-set(LLVM_USED_LIBS clangTooling clangBasic clangAST)
-
add_clang_executable(fix-llvm-style
FixLLVMStyle.cpp
)
+
+target_link_libraries(fix-llvm-style
+ clangTooling clangBasic clangAST clangASTMatchers)
Modified: cfe/branches/tooling/tools/libclang/CIndex.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/libclang/CIndex.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/libclang/CIndex.cpp (original)
+++ cfe/branches/tooling/tools/libclang/CIndex.cpp Tue Jun 26 03:48:15 2012
@@ -5676,7 +5676,35 @@
InclusionDirective *ID = getCursorInclusionDirective(cursor);
return (void *)ID->getFile();
}
-
+
+CXSourceRange clang_Cursor_getCommentRange(CXCursor C) {
+ if (!clang_isDeclaration(C.kind))
+ return clang_getNullRange();
+
+ const Decl *D = getCursorDecl(C);
+ ASTContext &Context = getCursorContext(C);
+ const RawComment *RC = Context.getRawCommentForDecl(D);
+ if (!RC)
+ return clang_getNullRange();
+
+ return cxloc::translateSourceRange(Context, RC->getSourceRange());
+}
+
+CXString clang_Cursor_getRawCommentText(CXCursor C) {
+ if (!clang_isDeclaration(C.kind))
+ return createCXString((const char *) NULL);
+
+ const Decl *D = getCursorDecl(C);
+ ASTContext &Context = getCursorContext(C);
+ const RawComment *RC = Context.getRawCommentForDecl(D);
+ StringRef RawText = RC ? RC->getRawText(Context.getSourceManager()) :
+ StringRef();
+
+ // Don't duplicate the string because RawText points directly into source
+ // code.
+ return createCXString(RawText, false);
+}
+
} // end: extern "C"
Modified: cfe/branches/tooling/tools/libclang/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/libclang/CMakeLists.txt?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/libclang/CMakeLists.txt (original)
+++ cfe/branches/tooling/tools/libclang/CMakeLists.txt Tue Jun 26 03:48:15 2012
@@ -1,15 +1,3 @@
-set(LLVM_USED_LIBS
- clangARCMigrate
- clangRewrite
- clangFrontend
- clangDriver
- clangSerialization
- clangSema
- clangEdit
- clangAST
- clangLex
- clangBasic)
-
set( LLVM_LINK_COMPONENTS
support
mc
@@ -49,9 +37,23 @@
../../include/clang-c/Index.h
)
+set(LIBRARIES
+ clangARCMigrate
+ clangRewrite
+ clangFrontend
+ clangDriver
+ clangSerialization
+ clangSema
+ clangEdit
+ clangAST
+ clangLex
+ clangBasic
+ )
+
if( LLVM_ENABLE_PIC )
set(SHARED_LIBRARY TRUE)
add_clang_library(libclang ${SOURCES})
+ target_link_libraries(libclang ${LIBRARIES})
if(WIN32)
set_target_properties(libclang
@@ -84,6 +86,7 @@
if( NOT BUILD_SHARED_LIBS AND NOT WIN32 )
add_clang_library(${LIBCLANG_STATIC_TARGET_NAME} STATIC ${SOURCES})
+ target_link_libraries(${LIBCLANG_STATIC_TARGET_NAME} ${LIBRARIES})
set_target_properties(${LIBCLANG_STATIC_TARGET_NAME}
PROPERTIES
Modified: cfe/branches/tooling/tools/libclang/libclang.exports
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/libclang/libclang.exports?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/libclang/libclang.exports (original)
+++ cfe/branches/tooling/tools/libclang/libclang.exports Tue Jun 26 03:48:15 2012
@@ -5,6 +5,8 @@
clang_CXXMethod_isStatic
clang_CXXMethod_isVirtual
clang_Cursor_getArgument
+clang_Cursor_getCommentRange
+clang_Cursor_getRawCommentText
clang_Cursor_getNumArguments
clang_Cursor_getObjCSelectorIndex
clang_Cursor_getSpellingNameRange
Modified: cfe/branches/tooling/tools/remove-cstr-calls/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/remove-cstr-calls/CMakeLists.txt?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/remove-cstr-calls/CMakeLists.txt (original)
+++ cfe/branches/tooling/tools/remove-cstr-calls/CMakeLists.txt Tue Jun 26 03:48:15 2012
@@ -1,5 +1,6 @@
-set(LLVM_USED_LIBS clangEdit clangTooling clangBasic clangAST)
-
add_clang_executable(remove-cstr-calls
RemoveCStrCalls.cpp
)
+
+target_link_libraries(remove-cstr-calls
+ clangEdit clangTooling clangBasic clangAST clangASTMatchers)
Modified: cfe/branches/tooling/tools/rename/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/rename/CMakeLists.txt?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/rename/CMakeLists.txt (original)
+++ cfe/branches/tooling/tools/rename/CMakeLists.txt Tue Jun 26 03:48:15 2012
@@ -1,5 +1,6 @@
-set(LLVM_USED_LIBS clangTooling clangBasic clangAST)
-
add_clang_executable(clang-rename
ClangRename.cpp
)
+
+target_link_libraries(clang-rename
+ clangTooling clangBasic clangAST)
Modified: cfe/branches/tooling/tools/scan-build/ccc-analyzer
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/scan-build/ccc-analyzer?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/scan-build/ccc-analyzer (original)
+++ cfe/branches/tooling/tools/scan-build/ccc-analyzer Tue Jun 26 03:48:15 2012
@@ -182,11 +182,6 @@
}
else {
$Cmd = $Clang;
- if ($Lang eq "objective-c" || $Lang eq "objective-c++") {
- push @Args,'-DIBOutlet=__attribute__((iboutlet))';
- push @Args,'-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection)))';
- push @Args,'-DIBAction=void)__attribute__((ibaction)';
- }
# Create arguments for doing regular parsing.
my $SyntaxArgs = GetCCArgs("-fsyntax-only", \@Args);
@@ -443,6 +438,9 @@
# Get the constraints engine.
my $ConstraintsModel = $ENV{'CCC_ANALYZER_CONSTRAINTS_MODEL'};
+#Get the internal stats setting.
+my $InternalStats = $ENV{'CCC_ANALYZER_INTERNAL_STATS'};
+
# Get the output format.
my $OutputFormat = $ENV{'CCC_ANALYZER_OUTPUT_FORMAT'};
if (!defined $OutputFormat) { $OutputFormat = "html"; }
@@ -647,6 +645,10 @@
if (defined $ConstraintsModel) {
push @AnalyzeArgs, "-analyzer-constraints=$ConstraintsModel";
}
+
+ if (defined $InternalStats) {
+ push @AnalyzeArgs, "-analyzer-stats";
+ }
if (defined $Analyses) {
push @AnalyzeArgs, split '\s+', $Analyses;
Modified: cfe/branches/tooling/tools/scan-build/scan-build
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/tools/scan-build/scan-build?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/tools/scan-build/scan-build (original)
+++ cfe/branches/tooling/tools/scan-build/scan-build Tue Jun 26 03:48:15 2012
@@ -28,7 +28,7 @@
my $BuildDate;
my $TERM = $ENV{'TERM'};
-my $UseColor = (defined $TERM and $TERM eq 'xterm-color' and -t STDOUT
+my $UseColor = (defined $TERM and $TERM =~ 'xterm-.*color' and -t STDOUT
and defined $ENV{'SCAN_BUILD_COLOR'});
my $UserName = HtmlEscape(getpwuid($<) || 'unknown');
@@ -1025,7 +1025,8 @@
-maxloop N - specifiy the number of times a block can be visited before giving
up. Default is 4. Increase for more comprehensive coverage at a
cost of speed.
-
+ -internal-stats - Generate internal analyzer statistics.
+
CONTROLLING CHECKERS:
A default group of checkers are always run unless explicitly disabled.
@@ -1194,6 +1195,7 @@
my @AnalysesToRun;
my $StoreModel;
my $ConstraintsModel;
+my $InternalStats;
my $OutputFormat = "html";
my $AnalyzerStats = 0;
my $MaxLoop = 0;
@@ -1325,6 +1327,12 @@
$ConstraintsModel = shift @ARGV;
next;
}
+
+ if ($arg eq "-internal-stats") {
+ shift @ARGV;
+ $InternalStats = 1;
+ next;
+ }
if ($arg eq "-plist") {
shift @ARGV;
@@ -1442,6 +1450,9 @@
if (defined $ConstraintsModel) {
$ENV{'CCC_ANALYZER_CONSTRAINTS_MODEL'} = $ConstraintsModel;
}
+if (defined $InternalStats) {
+ $ENV{'CCC_ANALYZER_INTERNAL_STATS'} = 1;
+}
if (defined $OutputFormat) {
$ENV{'CCC_ANALYZER_OUTPUT_FORMAT'} = $OutputFormat;
}
Modified: cfe/branches/tooling/unittests/ASTMatchers/ASTMatchersTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/unittests/ASTMatchers/ASTMatchersTest.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/unittests/ASTMatchers/ASTMatchersTest.cpp (original)
+++ cfe/branches/tooling/unittests/ASTMatchers/ASTMatchersTest.cpp Tue Jun 26 03:48:15 2012
@@ -44,8 +44,7 @@
TEST(DeclarationMatcher, MatchClass) {
DeclarationMatcher ClassMatcher(Class());
- // Even for an empty string there are classes in the AST.
- EXPECT_TRUE(matches("", ClassMatcher));
+ EXPECT_FALSE(matches("", ClassMatcher));
DeclarationMatcher ClassX = Class(Class(HasName("X")));
EXPECT_TRUE(matches("class X;", ClassX));
Modified: cfe/branches/tooling/unittests/Basic/SourceManagerTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/unittests/Basic/SourceManagerTest.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/unittests/Basic/SourceManagerTest.cpp (original)
+++ cfe/branches/tooling/unittests/Basic/SourceManagerTest.cpp Tue Jun 26 03:48:15 2012
@@ -107,6 +107,54 @@
EXPECT_TRUE(SourceMgr.isBeforeInTranslationUnit(idLoc, macroExpEndLoc));
}
+TEST_F(SourceManagerTest, getColumnNumber) {
+ const char *Source =
+ "int x;\n"
+ "int y;";
+
+ MemoryBuffer *Buf = MemoryBuffer::getMemBuffer(Source);
+ FileID MainFileID = SourceMgr.createMainFileIDForMemBuffer(Buf);
+
+ bool Invalid;
+
+ Invalid = false;
+ EXPECT_EQ(1U, SourceMgr.getColumnNumber(MainFileID, 0, &Invalid));
+ EXPECT_TRUE(!Invalid);
+
+ Invalid = false;
+ EXPECT_EQ(5U, SourceMgr.getColumnNumber(MainFileID, 4, &Invalid));
+ EXPECT_TRUE(!Invalid);
+
+ Invalid = false;
+ EXPECT_EQ(1U, SourceMgr.getColumnNumber(MainFileID, 7, &Invalid));
+ EXPECT_TRUE(!Invalid);
+
+ Invalid = false;
+ EXPECT_EQ(5U, SourceMgr.getColumnNumber(MainFileID, 11, &Invalid));
+ EXPECT_TRUE(!Invalid);
+
+ Invalid = false;
+ EXPECT_EQ(7U, SourceMgr.getColumnNumber(MainFileID, strlen(Source),
+ &Invalid));
+ EXPECT_TRUE(!Invalid);
+
+ Invalid = false;
+ SourceMgr.getColumnNumber(MainFileID, strlen(Source)+1, &Invalid);
+ EXPECT_TRUE(Invalid);
+
+ // Test invalid files
+ Invalid = false;
+ SourceMgr.getColumnNumber(FileID(), 0, &Invalid);
+ EXPECT_TRUE(Invalid);
+
+ Invalid = false;
+ SourceMgr.getColumnNumber(FileID(), 1, &Invalid);
+ EXPECT_TRUE(Invalid);
+
+ // Test with no invalid flag.
+ EXPECT_EQ(1U, SourceMgr.getColumnNumber(MainFileID, 0, NULL));
+}
+
#if defined(LLVM_ON_UNIX)
TEST_F(SourceManagerTest, getMacroArgExpandedLocation) {
Modified: cfe/branches/tooling/unittests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/unittests/CMakeLists.txt?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/unittests/CMakeLists.txt (original)
+++ cfe/branches/tooling/unittests/CMakeLists.txt Tue Jun 26 03:48:15 2012
@@ -1,91 +1,16 @@
-include(LLVMParseArguments)
+add_custom_target(ClangUnitTests)
+set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang tests")
-# add_clang_unittest(test_dirname file1.cpp file2.cpp ...
-# [USED_LIBS lib1 lib2]
-# [LINK_COMPONENTS component1 component2])
+# add_clang_unittest(test_dirname file1.cpp file2.cpp)
#
# Will compile the list of files together and link against the clang
-# libraries in the USED_LIBS list and the llvm-config components in
-# the LINK_COMPONENTS list. Produces a binary named
-# 'basename(test_dirname)Tests'.
-function(add_clang_unittest)
- PARSE_ARGUMENTS(CLANG_UNITTEST "USED_LIBS;LINK_COMPONENTS" "" ${ARGN})
- set(LLVM_LINK_COMPONENTS ${CLANG_UNITTEST_LINK_COMPONENTS})
- set(LLVM_USED_LIBS ${CLANG_UNITTEST_USED_LIBS})
- list(GET CLANG_UNITTEST_DEFAULT_ARGS 0 test_dirname)
- list(REMOVE_AT CLANG_UNITTEST_DEFAULT_ARGS 0)
-
- string(REGEX MATCH "([^/]+)$" test_name ${test_dirname})
- if (CMAKE_BUILD_TYPE)
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
- ${CLANG_BINARY_DIR}/unittests/${test_dirname}/${CMAKE_BUILD_TYPE})
- else()
- set(CMAKE_RUNTIME_OUTPUT_DIRECTORY
- ${CLANG_BINARY_DIR}/unittests/${test_dirname})
- endif()
- if( NOT LLVM_BUILD_TESTS )
- set(EXCLUDE_FROM_ALL ON)
- endif()
- add_clang_executable(${test_name}Tests ${CLANG_UNITTEST_DEFAULT_ARGS})
- add_dependencies(ClangUnitTests ${test_name}Tests)
- set_target_properties(${test_name}Tests PROPERTIES FOLDER "Clang tests")
+# Produces a binary named 'basename(test_dirname)'.
+function(add_clang_unittest test_dirname)
+ add_unittest(ClangUnitTests ${test_dirname} ${ARGN})
endfunction()
-add_custom_target(ClangUnitTests)
-set_target_properties(ClangUnitTests PROPERTIES FOLDER "Clang tests")
-
-include_directories(${LLVM_MAIN_SRC_DIR}/utils/unittest/googletest/include)
-add_definitions(-DGTEST_HAS_RTTI=0)
-if( LLVM_COMPILER_IS_GCC_COMPATIBLE )
- llvm_replace_compiler_option(CMAKE_CXX_FLAGS "-frtti" "-fno-rtti")
-elseif( MSVC )
- llvm_replace_compiler_option(CMAKE_CXX_FLAGS "/GR" "/GR-")
-endif()
-
-if (NOT LLVM_ENABLE_THREADS)
- add_definitions(-DGTEST_HAS_PTHREAD=0)
-endif()
-
-if(SUPPORTS_NO_VARIADIC_MACROS_FLAG)
- add_definitions("-Wno-variadic-macros")
-endif()
-
-add_clang_unittest(ASTMatchers
- ASTMatchers/ASTMatchersTest.cpp
- USED_LIBS gtest gtest_main clangASTMatchers clangTooling
- )
-
-add_clang_unittest(ASTMatchers/Dynamic
- ASTMatchers/Dynamic/GenericMatcherTest.cpp
- ASTMatchers/Dynamic/GenericValueTest.cpp
- ASTMatchers/Dynamic/NumberHolderTest.cpp
- ASTMatchers/Dynamic/ParserTest.cpp
- ASTMatchers/Dynamic/RegistryTest.cpp
- USED_LIBS gtest gtest_main clangASTMatchers clangDynamicASTMatchers clangTooling
- )
-
-add_clang_unittest(Basic
- Basic/FileManagerTest.cpp
- Basic/SourceManagerTest.cpp
- USED_LIBS gtest gtest_main clangLex
- )
-
-add_clang_unittest(Lex
- Lex/LexerTest.cpp
- USED_LIBS gtest gtest_main clangLex
- )
-
-add_clang_unittest(Frontend
- Frontend/FrontendActionTest.cpp
- USED_LIBS gtest gtest_main clangFrontend
- )
-
-add_clang_unittest(Tooling
- Tooling/CompilationDatabaseTest.cpp
- Tooling/ToolingTest.cpp
- Tooling/RecursiveASTVisitorTest.cpp
- Tooling/RefactoringTest.cpp
- Tooling/RewriterTest.cpp
- USED_LIBS gtest gtest_main clangAST clangTooling clangRewrite
- )
-
+add_subdirectory(ASTMatchers)
+add_subdirectory(Basic)
+add_subdirectory(Lex)
+add_subdirectory(Frontend)
+add_subdirectory(Tooling)
Modified: cfe/branches/tooling/unittests/Tooling/RecursiveASTVisitorTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/unittests/Tooling/RecursiveASTVisitorTest.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/unittests/Tooling/RecursiveASTVisitorTest.cpp (original)
+++ cfe/branches/tooling/unittests/Tooling/RecursiveASTVisitorTest.cpp Tue Jun 26 03:48:15 2012
@@ -7,125 +7,10 @@
//
//===----------------------------------------------------------------------===//
-#include "clang/AST/ASTConsumer.h"
-#include "clang/AST/RecursiveASTVisitor.h"
-#include "clang/Frontend/FrontendAction.h"
-#include "clang/Frontend/CompilerInstance.h"
-#include "clang/Tooling/Tooling.h"
-#include "gtest/gtest.h"
+#include "TestVisitor.h"
namespace clang {
-/// \brief Base class for sipmle RecursiveASTVisitor based tests.
-///
-/// This is a drop-in replacement for RecursiveASTVisitor itself, with the
-/// additional capability of running it over a snippet of code.
-///
-/// Visits template instantiations by default.
-///
-/// FIXME: Put into a common location.
-template <typename T>
-class TestVisitor : public clang::RecursiveASTVisitor<T> {
-public:
- /// \brief Runs the current AST visitor over the given code.
- bool runOver(StringRef Code) {
- return tooling::runToolOnCode(new TestAction(this), Code);
- }
-
- bool shouldVisitTemplateInstantiations() const {
- return true;
- }
-
-protected:
- clang::ASTContext *Context;
-
-private:
- class FindConsumer : public clang::ASTConsumer {
- public:
- FindConsumer(TestVisitor *Visitor) : Visitor(Visitor) {}
-
- virtual void HandleTranslationUnit(clang::ASTContext &Context) {
- Visitor->TraverseDecl(Context.getTranslationUnitDecl());
- }
-
- private:
- TestVisitor *Visitor;
- };
-
- class TestAction : public clang::ASTFrontendAction {
- public:
- TestAction(TestVisitor *Visitor) : Visitor(Visitor) {}
-
- virtual clang::ASTConsumer* CreateASTConsumer(
- clang::CompilerInstance& compiler, llvm::StringRef dummy) {
- Visitor->Context = &compiler.getASTContext();
- /// TestConsumer will be deleted by the framework calling us.
- return new FindConsumer(Visitor);
- }
-
- private:
- TestVisitor *Visitor;
- };
-};
-
-/// \brief A RecursiveASTVisitor for testing the RecursiveASTVisitor itself.
-///
-/// Allows simple creation of test visitors running matches on only a small
-/// subset of the Visit* methods.
-template <typename T>
-class ExpectedLocationVisitor : public TestVisitor<T> {
-public:
- ExpectedLocationVisitor()
- : ExpectedLine(0), ExpectedColumn(0), Found(false) {}
-
- ~ExpectedLocationVisitor() {
- EXPECT_TRUE(Found)
- << "Expected \"" << ExpectedMatch << "\" at " << ExpectedLine
- << ":" << ExpectedColumn << PartialMatches;
- }
-
- /// \brief Expect 'Match' to occur at the given 'Line' and 'Column'.
- void ExpectMatch(Twine Match, unsigned Line, unsigned Column) {
- ExpectedMatch = Match.str();
- ExpectedLine = Line;
- ExpectedColumn = Column;
- }
-
-protected:
- /// \brief Convenience method to simplify writing test visitors.
- ///
- /// Sets 'Found' to true if 'Name' and 'Location' match the expected
- /// values. If only a partial match is found, record the information
- /// to produce nice error output when a test fails.
- ///
- /// Implementations are required to call this with appropriate values
- /// for 'Name' during visitation.
- void Match(StringRef Name, SourceLocation Location) {
- FullSourceLoc FullLocation = this->Context->getFullLoc(Location);
- if (Name == ExpectedMatch &&
- FullLocation.isValid() &&
- FullLocation.getSpellingLineNumber() == ExpectedLine &&
- FullLocation.getSpellingColumnNumber() == ExpectedColumn) {
- EXPECT_TRUE(!Found);
- Found = true;
- } else if (Name == ExpectedMatch ||
- (FullLocation.isValid() &&
- FullLocation.getSpellingLineNumber() == ExpectedLine &&
- FullLocation.getSpellingColumnNumber() == ExpectedColumn)) {
- // If we did not match, record information about partial matches.
- llvm::raw_string_ostream Stream(PartialMatches);
- Stream << ", partial match: \"" << Name << "\" at ";
- Location.print(Stream, this->Context->getSourceManager());
- }
- }
-
- std::string ExpectedMatch;
- unsigned ExpectedLine;
- unsigned ExpectedColumn;
- std::string PartialMatches;
- bool Found;
-};
-
class TypeLocVisitor : public ExpectedLocationVisitor<TypeLocVisitor> {
public:
bool VisitTypeLoc(TypeLoc TypeLocation) {
@@ -261,9 +146,10 @@
TEST(RecursiveASTVisitor, VisitsCXXForRangeStmtRange) {
DeclRefExprVisitor Visitor;
Visitor.ExpectMatch("x", 2, 25);
+ Visitor.ExpectMatch("x", 2, 30);
EXPECT_TRUE(Visitor.runOver(
"int x[5];\n"
- "void f() { for (int i : x) {} }"));
+ "void f() { for (int i : x) { x[0] = 1; } }"));
}
TEST(RecursiveASTVisitor, VisitsCXXForRangeStmtLoopVariable) {
Modified: cfe/branches/tooling/unittests/Tooling/ToolingTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/unittests/Tooling/ToolingTest.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/unittests/Tooling/ToolingTest.cpp (original)
+++ cfe/branches/tooling/unittests/Tooling/ToolingTest.cpp Tue Jun 26 03:48:15 2012
@@ -53,11 +53,16 @@
};
} // end namespace
-TEST(runToolOnCode, FindsTopLevelDeclOnEmptyCode) {
+TEST(runToolOnCode, FindsNoTopLevelDeclOnEmptyCode) {
bool FoundTopLevelDecl = false;
EXPECT_TRUE(runToolOnCode(
new TestAction(new FindTopLevelDeclConsumer(&FoundTopLevelDecl)), ""));
+#if !defined(_MSC_VER)
+ EXPECT_FALSE(FoundTopLevelDecl);
+#else
+ // FIXME: LangOpts.MicrosoftExt appends "class type_info;"
EXPECT_TRUE(FoundTopLevelDecl);
+#endif
}
namespace {
Modified: cfe/branches/tooling/utils/TableGen/ClangAttrEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/utils/TableGen/ClangAttrEmitter.cpp?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/utils/TableGen/ClangAttrEmitter.cpp (original)
+++ cfe/branches/tooling/utils/TableGen/ClangAttrEmitter.cpp Tue Jun 26 03:48:15 2012
@@ -11,6 +11,7 @@
//
//===----------------------------------------------------------------------===//
+#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/TableGen/Record.h"
#include "llvm/TableGen/StringMatcher.h"
@@ -768,7 +769,7 @@
continue;
std::vector<Record*> ArgRecords = R.getValueAsListOfDefs("Args");
- std::vector<StringRef> Spellings = getValueAsListOfStrings(R, "Spellings");
+ std::vector<Record*> Spellings = R.getValueAsListOfDefs("Spellings");
std::vector<Argument*> Args;
for (ri = ArgRecords.begin(), re = ArgRecords.end(); ri != re; ++ri)
Args.push_back(createArgument(**ri, R.getName()));
@@ -788,9 +789,10 @@
OS << "void " << R.getName() << "Attr::printPretty("
<< "llvm::raw_ostream &OS, ASTContext &Ctx) const {\n";
if (Spellings.begin() != Spellings.end()) {
- OS << " OS << \" __attribute__((" << *Spellings.begin();
+ StringRef Spelling = (*Spellings.begin())->getValueAsString("Name");
+ OS << " OS << \" __attribute__((" << Spelling;
if (Args.size()) OS << "(";
- if (*Spellings.begin()=="availability") {
+ if (Spelling == "availability") {
writeAvailabilityValue(OS);
} else {
for (ai = Args.begin(); ai != ae; ++ai) {
@@ -961,11 +963,10 @@
for (std::vector<Record*>::iterator I = Attrs.begin(), E = Attrs.end(); I != E; ++I) {
Record &Attr = **I;
- std::vector<StringRef> Spellings = getValueAsListOfStrings(Attr, "Spellings");
+ std::vector<Record*> Spellings = Attr.getValueAsListOfDefs("Spellings");
- for (std::vector<StringRef>::const_iterator I = Spellings.begin(), E = Spellings.end(); I != E; ++I) {
- StringRef Spelling = *I;
- OS << ".Case(\"" << Spelling << "\", true)\n";
+ for (std::vector<Record*>::const_iterator I = Spellings.begin(), E = Spellings.end(); I != E; ++I) {
+ OS << ".Case(\"" << (*I)->getValueAsString("Name") << "\", true)\n";
}
}
@@ -984,12 +985,16 @@
bool LateParsed = Attr.getValueAsBit("LateParsed");
if (LateParsed) {
- std::vector<StringRef> Spellings =
- getValueAsListOfStrings(Attr, "Spellings");
+ std::vector<Record*> Spellings =
+ Attr.getValueAsListOfDefs("Spellings");
- for (std::vector<StringRef>::const_iterator I = Spellings.begin(),
+ // FIXME: Handle non-GNU attributes
+ for (std::vector<Record*>::const_iterator I = Spellings.begin(),
E = Spellings.end(); I != E; ++I) {
- OS << ".Case(\"" << (*I) << "\", " << LateParsed << ")\n";
+ if ((*I)->getValueAsString("Variety") != "GNU")
+ continue;
+ OS << ".Case(\"" << (*I)->getValueAsString("Name") << "\", "
+ << LateParsed << ")\n";
}
}
}
@@ -1077,7 +1082,6 @@
OS << "#endif\n\n";
std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
- std::set<StringRef> ProcessedAttrs;
for (std::vector<Record*>::iterator I = Attrs.begin(), E = Attrs.end();
I != E; ++I) {
@@ -1087,24 +1091,21 @@
bool DistinctSpellings = Attr.getValueAsBit("DistinctSpellings");
if (SemaHandler) {
- std::vector<StringRef> Spellings =
- getValueAsListOfStrings(Attr, "Spellings");
-
- for (std::vector<StringRef>::const_iterator I = Spellings.begin(),
- E = Spellings.end(); I != E; ++I) {
- StringRef AttrName = *I;
+ if (DistinctSpellings) {
+ std::vector<Record*> Spellings = Attr.getValueAsListOfDefs("Spellings");
+
+ for (std::vector<Record*>::const_iterator I = Spellings.begin(),
+ E = Spellings.end(); I != E; ++I) {
+ std::string AttrName = (*I)->getValueAsString("Name");
- AttrName = NormalizeAttrName(AttrName);
- // skip if a normalized version has been processed.
- if (ProcessedAttrs.find(AttrName) != ProcessedAttrs.end())
- continue;
- else
- ProcessedAttrs.insert(AttrName);
+ StringRef Spelling = NormalizeAttrName(AttrName);
+ OS << "PARSED_ATTR(" << Spelling << ")\n";
+ }
+ } else {
+ StringRef AttrName = Attr.getName();
+ AttrName = NormalizeAttrName(AttrName);
OS << "PARSED_ATTR(" << AttrName << ")\n";
-
- if (!DistinctSpellings)
- break;
}
}
}
@@ -1126,26 +1127,32 @@
bool Ignored = Attr.getValueAsBit("Ignored");
bool DistinctSpellings = Attr.getValueAsBit("DistinctSpellings");
if (SemaHandler || Ignored) {
- std::vector<StringRef> Spellings =
- getValueAsListOfStrings(Attr, "Spellings");
+ std::vector<Record*> Spellings = Attr.getValueAsListOfDefs("Spellings");
- for (std::vector<StringRef>::const_iterator I = Spellings.begin(),
+ for (std::vector<Record*>::const_iterator I = Spellings.begin(),
E = Spellings.end(); I != E; ++I) {
+ std::string RawSpelling = (*I)->getValueAsString("Name");
StringRef AttrName = NormalizeAttrName(DistinctSpellings
- ? *I
- : Spellings.front());
- StringRef Spelling = NormalizeAttrSpelling(*I);
+ ? StringRef(RawSpelling)
+ : StringRef(Attr.getName()));
+
+ SmallString<64> Spelling;
+ if ((*I)->getValueAsString("Variety") == "CXX11") {
+ Spelling += (*I)->getValueAsString("Namespace");
+ Spelling += "::";
+ }
+ Spelling += NormalizeAttrSpelling(RawSpelling);
if (SemaHandler)
Matches.push_back(
StringMatcher::StringPair(
- Spelling,
- std::string("return AttributeList::AT_")+AttrName.str() + ";"));
+ StringRef(Spelling),
+ "return AttributeList::AT_" + AttrName.str() + ";"));
else
Matches.push_back(
StringMatcher::StringPair(
- Spelling,
- std::string("return AttributeList::IgnoredAttribute;")));
+ StringRef(Spelling),
+ "return AttributeList::IgnoredAttribute;"));
}
}
}
Modified: cfe/branches/tooling/www/analyzer/faq.html
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/tooling/www/analyzer/faq.html?rev=159190&r1=159189&r2=159190&view=diff
==============================================================================
--- cfe/branches/tooling/www/analyzer/faq.html (original)
+++ cfe/branches/tooling/www/analyzer/faq.html Tue Jun 26 03:48:15 2012
@@ -28,6 +28,7 @@
null?</a></li>
<li><a href="#use_assert">The analyzer assumes that a loop body is never entered. How can I tell it that the loop body will be entered at least once?</a></li>
<li><a href="#suppress_issue">How can I suppress a specific analyzer warning?</a></li>
+ <li><a href="#exclude_code">How can I selectively exclude code the analyzer examines?</a></li>
</ol>
@@ -87,9 +88,30 @@
<h4 id="suppress_issue" class="faq">Q: How can I suppress a specific analyzer warning?</h4>
-<p>There is currently no mechanism for suppressing the analyzer warning,
-although this is currently being investigated. If you encounter an analyzer
-bug/false positive, please <a href = "filing_bugs.html">report it</a>.</p>
+<p>There is currently no solid mechanism for suppressing an analyzer warning,
+although this is currently being investigated. When you encounter an analyzer
+bug/false positive, check if it's one of the issues discussed above or if the
+analyzer <a href = "annotations.html#custom_assertions" >annotations</a> can
+resolve the issue. Second, please <a href = "filing_bugs.html">report it</a> to
+help us improve user experience. As the last resort, consider using <tt>__clang_analyzer__</tt> macro
+<a href = "faq.html#exclude_code" >described below</a>.</p>
+
+<h4 id="exclude_code" class="faq">Q: How can I selectively exclude code the analyzer examines?</h4>
+
+<p>When the static analyzer is using clang to parse source files, it implicitly
+defines the preprocessor macro <tt>__clang_analyzer__</tt>. One can use this
+macro to selectively exclude code the analyzer examines. Here is an example:
+
+<pre class="code_example">
+#ifndef __clang_analyzer__
+// Code not to be analyzed
+#endif
+</pre>
+
+This usage is discouraged because it makes the code dead to the analyzer from
+now on. Instead, we prefer that users file bugs against the analyzer when it flags
+false positives.
+</p>
</div>
</div>
More information about the llvm-branch-commits
mailing list