Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FWCore][clang-tidy] make deleted function public #34667

Merged
merged 4 commits into from Jul 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions FWCore/FWLite/interface/AutoLibraryLoader.h
Expand Up @@ -21,11 +21,12 @@ class AutoLibraryLoader {
/// load all known libraries holding dictionaries
static void loadAll();

AutoLibraryLoader(const AutoLibraryLoader&) = delete; // stop default
const AutoLibraryLoader& operator=(const AutoLibraryLoader&) = delete; // stop default

private:
static bool enabled_;
AutoLibraryLoader();
AutoLibraryLoader(const AutoLibraryLoader&) = delete; // stop default
const AutoLibraryLoader& operator=(const AutoLibraryLoader&) = delete; // stop default
};

#endif
6 changes: 2 additions & 4 deletions FWCore/FWLite/src/BareRootProductGetter.h
Expand Up @@ -44,6 +44,8 @@ class BareRootProductGetter : public edm::EDProductGetter {
public:
BareRootProductGetter();
~BareRootProductGetter() override;
BareRootProductGetter(BareRootProductGetter const&) = delete; // stop default
BareRootProductGetter const& operator=(BareRootProductGetter const&) = delete; // stop default

// ---------- const member functions ---------------------
edm::WrapperBase const* getIt(edm::ProductID const&) const override;
Expand Down Expand Up @@ -103,10 +105,6 @@ class BareRootProductGetter : public edm::EDProductGetter {
edm::propagate_const<TClass*> class_;
};

BareRootProductGetter(BareRootProductGetter const&) = delete; // stop default

BareRootProductGetter const& operator=(BareRootProductGetter const&) = delete; // stop default

Buffer* createNewBuffer(edm::BranchID const&) const;
edm::ThinnedAssociation const* getThinnedAssociation(edm::BranchID const& branchID, Long_t eventEntry) const;

Expand Down
1 change: 0 additions & 1 deletion FWCore/FWLite/src/branchToClass.cc
Expand Up @@ -23,7 +23,6 @@ namespace {
public:
static TClass* doit(const TBranch* iBranch);

private:
///NOTE: do not call this, it is only here because ROOT demands it
BranchToClass() = delete;
};
Expand Down
4 changes: 2 additions & 2 deletions FWCore/Framework/interface/ESPreFunctorDecorator.h
Expand Up @@ -33,6 +33,8 @@ namespace edm {
class ESPreFunctorDecorator {
public:
ESPreFunctorDecorator(const TFunctor& iCaller) : caller_(iCaller) {}
const ESPreFunctorDecorator& operator=(const ESPreFunctorDecorator&) = delete; // stop default

//virtual ~ESPreFunctorDecorator();

// ---------- const member functions ---------------------
Expand All @@ -47,8 +49,6 @@ namespace edm {
private:
//ESPreFunctorDecorator(const ESPreFunctorDecorator&); // stop default

const ESPreFunctorDecorator& operator=(const ESPreFunctorDecorator&) = delete; // stop default

// ---------- member data --------------------------------
TFunctor caller_;
};
Expand Down
7 changes: 3 additions & 4 deletions FWCore/Framework/interface/ESProducerLooper.h
Expand Up @@ -33,6 +33,9 @@ namespace edm {
class ESProducerLooper : public ESProducer, public EventSetupRecordIntervalFinder, public EDLooper {
public:
ESProducerLooper();
ESProducerLooper(const ESProducerLooper&) = delete; // stop default
const ESProducerLooper& operator=(const ESProducerLooper&) = delete; // stop default

//virtual ~ESProducerLooper();

// ---------- const member functions ---------------------
Expand All @@ -53,10 +56,6 @@ namespace edm {
const std::string& iLabel = std::string()) override;

private:
ESProducerLooper(const ESProducerLooper&) = delete; // stop default

const ESProducerLooper& operator=(const ESProducerLooper&) = delete; // stop default

// ---------- member data --------------------------------
};
} // namespace edm
Expand Down
7 changes: 3 additions & 4 deletions FWCore/Framework/interface/ESSourceDataProxyTemplate.h
Expand Up @@ -38,6 +38,9 @@ namespace edm::eventsetup {
ESSourceDataProxyTemplate(edm::SerialTaskQueue* iQueue, std::mutex* iMutex)
: ESSourceDataProxyBase(iQueue, iMutex) {}

ESSourceDataProxyTemplate(const ESSourceDataProxyTemplate&) = delete;
const ESSourceDataProxyTemplate& operator=(const ESSourceDataProxyTemplate&) = delete;

// ---------- const member functions ---------------------

// ---------- static member functions --------------------
Expand All @@ -53,10 +56,6 @@ namespace edm::eventsetup {

private:
void const* getAfterPrefetchImpl() const final { return fetch(); }

ESSourceDataProxyTemplate(const ESSourceDataProxyTemplate&) = delete;

const ESSourceDataProxyTemplate& operator=(const ESSourceDataProxyTemplate&) = delete;
};
} // namespace edm::eventsetup

Expand Down
9 changes: 5 additions & 4 deletions FWCore/Framework/interface/ESWatcher.h
Expand Up @@ -42,6 +42,11 @@ namespace edm {
template <class TObj, class TMemFunc>
ESWatcher(TObj const& iObj, TMemFunc iFunc)
: callback_(std::bind(iFunc, iObj, std::placeholders::_1)), cacheId_(0) {}

ESWatcher(const ESWatcher&) = delete; // stop default

const ESWatcher& operator=(const ESWatcher&) = delete; // stop default

//virtual ~ESWatcher();

// ---------- const member functions ---------------------
Expand All @@ -60,10 +65,6 @@ namespace edm {
}

private:
ESWatcher(const ESWatcher&) = delete; // stop default

const ESWatcher& operator=(const ESWatcher&) = delete; // stop default

// ---------- member data --------------------------------
std::function<void(const T&)> callback_;
unsigned long long cacheId_;
Expand Down
3 changes: 1 addition & 2 deletions FWCore/Framework/interface/EventSetupImpl.h
Expand Up @@ -49,7 +49,7 @@ namespace edm {
class EventSetupImpl {
public:
~EventSetupImpl();

EventSetupImpl() = delete;
EventSetupImpl(EventSetupImpl const&) = delete;
EventSetupImpl& operator=(EventSetupImpl const&) = delete;

Expand Down Expand Up @@ -83,7 +83,6 @@ namespace edm {
void addRecordImpl(const eventsetup::EventSetupRecordImpl& iRecord);

private:
EventSetupImpl() = delete;
explicit EventSetupImpl(tbb::task_arena*);

void insertRecordImpl(const eventsetup::EventSetupRecordKey&, const eventsetup::EventSetupRecordImpl*);
Expand Down
7 changes: 3 additions & 4 deletions FWCore/Framework/interface/global/EDAnalyzer.h
Expand Up @@ -32,6 +32,9 @@ namespace edm {
class EDAnalyzer : public analyzer::AbilityToImplementor<T>::Type..., public virtual EDAnalyzerBase {
public:
EDAnalyzer() = default;
EDAnalyzer(const EDAnalyzer&) = delete;
const EDAnalyzer& operator=(const EDAnalyzer&) = delete;

// We do this only in the case of the intel compiler as this might
// end up creating a lot of code bloat due to inline symbols being generated
// in each DSO which uses this header.
Expand All @@ -52,10 +55,6 @@ namespace edm {
// ---------- member functions ---------------------------

private:
EDAnalyzer(const EDAnalyzer&) = delete;

const EDAnalyzer& operator=(const EDAnalyzer&) = delete;

// ---------- member data --------------------------------
};

Expand Down
7 changes: 3 additions & 4 deletions FWCore/Framework/interface/global/EDFilter.h
Expand Up @@ -38,6 +38,9 @@ namespace edm {
T>::Type... {
public:
EDFilter() = default;
EDFilter(const EDFilter&) = delete;
const EDFilter& operator=(const EDFilter&) = delete;

// We do this only in the case of the intel compiler as this might
// end up creating a lot of code bloat due to inline symbols being generated
// in each DSO which uses this header.
Expand Down Expand Up @@ -71,10 +74,6 @@ namespace edm {
// ---------- member functions ---------------------------

private:
EDFilter(const EDFilter&) = delete;

const EDFilter& operator=(const EDFilter&) = delete;

// ---------- member data --------------------------------
};

Expand Down
7 changes: 3 additions & 4 deletions FWCore/Framework/interface/global/OutputModule.h
Expand Up @@ -29,6 +29,9 @@ namespace edm {
public:
OutputModule(edm::ParameterSet const& iPSet)
: OutputModuleBase(iPSet), outputmodule::AbilityToImplementor<T>::Type(iPSet)... {}
OutputModule(const OutputModule&) = delete; // stop default
const OutputModule& operator=(const OutputModule&) = delete; // stop default

// Required to work around ICC bug, but possible source of bloat in gcc.
// We do this only in the case of the intel compiler as this might end up
// creating a lot of code bloat due to inline symbols being generated in
Expand All @@ -48,10 +51,6 @@ namespace edm {
// ---------- member functions ---------------------------

private:
OutputModule(const OutputModule&) = delete; // stop default

const OutputModule& operator=(const OutputModule&) = delete; // stop default

// ---------- member data --------------------------------
};
} // namespace global
Expand Down
7 changes: 3 additions & 4 deletions FWCore/Framework/interface/limited/OutputModule.h
Expand Up @@ -29,6 +29,9 @@ namespace edm {
public:
OutputModule(edm::ParameterSet const& iPSet)
: OutputModuleBase(iPSet), outputmodule::AbilityToImplementor<T>::Type(iPSet)... {}
OutputModule(const OutputModule&) = delete; // stop default
const OutputModule& operator=(const OutputModule&) = delete; // stop default

// Required to work around ICC bug, but possible source of bloat in gcc.
// We do this only in the case of the intel compiler as this might end up
// creating a lot of code bloat due to inline symbols being generated in
Expand All @@ -48,10 +51,6 @@ namespace edm {
// ---------- member functions ---------------------------

private:
OutputModule(const OutputModule&) = delete; // stop default

const OutputModule& operator=(const OutputModule&) = delete; // stop default

// ---------- member data --------------------------------
};
} // namespace limited
Expand Down
6 changes: 3 additions & 3 deletions FWCore/Framework/interface/one/EDAnalyzer.h
Expand Up @@ -37,6 +37,9 @@ namespace edm {
"Cannot use both WatchLuminosityBlocks and LuminosityBLockCache");

EDAnalyzer() = default;
EDAnalyzer(const EDAnalyzer&) = delete;
const EDAnalyzer& operator=(const EDAnalyzer&) = delete;

#ifdef __INTEL_COMPILER
virtual ~EDAnalyzer() = default;
#endif
Expand All @@ -54,9 +57,6 @@ namespace edm {
SerialTaskQueue* globalLuminosityBlocksQueue() final { return globalLuminosityBlocksQueue_.queue(); }

private:
EDAnalyzer(const EDAnalyzer&) = delete;
const EDAnalyzer& operator=(const EDAnalyzer&) = delete;

// ---------- member data --------------------------------
impl::OptionalSerialTaskQueueHolder<WantsSerialGlobalRunTransitions<T...>::value> globalRunsQueue_;
impl::OptionalSerialTaskQueueHolder<WantsSerialGlobalLuminosityBlockTransitions<T...>::value>
Expand Down
6 changes: 3 additions & 3 deletions FWCore/Framework/interface/one/EDFilter.h
Expand Up @@ -36,6 +36,9 @@ namespace edm {
CheckAbility<module::Abilities::kOneWatchLuminosityBlocks, T...>::kHasIt),
"Cannot use both WatchLuminosityBlocks and LuminosityBLockCache");
EDFilter() = default;
EDFilter(const EDFilter&) = delete;
const EDFilter& operator=(const EDFilter&) = delete;

//virtual ~EDFilter();

// ---------- const member functions ---------------------
Expand Down Expand Up @@ -64,9 +67,6 @@ namespace edm {
SerialTaskQueue* globalLuminosityBlocksQueue() final { return globalLuminosityBlocksQueue_.queue(); }

private:
EDFilter(const EDFilter&) = delete;
const EDFilter& operator=(const EDFilter&) = delete;

// ---------- member data --------------------------------
impl::OptionalSerialTaskQueueHolder<WantsSerialGlobalRunTransitions<T...>::value> globalRunsQueue_;
impl::OptionalSerialTaskQueueHolder<WantsSerialGlobalLuminosityBlockTransitions<T...>::value>
Expand Down
6 changes: 3 additions & 3 deletions FWCore/Framework/interface/one/EDProducer.h
Expand Up @@ -37,6 +37,9 @@ namespace edm {
"Cannot use both WatchLuminosityBlocks and LuminosityBLockCache");

EDProducer() = default;
EDProducer(const EDProducer&) = delete;
const EDProducer& operator=(const EDProducer&) = delete;

#ifdef __INTEL_COMPILER
virtual ~EDProducer() = default;
#endif
Expand Down Expand Up @@ -69,9 +72,6 @@ namespace edm {
// ---------- member functions ---------------------------

private:
EDProducer(const EDProducer&) = delete;
const EDProducer& operator=(const EDProducer&) = delete;

// ---------- member data --------------------------------
impl::OptionalSerialTaskQueueHolder<WantsSerialGlobalRunTransitions<T...>::value> globalRunsQueue_;
impl::OptionalSerialTaskQueueHolder<WantsSerialGlobalLuminosityBlockTransitions<T...>::value>
Expand Down
7 changes: 3 additions & 4 deletions FWCore/Framework/interface/one/OutputModule.h
Expand Up @@ -31,6 +31,9 @@ namespace edm {
public:
OutputModule(edm::ParameterSet const& iPSet)
: OutputModuleBase(iPSet), outputmodule::AbilityToImplementor<T>::Type(iPSet)... {}
OutputModule(const OutputModule&) = delete; // stop default
const OutputModule& operator=(const OutputModule&) = delete; // stop default

// Required to work around ICC bug, but possible source of bloat in gcc.
// We do this only in the case of the intel compiler as this might end up
// creating a lot of code bloat due to inline symbols being generated in
Expand All @@ -53,10 +56,6 @@ namespace edm {
// ---------- member functions ---------------------------

private:
OutputModule(const OutputModule&) = delete; // stop default

const OutputModule& operator=(const OutputModule&) = delete; // stop default

// ---------- member data --------------------------------
impl::OptionalSerialTaskQueueHolder<WantsSerialGlobalRunTransitions<T...>::value> globalRunsQueue_;
impl::OptionalSerialTaskQueueHolder<WantsSerialGlobalLuminosityBlockTransitions<T...>::value>
Expand Down
10 changes: 5 additions & 5 deletions FWCore/MessageLogger/interface/AbstractMLscribe.h
Expand Up @@ -10,16 +10,16 @@ namespace edm {
public:
// --- birth/death:
AbstractMLscribe();
virtual ~AbstractMLscribe();

// --- methods needed for logging
virtual void runCommand(MessageLoggerQ::OpCode opcode, void *operand);

private:
// --- no copying:
AbstractMLscribe(AbstractMLscribe const &) = delete;
void operator=(AbstractMLscribe const &) = delete;

virtual ~AbstractMLscribe();

// --- methods needed for logging
virtual void runCommand(MessageLoggerQ::OpCode opcode, void *operand);

}; // AbstractMLscribe

} // end of namespace service
Expand Down
8 changes: 4 additions & 4 deletions FWCore/MessageLogger/src/MessageLoggerQ.cc
Expand Up @@ -58,15 +58,15 @@ namespace {
public:
StandAloneScribe() {}

StandAloneScribe(const StandAloneScribe &) = delete; // stop default

const StandAloneScribe &operator=(const StandAloneScribe &) = delete; // stop default

// ---------- member functions ---------------------------

void runCommand(edm::MessageLoggerQ::OpCode opcode, void *operand) override;

private:
StandAloneScribe(const StandAloneScribe &) = delete; // stop default

const StandAloneScribe &operator=(const StandAloneScribe &) = delete; // stop default

// ---------- member data --------------------------------
};

Expand Down
9 changes: 4 additions & 5 deletions FWCore/MessageService/interface/SingleThreadMSPresence.h
Expand Up @@ -10,16 +10,15 @@ namespace edm {
public:
// --- birth/death:
SingleThreadMSPresence();
// --- no copying:
SingleThreadMSPresence(SingleThreadMSPresence const &) = delete;
void operator=(SingleThreadMSPresence const &) = delete;

~SingleThreadMSPresence() override;

// --- Access to the scribe
// REMOVED AbstractMLscribe * scribe_ptr() { return &m; }

private:
// --- no copying:
SingleThreadMSPresence(SingleThreadMSPresence const &) = delete;
void operator=(SingleThreadMSPresence const &) = delete;

}; // SingleThreadMSPresence

} // end of namespace service
Expand Down
6 changes: 2 additions & 4 deletions FWCore/MessageService/src/ELdestination.h
Expand Up @@ -54,6 +54,8 @@ namespace edm {

public:
ELdestination();
ELdestination(const ELdestination& orig) = delete;
ELdestination& operator=(const ELdestination& orig) = delete;
virtual ~ELdestination();

// ----- Methods invoked by the ELadministrator:
Expand Down Expand Up @@ -134,10 +136,6 @@ namespace edm {

// ----- Verboten methods:
//
private:
ELdestination(const ELdestination& orig) = delete;
ELdestination& operator=(const ELdestination& orig) = delete;

}; // ELdestination

struct close_and_delete {
Expand Down