[PATCH] D130363: [clang] Give priority to Class context while parsing declarations
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 29 04:58:37 PDT 2022
kadircet added a comment.
Can you also add a test, preferably in clang/test/CodeCompletion/overrides.cpp ?
================
Comment at: clang/lib/Parse/ParseDecl.cpp:3269
- if (getCurScope()->getFnParent() || getCurScope()->getBlockParent())
- CCC = Sema::PCC_LocalDeclarationSpecifiers;
- else if (TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate)
+ if (TemplateInfo.Kind != ParsedTemplateInfo::NonTemplate)
CCC = DSContext == DeclSpecContext::DSC_class ? Sema::PCC_MemberTemplate
----------------
i think the importance of ordering requires a comment here, maybe something like:
`Class context can appear inside a function/block, so prioritise that. `
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130363/new/
https://reviews.llvm.org/D130363
More information about the cfe-commits
mailing list