[clang] [analyzer][NFC] Cleanup BugType lazy-init patterns (PR #76655)
Gábor Horváth via cfe-commits
cfe-commits at lists.llvm.org
Sun Dec 31 22:14:52 PST 2023
================
@@ -17,19 +17,18 @@
#include "MPITypes.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugType.h"
+#include "llvm/ADT/StringRef.h"
namespace clang {
namespace ento {
namespace mpi {
class MPIBugReporter {
public:
- MPIBugReporter(const CheckerBase &CB) {
- UnmatchedWaitBugType.reset(new BugType(&CB, "Unmatched wait", MPIError));
- DoubleNonblockingBugType.reset(
- new BugType(&CB, "Double nonblocking", MPIError));
- MissingWaitBugType.reset(new BugType(&CB, "Missing wait", MPIError));
- }
+ MPIBugReporter(const CheckerBase &CB)
+ : UnmatchedWaitBugType(&CB, "Unmatched wait", MPIError),
----------------
Xazax-hun wrote:
Move to field initializers?
https://github.com/llvm/llvm-project/pull/76655
More information about the cfe-commits
mailing list