This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf4c886b6aaea: [clang] Properly print unnamed members in
diagnostics (authored by Fznamznon).
Changed prior to commit:
https://reviews.llvm.org/D15
aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM aside from a small nit
Comment at: clang/lib/AST/Decl.cpp:4567-4569
+ DeclarationName Name = getDeclName();
+ Name.print(OS, Policy);
+}
This way we're not reimplementing the same logic
shafik accepted this revision.
shafik added a comment.
This revision is now accepted and ready to land.
LGTM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158526/new/
https://reviews.llvm.org/D158526
___
Fznamznon added inline comments.
Comment at: clang/include/clang/AST/Decl.h:3186
+
+ void printName(raw_ostream &OS, const PrintingPolicy &Policy) const override;
};
shafik wrote:
> So it looks like w/o this we would end up using `NamedDecl::printName(...)`
>
shafik added a comment.
Thank you for this fix, it is a lot cleaner than I was expecting.
Comment at: clang/include/clang/AST/Decl.h:3186
+
+ void printName(raw_ostream &OS, const PrintingPolicy &Policy) const override;
};
So it looks like w/o this we would e
Fznamznon created this revision.
Herald added a project: All.
Fznamznon requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Use member's type when printing.
This also fixes a bug in warning diagnostic for out of order
initialization with design