]> granicus.if.org Git - clang/commitdiff
reenable this code, fix the testcase.
authorChris Lattner <sabre@nondot.org>
Wed, 19 Dec 2007 18:01:43 +0000 (18:01 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 19 Dec 2007 18:01:43 +0000 (18:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45205 91177308-0d34-0410-b5e6-96231b3b80d8

Sema/SemaType.cpp
clang.xcodeproj/project.pbxproj
test/Parser/declarators.c

index 83846876ac1aa26f2ea4a6509e96007c32aedf55..f7a7b12f4aebfca1787bd3fbb5a30641ddde581f 100644 (file)
@@ -262,9 +262,9 @@ QualType Sema::GetTypeForDeclarator(Declarator &D, Scope *S) {
       // does not have a K&R-style identifier list), then the arguments are part
       // of the type, otherwise the argument list is ().
       const DeclaratorChunk::FunctionTypeInfo &FTI = DeclType.Fun;
-        
+      
       // C99 6.7.5.3p1: The return type may not be a function or array type.
-      if (0 && (T->isArrayType() || T->isFunctionType())) {
+      if (T->isArrayType() || T->isFunctionType()) {
         Diag(DeclType.Loc, diag::err_func_returning_array_function,
              T.getAsString());
         T = Context.IntTy;
index 26353e5b1f83f49c8b7553ab217d0856c8248768..892e53b2a1f9a468cacc8299bf28cba0ad82efec 100644 (file)
                08FB7793FE84155DC02AAC07 /* Project object */ = {
                        isa = PBXProject;
                        buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
-                       compatibilityVersion = "Xcode 2.4";
                        hasScannedForEncodings = 1;
                        mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
                        projectDirPath = "";
index af599f82fe317429480cdfecf235869ea0836e25..91cd81653bf7c789b48c731165ef1ef0f082d1ee 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: clang %s -fsyntax-only
+// RUN: clang %s -fsyntax-only -verify
 
 extern int a1[];
 
@@ -6,7 +6,7 @@ void f0();
 void f1(int [*]);
 void f2(int [const *]);
 void f3(int [volatile const*]);
-int f4(*XX)(void);
+int f4(*XX)(void); /* expected-error {{cannot return}} */
 
 char ((((*X))));