Skip to content

Commit 4d38c03

Browse files
committed
mitigated bugprone-exception-escape clang-tidy warnings
1 parent ff55f28 commit 4d38c03

7 files changed

Lines changed: 9 additions & 0 deletions

File tree

gui/main.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ static void ShowUsage();
4545
static void ShowVersion();
4646
static bool CheckArgs(const QStringList &args);
4747

48+
// NOLINTNEXTLINE(bugprone-exception-escape)
4849
int main(int argc, char *argv[])
4950
{
5051

lib/ctu.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ namespace CTU {
109109
bool loadBaseFromXml(const tinyxml2::XMLElement *xmlElement);
110110
};
111111

112+
// NOLINTNEXTLINE(bugprone-exception-escape)
112113
class FunctionCall : public CallBase {
113114
public:
114115
std::string callArgumentExpression;
@@ -121,6 +122,7 @@ namespace CTU {
121122
bool loadFromXml(const tinyxml2::XMLElement *xmlElement);
122123
};
123124

125+
// NOLINTNEXTLINE(bugprone-exception-escape)
124126
class NestedCall : public CallBase {
125127
public:
126128
NestedCall() = default;

lib/importproject.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,7 @@ bool ImportProject::importVcxproj(const std::string &filename, std::map<std::str
876876

877877
ImportProject::SharedItemsProject ImportProject::importVcxitems(const std::string& filename, const std::vector<std::string>& fileFilters, std::vector<SharedItemsProject> &cache)
878878
{
879+
// NOLINTNEXTLINE(bugprone-exception-escape)
879880
auto isInCacheCheck = [filename](const ImportProject::SharedItemsProject& e) -> bool {
880881
return filename == e.pathToProjectFile;
881882
};

lib/templatesimplifier.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ namespace {
7474
const Token * const mToken;
7575
};
7676

77+
// NOLINTNEXTLINE(bugprone-exception-escape)
7778
class FindName {
7879
public:
7980
explicit FindName(std::string name) : mName(std::move(name)) {}
@@ -84,6 +85,7 @@ namespace {
8485
const std::string mName;
8586
};
8687

88+
// NOLINTNEXTLINE(bugprone-exception-escape)
8789
class FindFullName {
8890
public:
8991
explicit FindFullName(std::string fullName) : mFullName(std::move(fullName)) {}

lib/tokenlist.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,6 +1872,7 @@ namespace {
18721872
struct OnException {
18731873
std::function<void()> f;
18741874

1875+
// NOLINTNEXTLINE(bugprone-exception-escape)
18751876
~OnException() {
18761877
#ifndef _MSC_VER
18771878
if (std::uncaught_exception())

lib/utils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ struct SelectMapValues {
5454
struct OnExit {
5555
std::function<void()> f;
5656

57+
// NOLINTNEXTLINE(bugprone-exception-escape) - reported with libc++ for any files which includes this (even if not used)
5758
~OnExit() {
5859
f();
5960
}

tools/dmake/dmake.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ static void write_ossfuzz_makefile(std::vector<std::string> libfiles_prio, std::
412412
fout << "\t$(CXX) ${LIB_FUZZING_ENGINE} $(CPPFLAGS) $(CXXFLAGS) -DNO_FUZZ -c -o $@ main.cpp\n";
413413
}
414414

415+
// NOLINTNEXTLINE(bugprone-exception-escape)
415416
int main(int argc, char **argv)
416417
{
417418
const bool release(argc >= 2 && std::string(argv[1]) == "--release");

0 commit comments

Comments
 (0)