r367708 - Remove a dead diagnostic, NFC

Erik Pilkington via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 2 12:25:58 PDT 2019


Author: epilk
Date: Fri Aug  2 12:25:58 2019
New Revision: 367708

URL: http://llvm.org/viewvc/llvm-project?rev=367708&view=rev
Log:
Remove a dead diagnostic, NFC

This was issued in Objective-C 1 mode, but we not longer support that, so this
is just unreachable.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
    cfe/trunk/lib/Parse/ParseObjc.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td?rev=367708&r1=367707&r2=367708&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td Fri Aug  2 12:25:58 2019
@@ -436,8 +436,6 @@ def err_objc_property_requires_field_nam
   "property requires fields to be named">;
 def err_objc_property_bitfield : Error<"property name cannot be a bit-field">;
 def err_objc_expected_property_attr : Error<"unknown property attribute %0">;
-def err_objc_properties_require_objc2 : Error<
-  "properties are an Objective-C 2 feature">;
 def err_objc_unexpected_attr : Error<
   "prefix attribute must be followed by an interface, protocol, or implementation">;
 def err_objc_postfix_attribute : Error <

Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=367708&r1=367707&r2=367708&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Fri Aug  2 12:25:58 2019
@@ -710,7 +710,6 @@ void Parser::ParseObjCInterfaceDeclList(
     case tok::objc_required:
     case tok::objc_optional:
       // This is only valid on protocols.
-      // FIXME: Should this check for ObjC2 being enabled?
       if (contextKey != tok::objc_protocol)
         Diag(AtLoc, diag::err_objc_directive_only_in_protocol);
       else
@@ -718,9 +717,6 @@ void Parser::ParseObjCInterfaceDeclList(
       break;
 
     case tok::objc_property:
-      if (!getLangOpts().ObjC)
-        Diag(AtLoc, diag::err_objc_properties_require_objc2);
-
       ObjCDeclSpec OCDS;
       SourceLocation LParenLoc;
       // Parse property attribute list, if any.




More information about the cfe-commits mailing list