Skip to content

Commit a643967

Browse files
committed
Plumb through EnterScope
1 parent 671dd73 commit a643967

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

clang/include/clang/Parse/Parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,7 @@ class Parser : public CodeCompletionHandler {
16501650
ParsedAttributes *OutAttrs = nullptr);
16511651
void ParseLexedAttribute(LateParsedAttribute &LA,
16521652
bool EnterScope, bool OnDefinition);
1653-
void ParseLexedCAttribute(LateParsedAttribute &LA,
1653+
void ParseLexedCAttribute(LateParsedAttribute &LA, bool EnterScope,
16541654
ParsedAttributes *OutAttrs = nullptr);
16551655
void ParseLexedMethodDeclarations(ParsingClass &Class);
16561656
void ParseLexedMethodDeclaration(LateParsedMethodDeclaration &LM);

clang/lib/Parse/ParseDecl.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4956,7 +4956,7 @@ void Parser::ParseLexedCAttributeList(LateParsedAttrList &LAs, bool EnterScope,
49564956
assert(Lang == Language::C || Lang == Language::OpenCL);
49574957
#endif
49584958
for (auto *LA : LAs) {
4959-
ParseLexedCAttribute(*LA, OutAttrs);
4959+
ParseLexedCAttribute(*LA, EnterScope, OutAttrs);
49604960
delete LA;
49614961
}
49624962
LAs.clear();
@@ -4967,7 +4967,7 @@ void Parser::ParseLexedCAttributeList(LateParsedAttrList &LAs, bool EnterScope,
49674967
/// for each LateParsedAttribute. We consume the saved tokens and
49684968
/// create an attribute with the arguments filled in. We add this
49694969
/// to the Attribute list for the decl.
4970-
void Parser::ParseLexedCAttribute(LateParsedAttribute &LA,
4970+
void Parser::ParseLexedCAttribute(LateParsedAttribute &LA, bool EnterScope,
49714971
ParsedAttributes *OutAttrs) {
49724972
// Create a fake EOF so that attribute parsing won't go off the end of the
49734973
// attribute.
@@ -4987,6 +4987,9 @@ void Parser::ParseLexedCAttribute(LateParsedAttribute &LA,
49874987
// as when we entered this function.
49884988
ConsumeAnyToken(/*ConsumeCodeCompletionTok=*/true);
49894989

4990+
// TODO: Use `EnterScope`
4991+
(void)EnterScope;
4992+
49904993
ParsedAttributes Attrs(AttrFactory);
49914994

49924995
assert(LA.Decls.size() <= 1 &&

0 commit comments

Comments
 (0)