Skip to content

Commit 9e33387

Browse files
authored
[clang analyzer]consume llvm::Error (#120597)
`llvm::Error` must be consumed, otherwise it will cause trap during destructor
1 parent fa9cef5 commit 9e33387

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/StaticAnalyzer/Core/TextDiagnostics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class TextDiagnostics : public PathDiagnosticConsumer {
8181

8282
if (llvm::Error Err = Repls.add(Repl)) {
8383
llvm::errs() << "Error applying replacement " << Repl.toString()
84-
<< ": " << Err << "\n";
84+
<< ": " << llvm::toString(std::move(Err)) << "\n";
8585
}
8686
}
8787
};

0 commit comments

Comments
 (0)