Skip to content

Commit 09658c1

Browse files
committed
mitigated bugprone-exception-escape clang-tidy warnings
1 parent 03dbed0 commit 09658c1

File tree

7 files changed

+9
-0
lines changed

7 files changed

+9
-0
lines changed

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
@@ -930,6 +930,7 @@ bool ImportProject::importVcxproj(const std::string &filename, const tinyxml2::X
930930

931931
ImportProject::SharedItemsProject ImportProject::importVcxitems(const std::string& filename, const std::vector<std::string>& fileFilters, std::vector<SharedItemsProject> &cache)
932932
{
933+
// NOLINTNEXTLINE(bugprone-exception-escape)
933934
auto isInCacheCheck = [filename](const ImportProject::SharedItemsProject& e) -> bool {
934935
return filename == e.pathToProjectFile;
935936
};

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
@@ -1841,6 +1841,7 @@ namespace {
18411841
struct OnException {
18421842
std::function<void()> f;
18431843

1844+
// NOLINTNEXTLINE(bugprone-exception-escape)
18441845
~OnException() {
18451846
#ifndef _MSC_VER
18461847
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
@@ -414,6 +414,7 @@ static void write_ossfuzz_makefile(std::vector<std::string> libfiles_prio, std::
414414
fout << "\t$(CXX) ${LIB_FUZZING_ENGINE} $(CPPFLAGS) $(CXXFLAGS) -DNO_FUZZ -c -o $@ main.cpp\n";
415415
}
416416

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

0 commit comments

Comments
 (0)