[llvm-branch-commits] [cfe-branch] r119271 - in /cfe/branches/Apple/whitney: lib/Parse/ParseObjc.cpp test/Parser/missing-end-3.m
Daniel Dunbar
daniel at zuster.org
Mon Nov 15 14:05:29 PST 2010
Author: ddunbar
Date: Mon Nov 15 16:05:29 2010
New Revision: 119271
URL: http://llvm.org/viewvc/llvm-project?rev=119271&view=rev
Log:
Merge r118629:
--
Author: Fariborz Jahanian <fjahanian at apple.com>
Date: Tue Nov 9 20:38:00 2010 +0000
Issues good diagnostic when @end is missing.
// rdar://8283484
Added:
cfe/branches/Apple/whitney/test/Parser/missing-end-3.m
Modified:
cfe/branches/Apple/whitney/lib/Parse/ParseObjc.cpp
Modified: cfe/branches/Apple/whitney/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/lib/Parse/ParseObjc.cpp?rev=119271&r1=119270&r2=119271&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/lib/Parse/ParseObjc.cpp (original)
+++ cfe/branches/Apple/whitney/lib/Parse/ParseObjc.cpp Mon Nov 15 16:05:29 2010
@@ -404,6 +404,7 @@
break;
case tok::objc_implementation:
+ case tok::objc_interface:
Diag(Tok, diag::err_objc_missing_end);
ConsumeToken();
break;
Added: cfe/branches/Apple/whitney/test/Parser/missing-end-3.m
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/Parser/missing-end-3.m?rev=119271&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/Parser/missing-end-3.m (added)
+++ cfe/branches/Apple/whitney/test/Parser/missing-end-3.m Mon Nov 15 16:05:29 2010
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// rdar://8283484
+ at interface blah {
+ @private
+}
+// since I forgot the @end here it should say something
+
+ at interface blah // expected-error {{missing @end}}
+ at end // and Unknown type name 'end' here
+
More information about the llvm-branch-commits
mailing list