diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2011-12-23 17:00:35 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2011-12-23 17:00:35 +0000 |
commit | ffbe9b9c64ab2e94b9d48ec56e511f75826fc80a (patch) | |
tree | a49ef3886e5f2c64219df223af5ede5a35265e87 /lib/Parse | |
parent | d217465128c7be70f74d3b4082355ea8c3b16fee (diff) |
Mass rename C1x references to C11. The name hasn't proliferated like "C++0x" so this patch is surprisingly small.
Also drop -Wc1x-extensions in favor of -Wc11-extensions. I don't think we need to keep this around for compatibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147221 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse')
-rw-r--r-- | lib/Parse/ParseDecl.cpp | 22 | ||||
-rw-r--r-- | lib/Parse/ParseDeclCXX.cpp | 8 | ||||
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 16 | ||||
-rw-r--r-- | lib/Parse/ParseTentative.cpp | 2 |
4 files changed, 24 insertions, 24 deletions
diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 9644d62bd2..94f7b9bb7d 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -883,7 +883,7 @@ void Parser::DiagnoseProhibitedAttributes(ParsedAttributesWithRange &attrs) { /// [C++] namespace-definition /// [C++] using-directive /// [C++] using-declaration -/// [C++0x/C1X] static_assert-declaration +/// [C++0x/C11] static_assert-declaration /// others... [FIXME] /// Parser::DeclGroupPtrTy Parser::ParseDeclaration(StmtVector &Stmts, @@ -1566,8 +1566,8 @@ Parser::getDeclSpecContextFromDeclaratorContext(unsigned Context) { /// FIXME: Simply returns an alignof() expression if the argument is a /// type. Ideally, the type should be propagated directly into Sema. /// -/// [C1X] type-id -/// [C1X] constant-expression +/// [C11] type-id +/// [C11] constant-expression /// [C++0x] type-id ...[opt] /// [C++0x] assignment-expression ...[opt] ExprResult Parser::ParseAlignArgument(SourceLocation Start, @@ -1592,8 +1592,8 @@ ExprResult Parser::ParseAlignArgument(SourceLocation Start, /// attribute to Attrs. /// /// alignment-specifier: -/// [C1X] '_Alignas' '(' type-id ')' -/// [C1X] '_Alignas' '(' constant-expression ')' +/// [C11] '_Alignas' '(' type-id ')' +/// [C11] '_Alignas' '(' constant-expression ')' /// [C++0x] 'alignas' '(' type-id ...[opt] ')' /// [C++0x] 'alignas' '(' assignment-expression ...[opt] ')' void Parser::ParseAlignmentSpecifier(ParsedAttributes &Attrs, @@ -1636,7 +1636,7 @@ void Parser::ParseAlignmentSpecifier(ParsedAttributes &Attrs, /// storage-class-specifier declaration-specifiers[opt] /// type-specifier declaration-specifiers[opt] /// [C99] function-specifier declaration-specifiers[opt] -/// [C1X] alignment-specifier declaration-specifiers[opt] +/// [C11] alignment-specifier declaration-specifiers[opt] /// [GNU] attributes declaration-specifiers[opt] /// [Clang] '__module_private__' declaration-specifiers[opt] /// @@ -2085,8 +2085,8 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, // alignment-specifier case tok::kw__Alignas: - if (!getLang().C1X) - Diag(Tok, diag::ext_c1x_alignas); + if (!getLang().C11) + Diag(Tok, diag::ext_c11_alignas); ParseAlignmentSpecifier(DS.getAttributes()); continue; @@ -3341,7 +3341,7 @@ bool Parser::isTypeSpecifierQualifier() { case tok::kw_private: return getLang().OpenCL; - // C1x _Atomic() + // C11 _Atomic() case tok::kw__Atomic: return true; } @@ -3465,7 +3465,7 @@ bool Parser::isDeclarationSpecifier(bool DisambiguatingWithExpression) { case tok::annot_decltype: return true; - // C1x _Atomic() + // C11 _Atomic() case tok::kw__Atomic: return true; @@ -4670,7 +4670,7 @@ void Parser::ParseTypeofSpecifier(DeclSpec &DS) { Diag(StartLoc, DiagID) << PrevSpec; } -/// [C1X] atomic-specifier: +/// [C11] atomic-specifier: /// _Atomic ( type-name ) /// void Parser::ParseAtomicSpecifier(DeclSpec &DS) { diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index 58e16bfff4..5bae0e4d2c 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -573,20 +573,20 @@ Decl *Parser::ParseUsingDeclaration(unsigned Context, IsTypeName, TypenameLoc); } -/// ParseStaticAssertDeclaration - Parse C++0x or C1X static_assert-declaration. +/// ParseStaticAssertDeclaration - Parse C++0x or C11 static_assert-declaration. /// /// [C++0x] static_assert-declaration: /// static_assert ( constant-expression , string-literal ) ; /// -/// [C1X] static_assert-declaration: +/// [C11] static_assert-declaration: /// _Static_assert ( constant-expression , string-literal ) ; /// Decl *Parser::ParseStaticAssertDeclaration(SourceLocation &DeclEnd){ assert((Tok.is(tok::kw_static_assert) || Tok.is(tok::kw__Static_assert)) && "Not a static_assert declaration"); - if (Tok.is(tok::kw__Static_assert) && !getLang().C1X) - Diag(Tok, diag::ext_c1x_static_assert); + if (Tok.is(tok::kw__Static_assert) && !getLang().C11) + Diag(Tok, diag::ext_c11_static_assert); if (Tok.is(tok::kw_static_assert)) Diag(Tok, diag::warn_cxx98_compat_static_assert); diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index 8af7204cd1..0dd48a2946 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -466,7 +466,7 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression, /// [C++] boolean-literal [C++ 2.13.5] /// [C++0x] 'nullptr' [C++0x 2.14.7] /// '(' expression ')' -/// [C1X] generic-selection +/// [C11] generic-selection /// '__func__' [C99 6.4.2.2] /// [GNU] '__FUNCTION__' /// [GNU] '__PRETTY_FUNCTION__' @@ -794,7 +794,7 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression, case tok::utf32_string_literal: Res = ParseStringLiteralExpression(); break; - case tok::kw__Generic: // primary-expression: generic-selection [C1X 6.5.1] + case tok::kw__Generic: // primary-expression: generic-selection [C11 6.5.1] Res = ParseGenericSelectionExpression(); break; case tok::kw___builtin_va_arg: @@ -2050,8 +2050,8 @@ ExprResult Parser::ParseStringLiteralExpression() { return Actions.ActOnStringLiteral(&StringToks[0], StringToks.size()); } -/// ParseGenericSelectionExpression - Parse a C1X generic-selection -/// [C1X 6.5.1.1]. +/// ParseGenericSelectionExpression - Parse a C11 generic-selection +/// [C11 6.5.1.1]. /// /// generic-selection: /// _Generic ( assignment-expression , generic-assoc-list ) @@ -2065,8 +2065,8 @@ ExprResult Parser::ParseGenericSelectionExpression() { assert(Tok.is(tok::kw__Generic) && "_Generic keyword expected"); SourceLocation KeyLoc = ConsumeToken(); - if (!getLang().C1X) - Diag(KeyLoc, diag::ext_c1x_generic_selection); + if (!getLang().C11) + Diag(KeyLoc, diag::ext_c11_generic_selection); BalancedDelimiterTracker T(*this, tok::l_paren); if (T.expectAndConsume(diag::err_expected_lparen)) @@ -2074,7 +2074,7 @@ ExprResult Parser::ParseGenericSelectionExpression() { ExprResult ControllingExpr; { - // C1X 6.5.1.1p3 "The controlling expression of a generic selection is + // C11 6.5.1.1p3 "The controlling expression of a generic selection is // not evaluated." EnterExpressionEvaluationContext Unevaluated(Actions, Sema::Unevaluated); ControllingExpr = ParseAssignmentExpression(); @@ -2095,7 +2095,7 @@ ExprResult Parser::ParseGenericSelectionExpression() { while (1) { ParsedType Ty; if (Tok.is(tok::kw_default)) { - // C1X 6.5.1.1p2 "A generic selection shall have no more than one default + // C11 6.5.1.1p2 "A generic selection shall have no more than one default // generic association." if (!DefaultLoc.isInvalid()) { Diag(Tok, diag::err_duplicate_default_assoc); diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp index 2c9018316a..fe46456040 100644 --- a/lib/Parse/ParseTentative.cpp +++ b/lib/Parse/ParseTentative.cpp @@ -1046,7 +1046,7 @@ Parser::TPResult Parser::isCXXDeclarationSpecifier() { case tok::kw___underlying_type: return TPResult::True(); - // C1x _Atomic + // C11 _Atomic case tok::kw__Atomic: return TPResult::True(); |