HomePhabricator

Migrate Declarators to use the List API

Authored by eduucaldas on Sep 28 2020, 2:33 AM.

Description

Migrate Declarators to use the List API

After this change all nodes that have a delimited-list are using the
List API.

Implementation details:
Let's look at a declaration with multiple declarators:
int a, b;
To generate a declarator list node we need to have the range of
declarators: a, b:
However, the ClangAST actually stores them as separate declarations:
int a ;
int b;
We solve that by appropriately marking the declarators on each separate
declaration in the ClangAST and then for the final declarator `int
b`, shrinking its range to fit to the already marked declarators.

Differential Revision: https://reviews.llvm.org/D88403

Details

Committed
eduucaldasOct 1 2020, 6:56 AM
Differential Revision
D88403: Migrate Declarators to use the List API
Parents
rG79fbcbff4173: [clangd] clangd --check: standalone diagnosis of common problems
Branches
Unknown
Tags
Unknown