[cfe-commits] r152128 - in /cfe/trunk: include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr.cpp test/Sema/block-missing-return-type-warning.c test/Sema/warn-unused-parameters.c
Fariborz Jahanian
fjahanian at apple.com
Tue Mar 6 10:41:35 PST 2012
Author: fjahanian
Date: Tue Mar 6 12:41:35 2012
New Revision: 152128
URL: http://llvm.org/viewvc/llvm-project?rev=152128&view=rev
Log:
Undo patch for // rdar://10735698
Removed:
cfe/trunk/test/Sema/block-missing-return-type-warning.c
Modified:
cfe/trunk/include/clang/Basic/DiagnosticGroups.td
cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/test/Sema/warn-unused-parameters.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticGroups.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticGroups.td?rev=152128&r1=152127&r2=152128&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticGroups.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticGroups.td Tue Mar 6 12:41:35 2012
@@ -134,7 +134,6 @@
def ObjCPropertyImpl : DiagGroup<"objc-property-implementation">;
def ObjCMissingSuperCalls : DiagGroup<"objc-missing-super-calls">;
def ObjCRetainBlockProperty : DiagGroup<"objc-noncopy-retain-block-property">;
-def BlockMissingReturnType : DiagGroup<"block-missing-explicit-return-type">;
def ObjCReadonlyPropertyHasSetter : DiagGroup<"objc-readonly-with-setter-property">;
def Packed : DiagGroup<"packed">;
def Padded : DiagGroup<"padded">;
Modified: cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td?rev=152128&r1=152127&r2=152128&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td Tue Mar 6 12:41:35 2012
@@ -4953,9 +4953,6 @@
" or pick a deployment target that supports them">;
def err_block_returning_array_function : Error<
"block cannot return %select{array|function}0 type %1">;
-def warn_block_missing_return_type : Warning<
- "block literal is missing explicit return type and "
- "returns non-void values">, InGroup<BlockMissingReturnType>, DefaultIgnore;
// Builtin annotation string.
def err_builtin_annotation_not_string_constant : Error<
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=152128&r1=152127&r2=152128&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Tue Mar 6 12:41:35 2012
@@ -8902,12 +8902,7 @@
ExprCleanupObjects.push_back(Result->getBlockDecl());
ExprNeedsCleanups = true;
}
-
- if (BSI->TheDecl->blockMissingReturnType() &&
- !RetTy->isDependentType() &&
- !Context.getCanonicalType(RetTy)->isVoidType())
- Diag(CaretLoc, diag::warn_block_missing_return_type);
-
+
return Owned(Result);
}
Removed: cfe/trunk/test/Sema/block-missing-return-type-warning.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/block-missing-return-type-warning.c?rev=152127&view=auto
==============================================================================
--- cfe/trunk/test/Sema/block-missing-return-type-warning.c (original)
+++ cfe/trunk/test/Sema/block-missing-return-type-warning.c (removed)
@@ -1,18 +0,0 @@
-// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks -Wblock-missing-explicit-return-type
-// rdar://10735698
-
-int f;
-int main() {
- int (^bar)() = ^{ if (f) return 'a'; // expected-warning {{block literal is missing explicit return type and returns non-void values}}
- else return 10;
- };
-
- void (^bar1)() = ^{ f = 100; };
-
- void (^bar2)() = ^(void){ f = 100; };
-
- int (^bar3)() = ^ int { if (f) return 'a';
- else return 10;
- };
-
-}
Modified: cfe/trunk/test/Sema/warn-unused-parameters.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/warn-unused-parameters.c?rev=152128&r1=152127&r2=152128&view=diff
==============================================================================
--- cfe/trunk/test/Sema/warn-unused-parameters.c (original)
+++ cfe/trunk/test/Sema/warn-unused-parameters.c Tue Mar 6 12:41:35 2012
@@ -24,7 +24,7 @@
// RUN: %clang_cc1 -fblocks -fsyntax-only -Weverything %s 2>&1 | FileCheck -check-prefix=CHECK-everything %s
// RUN: %clang_cc1 -fblocks -fsyntax-only -Weverything -Werror %s 2>&1 | FileCheck -check-prefix=CHECK-everything-error %s
// RUN: %clang_cc1 -fblocks -fsyntax-only -Weverything -Wno-unused %s 2>&1 | FileCheck -check-prefix=CHECK-everything-no-unused %s
-// CHECK-everything: 7 warnings generated
-// CHECK-everything-error: 6 errors generated
-// CHECK-everything-no-unused: 6 warnings generated
+// CHECK-everything: 6 warnings generated
+// CHECK-everything-error: 5 errors generated
+// CHECK-everything-no-unused: 5 warnings generated
More information about the cfe-commits
mailing list