diff options
Diffstat (limited to 'clang/lib/Parse')
-rw-r--r-- | clang/lib/Parse/ParseCXXInlineMethods.cpp | 3 | ||||
-rw-r--r-- | clang/lib/Parse/ParseDecl.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Parse/ParseDeclCXX.cpp | 6 | ||||
-rw-r--r-- | clang/lib/Parse/Parser.cpp | 2 |
4 files changed, 9 insertions, 8 deletions
diff --git a/clang/lib/Parse/ParseCXXInlineMethods.cpp b/clang/lib/Parse/ParseCXXInlineMethods.cpp index a9712fe9ed4..90d2f6fefce 100644 --- a/clang/lib/Parse/ParseCXXInlineMethods.cpp +++ b/clang/lib/Parse/ParseCXXInlineMethods.cpp @@ -75,7 +75,8 @@ void Parser::ParseLexedMethodDeclarations() { // Introduce the parameters into scope and parse their default // arguments. - ParseScope PrototypeScope(this, Scope::FnScope|Scope::DeclScope); + ParseScope PrototypeScope(this, + Scope::FunctionPrototypeScope|Scope::DeclScope); for (unsigned I = 0, N = LM.DefaultArgs.size(); I != N; ++I) { // Introduce the parameter into scope. Actions.ActOnDelayedCXXMethodParameter(CurScope, LM.DefaultArgs[I].Param); diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index 219295fa74d..ac1a4be8456 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -526,7 +526,7 @@ void Parser::ParseDeclarationSpecifiers(DeclSpec &DS, // constructor declaration. We're done with the decl-specifiers // and will treat this token as an identifier. if (getLang().CPlusPlus && - CurScope->isCXXClassScope() && + CurScope->isClassScope() && Actions.isCurrentClassName(*Tok.getIdentifierInfo(), CurScope) && NextToken().getKind() == tok::l_paren) goto DoneWithDeclSpec; @@ -948,7 +948,7 @@ void Parser::ParseStructUnionBody(SourceLocation RecordLoc, unsigned TagType, DeclTy *TagDecl) { SourceLocation LBraceLoc = ConsumeBrace(); - ParseScope StructScope(this, Scope::DeclScope); + ParseScope StructScope(this, Scope::ClassScope|Scope::DeclScope); Actions.ActOnTagStartDefinition(CurScope, TagDecl); // Empty structs are an extension in C (C99 6.7.2.1p7), but are allowed in @@ -1875,7 +1875,7 @@ void Parser::ParseFunctionDeclarator(SourceLocation LParenLoc, Declarator &D, // Enter function-declaration scope, limiting any declarators to the // function prototype scope, including parameter declarators. - ParseScope PrototypeScope(this, Scope::FnScope|Scope::DeclScope); + ParseScope PrototypeScope(this, Scope::FunctionPrototypeScope|Scope::DeclScope); bool IsVariadic = false; while (1) { diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index c6c2ae4cfe1..26787aec123 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -720,7 +720,7 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation LBraceLoc = ConsumeBrace(); - if (!CurScope->isCXXClassScope() && // Not about to define a nested class. + if (!CurScope->isClassScope() && // Not about to define a nested class. CurScope->isInCXXInlineMethodScope()) { // We will define a local class of an inline method. // Push a new LexedMethodsForTopClass for its inline methods. @@ -728,7 +728,7 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, } // Enter a scope for the class. - ParseScope ClassScope(this, Scope::CXXClassScope|Scope::DeclScope); + ParseScope ClassScope(this, Scope::ClassScope|Scope::DeclScope); Actions.ActOnTagStartDefinition(CurScope, TagDecl); @@ -782,7 +782,7 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, // // FIXME: Only function bodies and constructor ctor-initializers are // parsed correctly, fix the rest. - if (!CurScope->getParent()->isCXXClassScope()) { + if (!CurScope->getParent()->isClassScope()) { // We are not inside a nested class. This class and its nested classes // are complete and we can parse the delayed portions of method // declarations and the lexed inline method definitions. diff --git a/clang/lib/Parse/Parser.cpp b/clang/lib/Parse/Parser.cpp index d9b39099e05..799a2072f19 100644 --- a/clang/lib/Parse/Parser.cpp +++ b/clang/lib/Parse/Parser.cpp @@ -570,7 +570,7 @@ void Parser::ParseKNRParamDeclarations(Declarator &D) { // Enter function-declaration scope, limiting any declarators to the // function prototype scope, including parameter declarators. - ParseScope PrototypeScope(this, Scope::FnScope|Scope::DeclScope); + ParseScope PrototypeScope(this, Scope::FunctionPrototypeScope|Scope::DeclScope); // Read all the argument declarations. while (isDeclarationSpecifier()) { |