diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2018-10-30 20:31:30 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2018-10-30 20:31:30 +0000 |
commit | fa98390b3c3144c7cd446621526ca04c075435d8 (patch) | |
tree | f9c611a2729575b3822b5c0721b4a56f673c4ec2 /clang/lib/Parse/ParseInit.cpp | |
parent | fe09a20f09a290274ea81d1703d4106e06a11f94 (diff) | |
download | bcm5719-llvm-fa98390b3c3144c7cd446621526ca04c075435d8.tar.gz bcm5719-llvm-fa98390b3c3144c7cd446621526ca04c075435d8.zip |
NFC: Remove the ObjC1/ObjC2 distinction from clang (and related projects)
We haven't supported compiling ObjC1 for a long time (and never will again), so
there isn't any reason to keep these separate. This patch replaces
LangOpts::ObjC1 and LangOpts::ObjC2 with LangOpts::ObjC.
Differential revision: https://reviews.llvm.org/D53547
llvm-svn: 345637
Diffstat (limited to 'clang/lib/Parse/ParseInit.cpp')
-rw-r--r-- | clang/lib/Parse/ParseInit.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseInit.cpp b/clang/lib/Parse/ParseInit.cpp index 0cd550bc6a4..7742a5087cf 100644 --- a/clang/lib/Parse/ParseInit.cpp +++ b/clang/lib/Parse/ParseInit.cpp @@ -209,7 +209,7 @@ ExprResult Parser::ParseInitializerWithPotentialDesignator() { // send) or send to 'super', parse this as a message send // expression. We handle C++ and C separately, since C++ requires // much more complicated parsing. - if (getLangOpts().ObjC1 && getLangOpts().CPlusPlus) { + if (getLangOpts().ObjC && getLangOpts().CPlusPlus) { // Send to 'super'. if (Tok.is(tok::identifier) && Tok.getIdentifierInfo() == Ident_super && NextToken().isNot(tok::period) && @@ -242,7 +242,7 @@ ExprResult Parser::ParseInitializerWithPotentialDesignator() { // adopt the expression for further analysis below. // FIXME: potentially-potentially evaluated expression above? Idx = ExprResult(static_cast<Expr*>(TypeOrExpr)); - } else if (getLangOpts().ObjC1 && Tok.is(tok::identifier)) { + } else if (getLangOpts().ObjC && Tok.is(tok::identifier)) { IdentifierInfo *II = Tok.getIdentifierInfo(); SourceLocation IILoc = Tok.getLocation(); ParsedType ReceiverType; @@ -312,7 +312,7 @@ ExprResult Parser::ParseInitializerWithPotentialDesignator() { // tokens are '...' or ']' or an objc message send. If this is an objc // message send, handle it now. An objc-message send is the start of // an assignment-expression production. - if (getLangOpts().ObjC1 && Tok.isNot(tok::ellipsis) && + if (getLangOpts().ObjC && Tok.isNot(tok::ellipsis) && Tok.isNot(tok::r_square)) { CheckArrayDesignatorSyntax(*this, Tok.getLocation(), Desig); return ParseAssignmentExprWithObjCMessageExprStart( |