summaryrefslogtreecommitdiff
path: root/.clang-tidy
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-01-06 23:45:54 +0300
committerEd Tanous <ed@tanous.net>2022-01-12 21:32:14 +0300
commit24b2fe810e784f04728379f49af54a3ab2252c9b (patch)
tree9ea535360f1e80603fcb599013f42263846e700d /.clang-tidy
parentf94c4ecf9cf61b91b552731e4e03cd84c1070972 (diff)
downloadbmcweb-24b2fe810e784f04728379f49af54a3ab2252c9b.tar.xz
enable bugprone exception escape check
clang-13 includes new checks, and finds some issues. The first is that the boost::vector constructor can possibly throw, so replace the underlying flat_map container with std::vector instead. The others are places where we could possibly throw in destructors, which would be bad. Ideally we wouldn't use the destructor pattern, but that would be non-trivial to clean up at this point, so just catch the exception, and log it. At the same time, catch exceptions thrown to main and log them. Tested: Code compiles Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I77b86eaa2fc79e43d1ca044c78ca3b0ce0a7c38c
Diffstat (limited to '.clang-tidy')
-rw-r--r--.clang-tidy1
1 files changed, 1 insertions, 0 deletions
diff --git a/.clang-tidy b/.clang-tidy
index db950cbf1c..3e9d87b2fb 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -8,6 +8,7 @@ bugprone-branch-clone,
bugprone-copy-constructor-init,
bugprone-dangling-handle,
bugprone-dynamic-static-initializers,
+bugprone-exception-escape,
bugprone-fold-init-type,
bugprone-forward-declaration-namespace,
bugprone-forwarding-reference-overload,