[clang] Fix range for forward-declared enums
authorKadir Cetinkaya <kadircet@google.com>
Wed, 6 Oct 2021 18:25:26 +0000 (20:25 +0200)
committerKadir Cetinkaya <kadircet@google.com>
Mon, 25 Oct 2021 11:16:14 +0000 (13:16 +0200)
commitffa96f022c3ff03888afca8fdda766fe556eb9c5
tree066e7c046a934ed40766ae79bb373071e3e42ea0
parent025f6ca7c469b6412b58b69fab17092548d5f6c1
[clang] Fix range for forward-declared enums

This used to span just the `[[enum foo]] : bar;` in the absence of a
body. This patch expands the range to cover the base specifier, so that the
various consumers can detect the full range of the decl.

Differential Revision: https://reviews.llvm.org/D111259
clang/include/clang/AST/Decl.h
clang/lib/AST/Decl.cpp
clang/unittests/AST/DeclTest.cpp