[PATCH] D128202: [clangd] Include "final" when printing class declaration

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 20 07:11:19 PDT 2022


sammccall added inline comments.


================
Comment at: clang/lib/AST/DeclPrinter.cpp:1010
 
+  if (D->isEffectivelyFinal()) {
+      Out << " final";
----------------
isEffectivelyFinal returns true for
`struct X { ~X() final; }`

I don't think we want to print `struct X final {}` in that case.

Probably want to replicate the check for FinalAttr instead?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128202/new/

https://reviews.llvm.org/D128202



More information about the cfe-commits mailing list