Skip to content

Commit 4a6b3a3

Browse files
committed
mitigated bugprone-exception-escape clang-tidy warnings
1 parent 03f628d commit 4a6b3a3

7 files changed

Lines changed: 9 additions & 1 deletion

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) - reported with libc++ only
4849
int main(int argc, char *argv[])
4950
{
5051
QApplication app(argc, argv);

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) - reported with libc++ only
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) - reported with libc++ only
124126
class NestedCall : public CallBase {
125127
public:
126128
NestedCall() = default;

lib/importproject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -935,7 +935,7 @@ bool ImportProject::importVcxproj(const std::string &filename, const tinyxml2::X
935935

936936
ImportProject::SharedItemsProject ImportProject::importVcxitems(const std::string& filename, const std::vector<std::string>& fileFilters, std::vector<SharedItemsProject> &cache)
937937
{
938-
auto isInCacheCheck = [filename](const ImportProject::SharedItemsProject& e) -> bool {
938+
auto isInCacheCheck = [&filename](const ImportProject::SharedItemsProject& e) -> bool {
939939
return filename == e.pathToProjectFile;
940940
};
941941
const auto iterator = std::find_if(cache.begin(), cache.end(), isInCacheCheck);

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) - reported with libc++ only
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) - reported with libc++ only
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
@@ -1883,6 +1883,7 @@ namespace {
18831883
struct OnException {
18841884
std::function<void()> f;
18851885

1886+
// NOLINTNEXTLINE(bugprone-exception-escape) - reported with libc++ only
18861887
~OnException() {
18871888
#ifndef _MSC_VER
18881889
#if defined(__cpp_lib_uncaught_exceptions)

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
@@ -433,6 +433,7 @@ static void write_ossfuzz_makefile(std::vector<std::string> libfiles_prio, std::
433433
fout << "\t$(CXX) ${LIB_FUZZING_ENGINE} $(CPPFLAGS) $(CXXFLAGS) -DNO_FUZZ -c -o $@ main.cpp\n";
434434
}
435435

436+
// NOLINTNEXTLINE(bugprone-exception-escape) - reported with libc++ only
436437
int main(int argc, char **argv)
437438
{
438439
const bool release(argc >= 2 && std::string(argv[1]) == "--release");

0 commit comments

Comments
 (0)