[Syntax] Build spanning SimpleDecalration for classes, structs, etc
authorIlya Biryukov <ibiryukov@google.com>
Fri, 3 Jan 2020 11:05:14 +0000 (12:05 +0100)
committerIlya Biryukov <ibiryukov@google.com>
Fri, 3 Jan 2020 11:33:11 +0000 (12:33 +0100)
commit04f627f6b9aeda924a83e75d281ab27a546d3515
treeb8c4a4fb311d80a9899b64ed0b8009dadaf8c557
parent7b4badf6f9ad93209d2c9dde60da25076d5c91c8
[Syntax] Build spanning SimpleDecalration for classes, structs, etc

When they are free-standing, e.g. `struct X;` or `struct X {};`.
Although this complicates the common case (of free-standing class
declarations), this ensures the less common case (e.g. `struct X {} a;`)
are handled uniformly and produce similar syntax trees.
clang/lib/Tooling/Syntax/BuildTree.cpp
clang/unittests/Tooling/Syntax/TreeTest.cpp