diff options
Diffstat (limited to 'lib/Parse/ParseDecl.cpp')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 643ddfac29..af7bbfc94e 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -754,7 +754,7 @@ void Parser::ParseNullabilityTypeSpecifiers(ParsedAttributes &attrs) { case tok::kw__Null_unspecified: { IdentifierInfo *AttrName = Tok.getIdentifierInfo(); SourceLocation AttrNameLoc = ConsumeToken(); - if (!getLangOpts().ObjC1) + if (!getLangOpts().ObjC) Diag(AttrNameLoc, diag::ext_nullability) << AttrName; attrs.addNew(AttrName, AttrNameLoc, nullptr, AttrNameLoc, nullptr, 0, @@ -3290,7 +3290,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, // Objective-C supports type arguments and protocol references // following an Objective-C object or object pointer // type. Handle either one of them. - if (Tok.is(tok::less) && getLangOpts().ObjC1) { + if (Tok.is(tok::less) && getLangOpts().ObjC) { SourceLocation NewEndLoc; TypeResult NewTypeRep = parseObjCTypeArgsAndProtocolQualifiers( Loc, TypeRep, /*consumeLastToken=*/true, @@ -3812,7 +3812,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, // GCC ObjC supports types like "<SomeProtocol>" as a synonym for // "id<SomeProtocol>". This is hopelessly old fashioned and dangerous, // but we support it. - if (DS.hasTypeSpecifier() || !getLangOpts().ObjC1) + if (DS.hasTypeSpecifier() || !getLangOpts().ObjC) goto DoneWithDeclSpec; SourceLocation StartLoc = Tok.getLocation(); @@ -4273,7 +4273,7 @@ void Parser::ParseEnumSpecifier(SourceLocation StartLoc, DeclSpec &DS, SourceRange Range; BaseType = ParseTypeName(&Range); - if (!getLangOpts().ObjC2) { + if (!getLangOpts().ObjC) { if (getLangOpts().CPlusPlus11) Diag(StartLoc, diag::warn_cxx98_compat_enum_fixed_underlying_type); else if (getLangOpts().CPlusPlus) @@ -4740,7 +4740,7 @@ bool Parser::isTypeSpecifierQualifier() { // GNU ObjC bizarre protocol extension: <proto1,proto2> with implicit 'id'. case tok::less: - return getLangOpts().ObjC1; + return getLangOpts().ObjC; case tok::kw___cdecl: case tok::kw___stdcall: @@ -4791,7 +4791,7 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) { case tok::identifier: // foo::bar // Unfortunate hack to support "Class.factoryMethod" notation. - if (getLangOpts().ObjC1 && NextToken().is(tok::period)) + if (getLangOpts().ObjC && NextToken().is(tok::period)) return false; if (TryAltiVecVectorToken()) return true; @@ -4921,7 +4921,7 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) { // GNU ObjC bizarre protocol extension: <proto1,proto2> with implicit 'id'. case tok::less: - return getLangOpts().ObjC1; + return getLangOpts().ObjC; // typedef-name case tok::annot_typename: @@ -5762,7 +5762,7 @@ void Parser::ParseDirectDeclarator(Declarator &D) { if (D.getContext() == DeclaratorContext::MemberContext) { // Objective-C++: Detect C++ keywords and try to prevent further errors by // treating these keyword as valid member names. - if (getLangOpts().ObjC1 && getLangOpts().CPlusPlus && + if (getLangOpts().ObjC && getLangOpts().CPlusPlus && Tok.getIdentifierInfo() && Tok.getIdentifierInfo()->isCPlusPlusKeyword(getLangOpts())) { Diag(getMissingDeclaratorIdLoc(D, Tok.getLocation()), |