[cfe-commits] r171372 - in /cfe/trunk: include/clang/AST/Expr.h include/clang/Basic/TokenKinds.def include/clang/Parse/Parser.h include/clang/Sema/AttributeList.h include/clang/Sema/DeclSpec.h lib/AST/Expr.cpp lib/Basic/IdentifierTable.cpp lib/Parse/ParseDecl.cpp lib/Parse/ParseDeclCXX.cpp lib/Parse/ParseExprCXX.cpp lib/Parse/ParseObjc.cpp lib/Parse/ParseStmt.cpp lib/Parse/ParseTemplate.cpp lib/Parse/ParseTentative.cpp lib/Parse/Parser.cpp lib/Sema/SemaDeclAttr.cpp lib/Sema/SemaExpr.cpp test/Preprocessor/init.c
Richard Smith
richard-llvm at metafoo.co.uk
Wed Jan 2 04:01:26 PST 2013
Author: rsmith
Date: Wed Jan 2 06:01:23 2013
New Revision: 171372
URL: http://llvm.org/viewvc/llvm-project?rev=171372&view=rev
Log:
s/CXX0X/CXX11/g, except for __GNU_EXPERIMENTAL_CXX0X__, and update a few nearby 'C++0x' comments.
Modified:
cfe/trunk/include/clang/AST/Expr.h
cfe/trunk/include/clang/Basic/TokenKinds.def
cfe/trunk/include/clang/Parse/Parser.h
cfe/trunk/include/clang/Sema/AttributeList.h
cfe/trunk/include/clang/Sema/DeclSpec.h
cfe/trunk/lib/AST/Expr.cpp
cfe/trunk/lib/Basic/IdentifierTable.cpp
cfe/trunk/lib/Parse/ParseDecl.cpp
cfe/trunk/lib/Parse/ParseDeclCXX.cpp
cfe/trunk/lib/Parse/ParseExprCXX.cpp
cfe/trunk/lib/Parse/ParseObjc.cpp
cfe/trunk/lib/Parse/ParseStmt.cpp
cfe/trunk/lib/Parse/ParseTemplate.cpp
cfe/trunk/lib/Parse/ParseTentative.cpp
cfe/trunk/lib/Parse/Parser.cpp
cfe/trunk/lib/Sema/SemaDeclAttr.cpp
cfe/trunk/lib/Sema/SemaExpr.cpp
cfe/trunk/test/Preprocessor/init.c
Modified: cfe/trunk/include/clang/AST/Expr.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/Expr.h?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/include/clang/AST/Expr.h (original)
+++ cfe/trunk/include/clang/AST/Expr.h Wed Jan 2 06:01:23 2013
@@ -196,7 +196,7 @@
}
/// \brief Whether this expression contains an unexpanded parameter
- /// pack (for C++0x variadic templates).
+ /// pack (for C++11 variadic templates).
///
/// Given the following function template:
///
@@ -238,7 +238,7 @@
/// result of an r-value expression is a value detached from any
/// specific storage.
///
- /// C++0x divides the concept of "r-value" into pure r-values
+ /// C++11 divides the concept of "r-value" into pure r-values
/// ("pr-values") and so-called expiring values ("x-values"), which
/// identify specific objects that can be safely cannibalized for
/// their resources. This is an unfortunate abuse of terminology on
@@ -294,7 +294,7 @@
isModifiableLvalueResult isModifiableLvalue(ASTContext &Ctx,
SourceLocation *Loc = 0) const;
- /// \brief The return type of classify(). Represents the C++0x expression
+ /// \brief The return type of classify(). Represents the C++11 expression
/// taxonomy.
class Classification {
public:
@@ -357,10 +357,10 @@
}
};
- /// \brief Classify - Classify this expression according to the C++0x
+ /// \brief Classify - Classify this expression according to the C++11
/// expression taxonomy.
///
- /// C++0x defines ([basic.lval]) a new taxonomy of expressions to replace the
+ /// C++11 defines ([basic.lval]) a new taxonomy of expressions to replace the
/// old lvalue vs rvalue. This function determines the type of expression this
/// is. There are three expression types:
/// - lvalues are classical lvalues as in C++03.
@@ -374,7 +374,7 @@
}
/// \brief ClassifyModifiable - Classify this expression according to the
- /// C++0x expression taxonomy, and see if it is valid on the left side
+ /// C++11 expression taxonomy, and see if it is valid on the left side
/// of an assignment.
///
/// This function extends classify in that it also tests whether the
@@ -598,8 +598,8 @@
/// \brief Expression is a Null pointer constant built from a literal zero.
NPCK_ZeroLiteral,
- /// \brief Expression is a C++0X nullptr.
- NPCK_CXX0X_nullptr,
+ /// \brief Expression is a C++11 nullptr.
+ NPCK_CXX11_nullptr,
/// \brief Expression is a GNU-style __null constant.
NPCK_GNUNull
Modified: cfe/trunk/include/clang/Basic/TokenKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/TokenKinds.def?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/TokenKinds.def (original)
+++ cfe/trunk/include/clang/Basic/TokenKinds.def Wed Jan 2 06:01:23 2013
@@ -121,7 +121,7 @@
TOK(char_constant) // 'a'
TOK(wide_char_constant) // L'b'
-// C++0x Character Constants
+// C++11 Character Constants
TOK(utf16_char_constant) // u'a'
TOK(utf32_char_constant) // U'a'
@@ -130,7 +130,7 @@
TOK(wide_string_literal) // L"foo"
TOK(angle_string_literal)// <foo>
-// C++0x String Literals.
+// C++11 String Literals.
TOK(utf8_string_literal) // u8"foo"
TOK(utf16_string_literal)// u"foo"
TOK(utf32_string_literal)// U"foo"
@@ -208,7 +208,7 @@
// KEYCXX - This is a C++ keyword, or a C++-specific keyword in the
// implementation namespace
// KEYNOCXX - This is a keyword in every non-C++ dialect.
-// KEYCXX0X - This is a C++ keyword introduced to C++ in C++0x
+// KEYCXX11 - This is a C++ keyword introduced to C++ in C++11
// KEYGNU - This is a keyword if GNU extensions are enabled
// KEYMS - This is a keyword if Microsoft extensions are enabled
// KEYNOMS - This is a keyword that must never be enabled under
@@ -311,17 +311,17 @@
CXX_KEYWORD_OPERATOR(xor , caret)
CXX_KEYWORD_OPERATOR(xor_eq , caretequal)
-// C++0x keywords
-KEYWORD(alignas , KEYCXX0X)
-KEYWORD(alignof , KEYCXX0X)
-KEYWORD(char16_t , KEYCXX0X|KEYNOMS)
-KEYWORD(char32_t , KEYCXX0X|KEYNOMS)
-KEYWORD(constexpr , KEYCXX0X)
-KEYWORD(decltype , KEYCXX0X)
-KEYWORD(noexcept , KEYCXX0X)
-KEYWORD(nullptr , KEYCXX0X)
-KEYWORD(static_assert , KEYCXX0X)
-KEYWORD(thread_local , KEYCXX0X)
+// C++11 keywords
+KEYWORD(alignas , KEYCXX11)
+KEYWORD(alignof , KEYCXX11)
+KEYWORD(char16_t , KEYCXX11|KEYNOMS)
+KEYWORD(char32_t , KEYCXX11|KEYNOMS)
+KEYWORD(constexpr , KEYCXX11)
+KEYWORD(decltype , KEYCXX11)
+KEYWORD(noexcept , KEYCXX11)
+KEYWORD(nullptr , KEYCXX11)
+KEYWORD(static_assert , KEYCXX11)
+KEYWORD(thread_local , KEYCXX11)
// GNU Extensions (in impl-reserved namespace)
KEYWORD(_Decimal32 , KEYALL)
Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Wed Jan 2 06:01:23 2013
@@ -1856,7 +1856,7 @@
SourceLocation ScopeLoc,
AttributeList::Syntax Syntax);
- void MaybeParseCXX0XAttributes(Declarator &D) {
+ void MaybeParseCXX11Attributes(Declarator &D) {
if (getLangOpts().CPlusPlus11 && isCXX11AttributeSpecifier()) {
ParsedAttributesWithRange attrs(AttrFactory);
SourceLocation endLoc;
@@ -1864,7 +1864,7 @@
D.takeAttributes(attrs, endLoc);
}
}
- void MaybeParseCXX0XAttributes(ParsedAttributes &attrs,
+ void MaybeParseCXX11Attributes(ParsedAttributes &attrs,
SourceLocation *endLoc = 0) {
if (getLangOpts().CPlusPlus11 && isCXX11AttributeSpecifier()) {
ParsedAttributesWithRange attrsWithRange(AttrFactory);
@@ -1872,7 +1872,7 @@
attrs.takeAllFrom(attrsWithRange);
}
}
- void MaybeParseCXX0XAttributes(ParsedAttributesWithRange &attrs,
+ void MaybeParseCXX11Attributes(ParsedAttributesWithRange &attrs,
SourceLocation *endLoc = 0,
bool OuterMightBeMessageSend = false) {
if (getLangOpts().CPlusPlus11 &&
@@ -1938,13 +1938,13 @@
void ParseAlignmentSpecifier(ParsedAttributes &Attrs,
SourceLocation *endLoc = 0);
- VirtSpecifiers::Specifier isCXX0XVirtSpecifier(const Token &Tok) const;
- VirtSpecifiers::Specifier isCXX0XVirtSpecifier() const {
- return isCXX0XVirtSpecifier(Tok);
+ VirtSpecifiers::Specifier isCXX11VirtSpecifier(const Token &Tok) const;
+ VirtSpecifiers::Specifier isCXX11VirtSpecifier() const {
+ return isCXX11VirtSpecifier(Tok);
}
- void ParseOptionalCXX0XVirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface);
+ void ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS, bool IsInterface);
- bool isCXX0XFinalKeyword() const;
+ bool isCXX11FinalKeyword() const;
/// DeclaratorScopeObj - RAII object used in Parser::ParseDirectDeclarator to
/// enter a new C++ declarator scope and exit it when the function is
@@ -1987,7 +1987,7 @@
DirectDeclParseFunction DirectDeclParser);
void ParseTypeQualifierListOpt(DeclSpec &DS, bool GNUAttributesAllowed = true,
- bool CXX0XAttributesAllowed = true);
+ bool CXX11AttributesAllowed = true);
void ParseDirectDeclarator(Declarator &D);
void ParseParenDeclarator(Declarator &D);
void ParseFunctionDeclarator(Declarator &D,
Modified: cfe/trunk/include/clang/Sema/AttributeList.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/AttributeList.h?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/AttributeList.h (original)
+++ cfe/trunk/include/clang/Sema/AttributeList.h Wed Jan 2 06:01:23 2013
@@ -231,7 +231,7 @@
/// declspec representing a type specification (like __w64 or __ptr32).
bool isDeclspecAttribute() const { return SyntaxUsed == AS_Declspec ||
SyntaxUsed == AS_MSTypespec; }
- bool isCXX0XAttribute() const { return SyntaxUsed == AS_CXX11; }
+ bool isCXX11Attribute() const { return SyntaxUsed == AS_CXX11; }
bool isMSTypespecAttribute() const { return SyntaxUsed == AS_MSTypespec; }
bool isInvalid() const { return Invalid; }
@@ -511,18 +511,18 @@
return Left;
}
-/// CXX0XAttributeList - A wrapper around a C++0x attribute list.
+/// CXX11AttributeList - A wrapper around a C++11 attribute list.
/// Stores, in addition to the list proper, whether or not an actual list was
/// (as opposed to an empty list, which may be ill-formed in some places) and
/// the source range of the list.
-struct CXX0XAttributeList {
+struct CXX11AttributeList {
AttributeList *AttrList;
SourceRange Range;
bool HasAttr;
- CXX0XAttributeList (AttributeList *attrList, SourceRange range, bool hasAttr)
+ CXX11AttributeList (AttributeList *attrList, SourceRange range, bool hasAttr)
: AttrList(attrList), Range(range), HasAttr (hasAttr) {
}
- CXX0XAttributeList ()
+ CXX11AttributeList ()
: AttrList(0), Range(), HasAttr(false) {
}
};
Modified: cfe/trunk/include/clang/Sema/DeclSpec.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Sema/DeclSpec.h?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/include/clang/Sema/DeclSpec.h (original)
+++ cfe/trunk/include/clang/Sema/DeclSpec.h Wed Jan 2 06:01:23 2013
@@ -1905,7 +1905,7 @@
void getCXX11AttributeRanges(SmallVector<SourceRange, 4> &Ranges) {
AttributeList *AttrList = Attrs.getList();
while (AttrList) {
- if (AttrList->isCXX0XAttribute())
+ if (AttrList->isCXX11Attribute())
Ranges.push_back(AttrList->getRange());
AttrList = AttrList->getNext();
}
Modified: cfe/trunk/lib/AST/Expr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/Expr.cpp?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/lib/AST/Expr.cpp (original)
+++ cfe/trunk/lib/AST/Expr.cpp Wed Jan 2 06:01:23 2013
@@ -3010,9 +3010,9 @@
return Source->isNullPointerConstant(Ctx, NPC);
}
- // C++0x nullptr_t is always a null pointer constant.
+ // C++11 nullptr_t is always a null pointer constant.
if (getType()->isNullPtrType())
- return NPCK_CXX0X_nullptr;
+ return NPCK_CXX11_nullptr;
if (const RecordType *UT = getType()->getAsUnionType())
if (UT && UT->getDecl()->hasAttr<TransparentUnionAttr>())
Modified: cfe/trunk/lib/Basic/IdentifierTable.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/IdentifierTable.cpp?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/IdentifierTable.cpp (original)
+++ cfe/trunk/lib/Basic/IdentifierTable.cpp Wed Jan 2 06:01:23 2013
@@ -94,7 +94,7 @@
enum {
KEYC99 = 0x1,
KEYCXX = 0x2,
- KEYCXX0X = 0x4,
+ KEYCXX11 = 0x4,
KEYGNU = 0x8,
KEYMS = 0x10,
BOOLSUPPORT = 0x20,
@@ -124,7 +124,7 @@
unsigned AddResult = 0;
if (Flags == KEYALL) AddResult = 2;
else if (LangOpts.CPlusPlus && (Flags & KEYCXX)) AddResult = 2;
- else if (LangOpts.CPlusPlus11 && (Flags & KEYCXX0X)) AddResult = 2;
+ else if (LangOpts.CPlusPlus11 && (Flags & KEYCXX11)) AddResult = 2;
else if (LangOpts.C99 && (Flags & KEYC99)) AddResult = 2;
else if (LangOpts.GNUKeywords && (Flags & KEYGNU)) AddResult = 1;
else if (LangOpts.MicrosoftExt && (Flags & KEYMS)) AddResult = 1;
@@ -138,7 +138,7 @@
// We treat bridge casts as objective-C keywords so we can warn on them
// in non-arc mode.
else if (LangOpts.ObjC2 && (Flags & KEYARC)) AddResult = 2;
- else if (LangOpts.CPlusPlus && (Flags & KEYCXX0X)) AddResult = 3;
+ else if (LangOpts.CPlusPlus && (Flags & KEYCXX11)) AddResult = 3;
// Don't add this keyword under MicrosoftMode.
if (LangOpts.MicrosoftMode && (Flags & KEYNOMS))
Modified: cfe/trunk/lib/Parse/ParseDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDecl.cpp?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDecl.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDecl.cpp Wed Jan 2 06:01:23 2013
@@ -1146,7 +1146,7 @@
void Parser::ProhibitCXX11Attributes(ParsedAttributesWithRange &attrs) {
AttributeList *AttrList = attrs.getList();
while (AttrList) {
- if (AttrList->isCXX0XAttribute()) {
+ if (AttrList->isCXX11Attribute()) {
Diag(AttrList->getLoc(), diag::warn_attribute_no_decl)
<< AttrList->getName();
AttrList->setInvalid();
@@ -1318,7 +1318,7 @@
(getLangOpts().CPlusPlus && Context == Declarator::FileContext);
case tok::identifier: // Possible virt-specifier.
- return getLangOpts().CPlusPlus11 && isCXX0XVirtSpecifier(NextToken());
+ return getLangOpts().CPlusPlus11 && isCXX11VirtSpecifier(NextToken());
default:
return false;
@@ -3145,7 +3145,7 @@
// If attributes exist after tag, parse them.
ParsedAttributesWithRange attrs(AttrFactory);
MaybeParseGNUAttributes(attrs);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
// If declspecs exist after tag, parse them.
while (Tok.is(tok::kw___declspec))
@@ -3167,7 +3167,7 @@
// They are allowed afterwards, though.
MaybeParseGNUAttributes(attrs);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
while (Tok.is(tok::kw___declspec))
ParseMicrosoftDeclSpec(attrs);
}
@@ -3485,7 +3485,7 @@
// If attributes exist after the enumerator, parse them.
ParsedAttributesWithRange attrs(AttrFactory);
MaybeParseGNUAttributes(attrs);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
ProhibitAttributes(attrs);
SourceLocation EqualLoc;
@@ -4028,7 +4028,7 @@
/// [vendor] type-qualifier-list attributes
/// [ only if VendorAttributesAllowed=true ]
/// [C++0x] attribute-specifier[opt] is allowed before cv-qualifier-seq
-/// [ only if CXX0XAttributesAllowed=true ]
+/// [ only if CXX11AttributesAllowed=true ]
/// Note: vendor can be GNU, MS, etc.
///
void Parser::ParseTypeQualifierListOpt(DeclSpec &DS,
@@ -4493,7 +4493,7 @@
// Don't parse attributes unless we have parsed an unparenthesized name.
if (D.hasName() && !D.getNumTypeObjects())
- MaybeParseCXX0XAttributes(D);
+ MaybeParseCXX11Attributes(D);
while (1) {
if (Tok.is(tok::l_paren)) {
@@ -4770,7 +4770,7 @@
// Parse attribute-specifier-seq[opt]. Per DR 979 and DR 1297, this goes
// after the exception-specification.
- MaybeParseCXX0XAttributes(FnAttrs);
+ MaybeParseCXX11Attributes(FnAttrs);
// Parse trailing-return-type[opt].
LocalEndLoc = EndLoc;
@@ -4945,7 +4945,7 @@
DeclSpec DS(AttrFactory);
// Parse any C++11 attributes.
- MaybeParseCXX0XAttributes(DS.getAttributes());
+ MaybeParseCXX11Attributes(DS.getAttributes());
// Skip any Microsoft attributes before a param.
MaybeParseMicrosoftAttributes(DS.getAttributes());
@@ -5095,7 +5095,7 @@
if (Tok.getKind() == tok::r_square) {
T.consumeClose();
ParsedAttributes attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
// Remember that we parsed the empty array type.
ExprResult NumElements;
@@ -5112,7 +5112,7 @@
T.consumeClose();
ParsedAttributes attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
// Remember that we parsed a array type, and remember its features.
D.AddTypeInfo(DeclaratorChunk::getArray(0, false, 0,
@@ -5182,7 +5182,7 @@
T.consumeClose();
ParsedAttributes attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
// Remember that we parsed a array type, and remember its features.
D.AddTypeInfo(DeclaratorChunk::getArray(DS.getTypeQualifiers(),
Modified: cfe/trunk/lib/Parse/ParseDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseDeclCXX.cpp?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseDeclCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseDeclCXX.cpp Wed Jan 2 06:01:23 2013
@@ -195,7 +195,7 @@
if (index == Ident.size()) {
while (Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {
ParsedAttributesWithRange attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
MaybeParseMicrosoftAttributes(attrs);
ParseExternalDeclaration(attrs);
}
@@ -295,7 +295,7 @@
: SourceLocation());
ParsedAttributesWithRange attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
MaybeParseMicrosoftAttributes(attrs);
if (Tok.isNot(tok::l_brace)) {
@@ -318,7 +318,7 @@
T.consumeOpen();
while (Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {
ParsedAttributesWithRange attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
MaybeParseMicrosoftAttributes(attrs);
ParseExternalDeclaration(attrs);
}
@@ -454,7 +454,7 @@
ParsedAttributesWithRange attrs(AttrFactory);
// FIXME: Simply skip the attributes and diagnose, don't bother parsing them.
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
ProhibitAttributes(attrs);
attrs.clear();
attrs.Range = SourceRange();
@@ -494,7 +494,7 @@
return 0;
}
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
// Maybe this is an alias-declaration.
bool IsAliasDecl = Tok.is(tok::equal);
@@ -1104,7 +1104,7 @@
// If C++0x attributes exist here, parse them.
// FIXME: Are we consistent with the ordering of parsing of different
// styles of attributes?
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
if (TagType == DeclSpec::TST_struct &&
!Tok.is(tok::identifier) &&
@@ -1250,14 +1250,14 @@
// For these, DSC is DSC_type_specifier.
// If there are attributes after class name, parse them.
- MaybeParseCXX0XAttributes(Attributes);
+ MaybeParseCXX11Attributes(Attributes);
Sema::TagUseKind TUK;
if (DSC == DSC_trailing)
TUK = Sema::TUK_Reference;
else if (Tok.is(tok::l_brace) ||
(getLangOpts().CPlusPlus && Tok.is(tok::colon)) ||
- (isCXX0XFinalKeyword() &&
+ (isCXX11FinalKeyword() &&
(NextToken().is(tok::l_brace) || NextToken().is(tok::colon)))) {
if (DS.isFriendSpecified()) {
// C++ [class.friend]p2:
@@ -1273,7 +1273,7 @@
// Okay, this is a class definition.
TUK = Sema::TUK_Definition;
}
- } else if (isCXX0XFinalKeyword() && (NextToken().is(tok::l_square) ||
+ } else if (isCXX11FinalKeyword() && (NextToken().is(tok::l_square) ||
NextToken().is(tok::kw_alignas) ||
NextToken().is(tok::kw__Alignas))) {
// We can't tell if this is a definition or reference
@@ -1506,7 +1506,7 @@
if (TUK == Sema::TUK_Definition) {
assert(Tok.is(tok::l_brace) ||
(getLangOpts().CPlusPlus && Tok.is(tok::colon)) ||
- isCXX0XFinalKeyword());
+ isCXX11FinalKeyword());
if (getLangOpts().CPlusPlus)
ParseCXXMemberSpecification(StartLoc, TagType, TagOrTempResult.get());
else
@@ -1708,13 +1708,13 @@
}
}
-/// isCXX0XVirtSpecifier - Determine whether the given token is a C++0x
+/// isCXX11VirtSpecifier - Determine whether the given token is a C++11
/// virt-specifier.
///
/// virt-specifier:
/// override
/// final
-VirtSpecifiers::Specifier Parser::isCXX0XVirtSpecifier(const Token &Tok) const {
+VirtSpecifiers::Specifier Parser::isCXX11VirtSpecifier(const Token &Tok) const {
if (!getLangOpts().CPlusPlus)
return VirtSpecifiers::VS_None;
@@ -1737,15 +1737,15 @@
return VirtSpecifiers::VS_None;
}
-/// ParseOptionalCXX0XVirtSpecifierSeq - Parse a virt-specifier-seq.
+/// ParseOptionalCXX11VirtSpecifierSeq - Parse a virt-specifier-seq.
///
/// virt-specifier-seq:
/// virt-specifier
/// virt-specifier-seq virt-specifier
-void Parser::ParseOptionalCXX0XVirtSpecifierSeq(VirtSpecifiers &VS,
+void Parser::ParseOptionalCXX11VirtSpecifierSeq(VirtSpecifiers &VS,
bool IsInterface) {
while (true) {
- VirtSpecifiers::Specifier Specifier = isCXX0XVirtSpecifier();
+ VirtSpecifiers::Specifier Specifier = isCXX11VirtSpecifier();
if (Specifier == VirtSpecifiers::VS_None)
return;
@@ -1770,9 +1770,9 @@
}
}
-/// isCXX0XFinalKeyword - Determine whether the next token is a C++0x
+/// isCXX11FinalKeyword - Determine whether the next token is a C++11
/// contextual 'final' keyword.
-bool Parser::isCXX0XFinalKeyword() const {
+bool Parser::isCXX11FinalKeyword() const {
if (!getLangOpts().CPlusPlus)
return false;
@@ -1917,8 +1917,8 @@
ParsedAttributesWithRange attrs(AttrFactory);
ParsedAttributesWithRange FnAttrs(AttrFactory);
- // Optional C++0x attribute-specifier
- MaybeParseCXX0XAttributes(attrs);
+ // Optional C++11 attribute-specifier
+ MaybeParseCXX11Attributes(attrs);
// We need to keep these attributes for future diagnostic
// before they are taken over by declaration specifier.
FnAttrs.addAll(attrs.getList());
@@ -1996,7 +1996,7 @@
return;
}
- ParseOptionalCXX0XVirtSpecifierSeq(VS, getCurrentClass().IsInterface);
+ ParseOptionalCXX11VirtSpecifierSeq(VS, getCurrentClass().IsInterface);
// If attributes exist after the declarator, but before an '{', parse them.
MaybeParseGNUAttributes(DeclaratorInfo, &LateParsedAttrs);
@@ -2119,7 +2119,7 @@
// FIXME: When g++ adds support for this, we'll need to check whether it
// goes before or after the GNU attributes and __asm__.
- ParseOptionalCXX0XVirtSpecifierSeq(VS, getCurrentClass().IsInterface);
+ ParseOptionalCXX11VirtSpecifierSeq(VS, getCurrentClass().IsInterface);
InClassInitStyle HasInClassInit = ICIS_NoInit;
if ((Tok.is(tok::equal) || Tok.is(tok::l_brace)) && !HasInitializer) {
@@ -2402,7 +2402,7 @@
// Parse the optional 'final' keyword.
if (getLangOpts().CPlusPlus && Tok.is(tok::identifier)) {
- assert(isCXX0XFinalKeyword() && "not a class definition");
+ assert(isCXX11FinalKeyword() && "not a class definition");
FinalLoc = ConsumeToken();
if (TagType == DeclSpec::TST_interface) {
@@ -2416,7 +2416,7 @@
// Forbid C++11 attributes that appear here.
ParsedAttributesWithRange Attrs(AttrFactory);
- MaybeParseCXX0XAttributes(Attrs);
+ MaybeParseCXX11Attributes(Attrs);
ProhibitAttributes(Attrs);
}
Modified: cfe/trunk/lib/Parse/ParseExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseExprCXX.cpp?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseExprCXX.cpp (original)
+++ cfe/trunk/lib/Parse/ParseExprCXX.cpp Wed Jan 2 06:01:23 2013
@@ -838,7 +838,7 @@
DeclEndLoc = ESpecRange.getEnd();
// Parse attribute-specifier[opt].
- MaybeParseCXX0XAttributes(Attr, &DeclEndLoc);
+ MaybeParseCXX11Attributes(Attr, &DeclEndLoc);
SourceLocation FunLocalRangeEnd = DeclEndLoc;
@@ -1362,7 +1362,7 @@
}
ParsedAttributesWithRange attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
if (!isCXXConditionDeclaration()) {
ProhibitAttributes(attrs);
@@ -2405,7 +2405,7 @@
// Attributes here appertain to the array type. C++11 [expr.new]p5.
ParsedAttributes Attrs(AttrFactory);
- MaybeParseCXX0XAttributes(Attrs);
+ MaybeParseCXX11Attributes(Attrs);
D.AddTypeInfo(DeclaratorChunk::getArray(0,
/*static=*/false, /*star=*/false,
Modified: cfe/trunk/lib/Parse/ParseObjc.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseObjc.cpp?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseObjc.cpp (original)
+++ cfe/trunk/lib/Parse/ParseObjc.cpp Wed Jan 2 06:01:23 2013
@@ -1536,7 +1536,7 @@
ObjCImplParsingDataRAII ObjCImplParsing(*this, ObjCImpDecl);
while (!ObjCImplParsing.isFinished() && Tok.isNot(tok::eof)) {
ParsedAttributesWithRange attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
MaybeParseMicrosoftAttributes(attrs);
if (DeclGroupPtrTy DGP = ParseExternalDeclaration(attrs)) {
DeclGroupRef DG = DGP.get();
Modified: cfe/trunk/lib/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Wed Jan 2 06:01:23 2013
@@ -84,7 +84,7 @@
ParenBraceBracketBalancer BalancerRAIIObj(*this);
ParsedAttributesWithRange Attrs(AttrFactory);
- MaybeParseCXX0XAttributes(Attrs, 0, /*MightBeObjCMessageSend*/ true);
+ MaybeParseCXX11Attributes(Attrs, 0, /*MightBeObjCMessageSend*/ true);
StmtResult Res = ParseStatementOrDeclarationAfterAttributes(Stmts,
OnlyStatement, TrailingElseLoc, Attrs);
@@ -830,7 +830,7 @@
ConsumeToken();
ParsedAttributesWithRange attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs, 0, /*MightBeObjCMessageSend*/ true);
+ MaybeParseCXX11Attributes(attrs, 0, /*MightBeObjCMessageSend*/ true);
// If this is the start of a declaration, parse it as such.
if (isDeclarationStatement()) {
@@ -1285,7 +1285,7 @@
// FIXME: Do not just parse the attribute contents and throw them away
ParsedAttributesWithRange attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
ProhibitAttributes(attrs);
ExprResult Cond = ParseExpression();
@@ -1378,7 +1378,7 @@
}
ParsedAttributesWithRange attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
// Parse the first part of the for specifier.
if (Tok.is(tok::semi)) { // for (;
@@ -1391,7 +1391,7 @@
Diag(Tok, diag::ext_c99_variable_decl_in_for_loop);
ParsedAttributesWithRange attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
// In C++0x, "for (T NS:a" might not be a typo for ::
bool MightBeForRangeStmt = getLangOpts().CPlusPlus;
@@ -2151,7 +2151,7 @@
else {
StmtVector Handlers;
ParsedAttributesWithRange attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
ProhibitAttributes(attrs);
if (Tok.isNot(tok::kw_catch))
Modified: cfe/trunk/lib/Parse/ParseTemplate.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseTemplate.cpp?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseTemplate.cpp (original)
+++ cfe/trunk/lib/Parse/ParseTemplate.cpp Wed Jan 2 06:01:23 2013
@@ -198,7 +198,7 @@
}
ParsedAttributesWithRange prefixAttrs(AttrFactory);
- MaybeParseCXX0XAttributes(prefixAttrs);
+ MaybeParseCXX11Attributes(prefixAttrs);
if (Tok.is(tok::kw_using))
return ParseUsingDirectiveOrDeclaration(Context, TemplateInfo, DeclEnd,
Modified: cfe/trunk/lib/Parse/ParseTentative.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseTentative.cpp?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseTentative.cpp (original)
+++ cfe/trunk/lib/Parse/ParseTentative.cpp Wed Jan 2 06:01:23 2013
@@ -1396,7 +1396,7 @@
if (Next.is(tok::amp) || Next.is(tok::ampamp) ||
Next.is(tok::kw_const) || Next.is(tok::kw_volatile) ||
Next.is(tok::kw_throw) || Next.is(tok::kw_noexcept) ||
- Next.is(tok::l_square) || isCXX0XVirtSpecifier(Next) ||
+ Next.is(tok::l_square) || isCXX11VirtSpecifier(Next) ||
Next.is(tok::l_brace) || Next.is(tok::kw_try) ||
Next.is(tok::equal) || Next.is(tok::arrow))
// The next token cannot appear after a constructor-style initializer,
Modified: cfe/trunk/lib/Parse/Parser.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/Parser.cpp?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/Parser.cpp (original)
+++ cfe/trunk/lib/Parse/Parser.cpp Wed Jan 2 06:01:23 2013
@@ -554,7 +554,7 @@
}
ParsedAttributesWithRange attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
MaybeParseMicrosoftAttributes(attrs);
Result = ParseExternalDeclaration(attrs);
@@ -1831,7 +1831,7 @@
// Parse the declarations.
while (Tok.isNot(tok::r_brace) && Tok.isNot(tok::eof)) {
ParsedAttributesWithRange attrs(AttrFactory);
- MaybeParseCXX0XAttributes(attrs);
+ MaybeParseCXX11Attributes(attrs);
MaybeParseMicrosoftAttributes(attrs);
DeclGroupPtrTy Result = ParseExternalDeclaration(attrs);
if (Result && !getCurScope()->getParent())
Modified: cfe/trunk/lib/Sema/SemaDeclAttr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclAttr.cpp?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclAttr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclAttr.cpp Wed Jan 2 06:01:23 2013
@@ -1729,7 +1729,7 @@
if (VD == 0 || (!VD->getType()->isBlockPointerType()
&& !VD->getType()->isFunctionPointerType())) {
S.Diag(Attr.getLoc(),
- Attr.isCXX0XAttribute() ? diag::err_attribute_wrong_decl_type
+ Attr.isCXX11Attribute() ? diag::err_attribute_wrong_decl_type
: diag::warn_attribute_wrong_decl_type)
<< Attr.getName() << ExpectedFunctionMethodOrBlock;
return;
Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Wed Jan 2 06:01:23 2013
@@ -4728,7 +4728,7 @@
return false;
}
- int DiagType = (NullKind == Expr::NPCK_CXX0X_nullptr);
+ int DiagType = (NullKind == Expr::NPCK_CXX11_nullptr);
Diag(QuestionLoc, diag::err_typecheck_cond_incompatible_operands_null)
<< NonPointerExpr->getType() << DiagType
<< NonPointerExpr->getSourceRange();
Modified: cfe/trunk/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/init.c?rev=171372&r1=171371&r2=171372&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/init.c (original)
+++ cfe/trunk/test/Preprocessor/init.c Wed Jan 2 06:01:23 2013
@@ -9,14 +9,14 @@
// BLOCKS:#define __block __attribute__((__blocks__(byref)))
//
//
-// RUN: %clang_cc1 -x c++ -std=c++11 -E -dM < /dev/null | FileCheck -check-prefix CXX0X %s
+// RUN: %clang_cc1 -x c++ -std=c++11 -E -dM < /dev/null | FileCheck -check-prefix CXX11 %s
//
-// CXX0X:#define __GNUG__
-// CXX0X:#define __GXX_EXPERIMENTAL_CXX0X__ 1
-// CXX0X:#define __GXX_RTTI 1
-// CXX0X:#define __GXX_WEAK__ 1
-// CXX0X:#define __cplusplus 201103L
-// CXX0X:#define __private_extern__ extern
+// CXX11:#define __GNUG__
+// CXX11:#define __GXX_EXPERIMENTAL_CXX0X__ 1
+// CXX11:#define __GXX_RTTI 1
+// CXX11:#define __GXX_WEAK__ 1
+// CXX11:#define __cplusplus 201103L
+// CXX11:#define __private_extern__ extern
//
//
// RUN: %clang_cc1 -x c++ -std=c++98 -E -dM < /dev/null | FileCheck -check-prefix CXX98 %s
More information about the cfe-commits
mailing list