[cfe-commits] r45205 - in /cfe/trunk: Sema/SemaType.cpp clang.xcodeproj/project.pbxproj test/Parser/declarators.c
Chris Lattner
sabre at nondot.org
Wed Dec 19 10:01:43 PST 2007
Author: lattner
Date: Wed Dec 19 12:01:43 2007
New Revision: 45205
URL: http://llvm.org/viewvc/llvm-project?rev=45205&view=rev
Log:
reenable this code, fix the testcase.
Modified:
cfe/trunk/Sema/SemaType.cpp
cfe/trunk/clang.xcodeproj/project.pbxproj
cfe/trunk/test/Parser/declarators.c
Modified: cfe/trunk/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Sema/SemaType.cpp?rev=45205&r1=45204&r2=45205&view=diff
==============================================================================
--- cfe/trunk/Sema/SemaType.cpp (original)
+++ cfe/trunk/Sema/SemaType.cpp Wed Dec 19 12:01:43 2007
@@ -262,9 +262,9 @@
// 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;
Modified: cfe/trunk/clang.xcodeproj/project.pbxproj
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/clang.xcodeproj/project.pbxproj?rev=45205&r1=45204&r2=45205&view=diff
==============================================================================
--- cfe/trunk/clang.xcodeproj/project.pbxproj (original)
+++ cfe/trunk/clang.xcodeproj/project.pbxproj Wed Dec 19 12:01:43 2007
@@ -777,7 +777,6 @@
08FB7793FE84155DC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "clang" */;
- compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* clang */;
projectDirPath = "";
Modified: cfe/trunk/test/Parser/declarators.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/declarators.c?rev=45205&r1=45204&r2=45205&view=diff
==============================================================================
--- cfe/trunk/test/Parser/declarators.c (original)
+++ cfe/trunk/test/Parser/declarators.c Wed Dec 19 12:01:43 2007
@@ -1,4 +1,4 @@
-// RUN: clang %s -fsyntax-only
+// RUN: clang %s -fsyntax-only -verify
extern int a1[];
@@ -6,7 +6,7 @@
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))));
More information about the cfe-commits
mailing list