Skip to content

Commit

Permalink
clang-tidy workflow fixes (#3413)
Browse files Browse the repository at this point in the history
  • Loading branch information
externl authored Jan 24, 2025
1 parent 48bcc2e commit 0f14661
Show file tree
Hide file tree
Showing 23 changed files with 37 additions and 12 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ jobs:
clang-tidy:
runs-on: ubuntu-24.04
steps:
- name: Checkout Ice
uses: actions/checkout@v4

- name: Setup Ice Build Dependencies
uses: ./.github/actions/setup-dependencies

- name: Install clang-tidy
run: |
# This LLVM script will add the relevant LLVM PPA: https://apt.llvm.org/
Expand All @@ -49,12 +55,6 @@ jobs:
sudo apt-get install -y bear
bear --version
- name: Checkout Ice
uses: actions/checkout@v4

- name: Setup Ice Build Dependencies
uses: ./.github/actions/setup-dependencies

- name: Build Ice
timeout-minutes: 90
working-directory: cpp
Expand All @@ -63,4 +63,4 @@ jobs:
- name: Run Clang Tidy
working-directory: cpp
run: |
run-clang-tidy-19 -j$(nproc) -quiet src/Ice/ || true
run-clang-tidy-19 -j$(nproc) -quiet src/
2 changes: 2 additions & 0 deletions cpp/src/DataStorm/DataElementI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include "TopicI.h"
#include "TraceUtil.h"

#include <algorithm>

using namespace std;
using namespace DataStormI;
using namespace DataStormContract;
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/DataStorm/SessionI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ SessionI::disconnect()
auto self = shared_from_this();
for (const auto& [topicId, _] : _topics)
{
runWithTopics(topicId, [topicId, self](TopicI* topic, TopicSubscriber&) { topic->detach(topicId, self); });
runWithTopics(topicId, [id = topicId, self](TopicI* topic, TopicSubscriber&) { topic->detach(id, self); });
}

_session = nullopt;
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/DataStorm/TopicFactoryI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include "TopicI.h"
#include "TraceUtil.h"

#include <algorithm>

using namespace std;
using namespace DataStormI;
using namespace DataStormContract;
Expand Down
1 change: 1 addition & 0 deletions cpp/src/Glacier2/FilterT.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "Glacier2/Session.h"
#include "Ice/Identity.h"

#include <algorithm>
#include <list>
#include <mutex>
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/Glacier2/RouterI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ string
Glacier2::RouterI::getCategoryForClient(const Current&) const
{
assert(false); // Must not be called in this router implementation.
return nullptr;
return {};
}

void
Expand Down
6 changes: 3 additions & 3 deletions cpp/src/Glacier2/SessionRouterI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ CreateSession::CreateSession(shared_ptr<SessionRouterI> sessionRouter, string us
}
}
{
auto info = dynamic_pointer_cast<SSL::ConnectionInfo>(current.con->getInfo());
auto info = dynamic_pointer_cast<Ice::SSL::ConnectionInfo>(current.con->getInfo());
if (info && info->peerCertificate)
{
_context["_con.peerCert"] = Ice::SSL::encodeCertificate(info->peerCertificate);
Expand Down Expand Up @@ -637,7 +637,7 @@ SessionRouterI::createSessionFromSecureConnectionAsync(
//
try
{
auto info = dynamic_pointer_cast<SSL::ConnectionInfo>(current.con->getInfo());
auto info = dynamic_pointer_cast<Ice::SSL::ConnectionInfo>(current.con->getInfo());
if (!info)
{
exception(make_exception_ptr(PermissionDeniedException("not ssl connection")));
Expand All @@ -656,7 +656,7 @@ SessionRouterI::createSessionFromSecureConnectionAsync(
userDN = Ice::SSL::getSubjectName(info->peerCertificate);
}
}
catch (const SSL::CertificateEncodingException&)
catch (const Ice::SSL::CertificateEncodingException&)
{
exception(make_exception_ptr(PermissionDeniedException("certificate encoding exception")));
return;
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/Ice/CollocatedRequestHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#include "TraceLevels.h"
#include "TraceUtil.h"

#include <algorithm>

using namespace std;
using namespace Ice;
using namespace IceInternal;
Expand Down
1 change: 1 addition & 0 deletions cpp/src/Ice/ConnectionFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "TraceLevels.h"
#include "Transceiver.h"

#include <algorithm>
#include <chrono>
#include <iterator>

Expand Down
1 change: 1 addition & 0 deletions cpp/src/Ice/ConnectionI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "DisableWarnings.h"

#include <algorithm>
#include <iomanip>
#include <stdexcept>

Expand Down
1 change: 1 addition & 0 deletions cpp/src/Ice/Initialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "LoggerI.h"
#include "PluginManagerI.h"

#include <algorithm>
#include <mutex>
#include <stdexcept>

Expand Down
1 change: 1 addition & 0 deletions cpp/src/Ice/LocatorInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#include "DisableWarnings.h"

#include <algorithm>
#include <iterator>

using namespace std;
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/Ice/ObjectAdapterFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
#include "Ice/UUID.h"
#include "ObjectAdapterI.h"

#include <algorithm>

using namespace std;
using namespace Ice;
using namespace IceInternal;
Expand Down
1 change: 1 addition & 0 deletions cpp/src/Ice/ObjectAdapterI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
# include <sys/time.h>
#endif

#include <algorithm>
#include <iterator>
#include <stdexcept>

Expand Down
1 change: 1 addition & 0 deletions cpp/src/Ice/Properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "PropertyNames.h"
#include "PropertyUtil.h"

#include <algorithm>
#include <cassert>
#include <fstream>

Expand Down
2 changes: 2 additions & 0 deletions cpp/src/Ice/SSL/SSLEndpointI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "SSLConnectorI.h"
#include "SSLInstance.h"

#include <algorithm>

using namespace std;
using namespace Ice;
using namespace Ice::SSL;
Expand Down
1 change: 1 addition & 0 deletions cpp/src/Ice/Value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "Ice/OutputStream.h"
#include "Ice/SlicedData.h"

#include <algorithm>
#include <deque>

using namespace std;
Expand Down
2 changes: 2 additions & 0 deletions cpp/src/Ice/WSEndpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "WSAcceptor.h"
#include "WSConnector.h"

#include <algorithm>

using namespace std;
using namespace Ice;
using namespace IceInternal;
Expand Down
1 change: 1 addition & 0 deletions cpp/src/IceBT/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "Ice/UUID.h"
#include "Util.h"

#include <algorithm>
#include <thread>

using namespace std;
Expand Down
1 change: 1 addition & 0 deletions cpp/src/IceLocatorDiscovery/PluginI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "IceLocatorDiscovery.h"
#include "Plugin.h"

#include <algorithm>
#include <thread>

using namespace std;
Expand Down
1 change: 1 addition & 0 deletions cpp/src/slice2php/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include "Ice/StringUtil.h"
#include "PHPUtil.h"

#include <algorithm>
#include <cassert>
#include <climits>
#include <cstring>
Expand Down
1 change: 1 addition & 0 deletions cpp/src/slice2py/Python.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "../Slice/Util.h"
#include "PythonUtil.h"

#include <algorithm>
#include <cassert>
#include <cstring>
#include <fstream>
Expand Down
1 change: 1 addition & 0 deletions cpp/src/slice2swift/SwiftUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "../Ice/OutputUtil.h"
#include "../Slice/Util.h"

#include <algorithm>
#include <cassert>

using namespace std;
Expand Down

0 comments on commit 0f14661

Please sign in to comment.