[PATCH] D81785: [clangd] Fix readability-else-after-return 'Adding a note without main diagnostic' crash
Nathan James via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 15 08:41:05 PDT 2020
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:
clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp
Index: clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp
===================================================================
--- clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp
+++ clang-tools-extra/clang-tidy/readability/ElseAfterReturnCheck.cpp
@@ -188,9 +188,8 @@
if (IsLastInScope) {
// If the if statement is the last statement its enclosing statements
// scope, we can pull the decl out of the if statement.
- DiagnosticBuilder Diag =
- diag(ElseLoc, WarningMessage, clang::DiagnosticIDs::Level::Remark)
- << ControlFlowInterruptor;
+ DiagnosticBuilder Diag = diag(ElseLoc, WarningMessage)
+ << ControlFlowInterruptor;
if (checkInitDeclUsageInElse(If) != nullptr) {
Diag << tooling::fixit::createReplacement(
SourceRange(If->getIfLoc()),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81785.270759.patch
Type: text/x-patch
Size: 892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200615/65922427/attachment.bin>
More information about the cfe-commits
mailing list