[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash

2020-06-16 Thread Nathan James via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG740575dc232b: [clangd] Fix readability-else-after-return Adding a note without main… (authored by njames93). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash

2020-06-16 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp:191 // scope, we can pull the decl out of the if statement. -

[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash

2020-06-15 Thread Nathan James via Phabricator via cfe-commits
njames93 updated this revision to Diff 270759. njames93 marked an inline comment as done. njames93 added a comment. - Remove clangd test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81785/new/ https://reviews.llvm.org/D81785 Files:

[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash

2020-06-15 Thread Nathan James via Phabricator via cfe-commits
njames93 added inline comments. Comment at: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp:191 // scope, we can pull the decl out of the if statement. - DiagnosticBuilder Diag = - diag(ElseLoc, WarningMessage,

[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash

2020-06-15 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Thanks for spotting it! In D81785#2091352 , @njames93 wrote: > The actual fix in `ElseAfterReturnCheck.cpp` is needed. yeah, the fix in clang-tidy check seems reasonable to me, this aligns the general practice. In general, we

[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash

2020-06-13 Thread Nathan James via Phabricator via cfe-commits
njames93 created this revision. njames93 added reviewers: sammccall, hokein. Herald added subscribers: cfe-commits, usaxena95, kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. njames93 added a comment. The actual fix in `ElseAfterReturnCheck.cpp` is needed.

[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash

2020-06-13 Thread Nathan James via Phabricator via cfe-commits
njames93 added a comment. The actual fix in `ElseAfterReturnCheck.cpp` is needed. However clangd's handling of Remarks is a little suspicious. Remarks are supposed to be different to notes in the sense they are designed to be stand alone, unlike notes which depend on a another diagnostic. see