[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-09-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D84362#2275029 , @yaxunl wrote: > Perhaps we could inherit `PartialDiagnostic` from `DiagnosticBuilder` base class. This would probably be the least invasive approach as it would preserve existing uses while allowing reuse of

[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-09-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D84362#2274884 , @tra wrote: > In D84362#2274790 , @yaxunl wrote: > >> There are use patterns expecting `PartialDiagnosticInst << X << Y` to >> continue to be a `PartialDiagnostic&`,

[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-09-15 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. In D84362#2274790 , @yaxunl wrote: > There are use patterns expecting `PartialDiagnosticInst << X << Y` to > continue to be a `PartialDiagnostic&`, e.g. > > PartialDiagnosticAt PDAt(SourceLoc, PartialDiagnosticInst << X << Y); > >

[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-09-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In D84362#2274315 , @aaron.ballman wrote: > In D84362#2271585 , @tra wrote: > >> So, the idea here is to do some sort of duck-typing and allow DiagBuilder to >> work with both

[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-09-15 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a reviewer: rsmith. aaron.ballman added a subscriber: rsmith. aaron.ballman added a comment. In D84362#2271585 , @tra wrote: > So, the idea here is to do some sort of duck-typing and allow DiagBuilder to > work with both

[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-09-14 Thread Artem Belevich via Phabricator via cfe-commits
tra added subscribers: aaron.ballman, rtrieu. tra added a comment. So, the idea here is to do some sort of duck-typing and allow DiagBuilder to work with both `DiagnosticBuilder` and `PartialDiagnostic`. What bothers me is that unlike `Diagnostic` `PartialDiagnostic` seems to be commingling

[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. ping. this is needed by https://reviews.llvm.org/D84364 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84362/new/ https://reviews.llvm.org/D84362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-07-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 279951. yaxunl added a comment. fix build failure CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84362/new/ https://reviews.llvm.org/D84362 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST/Attr.h

[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-07-22 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. FYI, the patch does not compile: In file included from llvm/repo/clang/lib/Parse/ParseStmtAsm.cpp:13: In file included from /llvm/repo/clang/include/clang/Parse/Parser.h:24: llvm/repo/clang/include/clang/Sema/Sema.h:1833:10: error: use of overloaded operator '<<' is

[PATCH] D84362: [NFC] Add missing functions to PartialDiagnostic

2020-07-22 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. PartialDiagnostic misses some functions compared to DiagnosticBuilder. This patch adds missing functions to PartialDiagnostic so that can emit all diagnostics that can be emitted by DiagnosticBuilder. https://reviews.llvm.org/D84362