Fix override keyword being print to the left side
commite3c832b37b0a7b97eb16eaff2dda747093a858e2
authorGiuliano Belinassi <gbelinassi@suse.de>
Thu, 11 Apr 2024 23:09:49 +0000 (11 20:09 -0300)
committerTom Stellard <tstellar@redhat.com>
Tue, 16 Apr 2024 23:09:49 +0000 (16 16:09 -0700)
treec59ba73fe6c0b9b2164f21ddb87f7c8c02831f19
parent1deeee3f5da4f323e0e5b33688450dc066e9651b
Fix override keyword being print to the left side

Previously, the `override` keyword in C++ was being print in the left
side of a method decl, which is unsupported by C++ standard. This commit
fixes that by setting the `CanPrintOnLeft` field to 0, forcing it to be
print on the right side of the decl.

Signed-off-by: Giuliano Belinassi <gbelinassi@suse.de>
clang/include/clang/Basic/Attr.td
clang/test/AST/ast-dump-override-final.cpp [new file with mode: 0644]