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

[CORE] [LLVM14] Apply clang-tidy and clang-format changes #41426

Merged
merged 1 commit into from
Apr 27, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions FWCore/FWLite/bin/storageSizeForBranch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ int main(int argc, char* argv[]) try {
"file"
"\nAllowed options";
boost::program_options::options_description desc(descString);
desc.add_options()(kHelpCommandOpt, "show this help message")(
kEntryNumberCommandOpt,
boost::program_options::value<int>(),
"read branch from the given entry value (default 0)")(kBranchNameOpt, "name of branch")(kFileNameOpt,
"name of file");
desc.add_options()(kHelpCommandOpt, "show this help message")(kEntryNumberCommandOpt,
boost::program_options::value<int>(),
"read branch from the given entry value (default 0)")(
kBranchNameOpt, "name of branch")(kFileNameOpt, "name of file");

boost::program_options::positional_options_description p;
p.add(kBranchNameOpt, 1);
Expand Down
8 changes: 3 additions & 5 deletions FWCore/Framework/test/statemachine_t.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@ int main(int argc, char* argv[]) try {
std::string outputFile;
boost::program_options::options_description desc("Allowed options");
desc.add_options()("help,h", "produce help message")(
"inputFile,i",
boost::program_options::value<std::string>(&inputFile)
->default_value(""))("outputFile,o",
boost::program_options::value<std::string>(&outputFile)
->default_value("statemachine_test_output.txt"));
"inputFile,i", boost::program_options::value<std::string>(&inputFile)->default_value(""))(
"outputFile,o",
boost::program_options::value<std::string>(&outputFile)->default_value("statemachine_test_output.txt"));
boost::program_options::variables_map vm;
boost::program_options::store(boost::program_options::parse_command_line(argc, argv, desc), vm);
boost::program_options::notify(vm);
Expand Down
5 changes: 2 additions & 3 deletions FWCore/Integration/bin/interprocess.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ int main(int argc, char* argv[]) {
boost::program_options::options_description desc(descString);

desc.add_options()(kHelpCommandOpt, "produce help message")(
kMemoryNameCommandOpt,
boost::program_options::value<std::string>(),
"memory name")(kUniqueIDCommandOpt, boost::program_options::value<std::string>(), "unique id");
kMemoryNameCommandOpt, boost::program_options::value<std::string>(), "memory name")(
kUniqueIDCommandOpt, boost::program_options::value<std::string>(), "unique id");

boost::program_options::positional_options_description p;
p.add(kMemoryNameOpt, 1);
Expand Down
5 changes: 2 additions & 3 deletions FWCore/Integration/bin/interprocess_random.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,8 @@ int main(int argc, char* argv[]) {
boost::program_options::options_description desc(descString);

desc.add_options()(kHelpCommandOpt, "produce help message")(
kMemoryNameCommandOpt,
boost::program_options::value<std::string>(),
"memory name")(kUniqueIDCommandOpt, boost::program_options::value<std::string>(), "unique id");
kMemoryNameCommandOpt, boost::program_options::value<std::string>(), "memory name")(
kUniqueIDCommandOpt, boost::program_options::value<std::string>(), "unique id");

boost::program_options::positional_options_description p;
p.add(kMemoryNameOpt, 1);
Expand Down
4 changes: 2 additions & 2 deletions FWCore/Integration/plugins/ProducerWithPSetDesc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ namespace edmtest {

assert(vpset.size() == 2U);

edm::ParameterSet pset0 = vpset[0];
const edm::ParameterSet& pset0 = vpset[0];
assert(pset0.getParameter<unsigned>("Drinks") == 5U);
assert(pset0.getUntrackedParameter<unsigned>("uDrinks") == 5U);
assert(pset0.getParameter<unsigned>("oDrinks") == 11U);
Expand All @@ -332,7 +332,7 @@ namespace edmtest {
assert(pset0.exists("ndouDrinks") == false);
// assert(pset0.getUntrackedParameter<unsigned>("ndouDrinks") == 5);

edm::ParameterSet pset1 = vpset[1];
const edm::ParameterSet& pset1 = vpset[1];
assert(pset1.getParameter<unsigned>("Drinks") == 5U);
assert(pset1.getUntrackedParameter<unsigned>("uDrinks") == 5U);
assert(pset1.getParameter<unsigned>("oDrinks") == 11U);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ namespace edm {

#define DEFINE_FWK_PSET_DESC_FILLER_IMPL(type, name, postfix) \
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::ParameterSetDescriptionFiller<type> > \
EDM_PLUGIN_SYM(s_filler##postfix, __LINE__)(name)
EDM_PLUGIN_SYM(s_filler##postfix, __LINE__)(name)
//NOTE: Can't do the below since this appears on the same line as another factory and w'ed have two variables with the same name
//DEFINE_EDM_PLUGIN (edm::ParameterSetDescriptionFillerPluginFactory,type,#type)

Expand All @@ -42,20 +42,20 @@ namespace edm {

#define DEFINE_DESC_FILLER_FOR_SERVICES(pluginName, serviceType) \
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::DescriptionFillerForServices<serviceType> > \
EDM_PLUGIN_SYM(s_filler, __LINE__)(#pluginName)
EDM_PLUGIN_SYM(s_filler, __LINE__)(#pluginName)

#define DEFINE_DESC_FILLER_FOR_ESSOURCES_IMPL(type, name) \
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::DescriptionFillerForESSources<type> > \
EDM_PLUGIN_SYM(s_filler, __LINE__)(name)
EDM_PLUGIN_SYM(s_filler, __LINE__)(name)
#define DEFINE_DESC_FILLER_FOR_ESSOURCES(type) DEFINE_DESC_FILLER_FOR_ESSOURCES_IMPL(type, #type)

#define DEFINE_DESC_FILLER_FOR_ESPRODUCERS_IMPL(type, name, postfix) \
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::DescriptionFillerForESProducers<type> > \
EDM_PLUGIN_SYM(s_filler##postfix, __LINE__)(name)
EDM_PLUGIN_SYM(s_filler##postfix, __LINE__)(name)
#define DEFINE_DESC_FILLER_FOR_ESPRODUCERS(type) DEFINE_DESC_FILLER_FOR_ESPRODUCERS_IMPL(type, #type, _0)

#define DEFINE_DESC_FILLER_FOR_EDLOOPERS(type) \
static const edm::ParameterSetDescriptionFillerPluginFactory::PMaker<edm::DescriptionFillerForEDLoopers<type> > \
EDM_PLUGIN_SYM(s_filler, __LINE__)(#type)
EDM_PLUGIN_SYM(s_filler, __LINE__)(#type)

#endif
7 changes: 3 additions & 4 deletions FWCore/PluginManager/bin/dump.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ int main(int argc, char** argv) {
descString += " [options]";
descString += "\nAllowed options";
options_description desc(descString);
desc.add_options()(kHelpCommandOpt, "produce help message")(
kFilesCommandOpt,
"list the file from which a plugin will come")(kAllFilesCommandOpt,
"list all the files to which a plugin is registered")
desc.add_options()(kHelpCommandOpt, "produce help message")(kFilesCommandOpt,
"list the file from which a plugin will come")(
kAllFilesCommandOpt, "list all the files to which a plugin is registered")
//(kAllCommandOpt,"when no paths given, try to update caches for all known directories [default is to only scan the first directory]")
;

Expand Down
2 changes: 1 addition & 1 deletion FWCore/Utilities/interface/propagate_const.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ namespace edm {
constexpr element_type const* operator->() const { return this->get(); }
constexpr element_type const& operator*() const { return *m_value; }

constexpr operator element_type const *() const { return this->get(); }
constexpr operator element_type const*() const { return this->get(); }

// ---------- member functions ---------------------------
constexpr element_type* get() { return to_raw_pointer(m_value); }
Expand Down
2 changes: 1 addition & 1 deletion FWCore/Utilities/interface/propagate_const_array.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ namespace edm {
constexpr element_type const* get() const { return &m_value[0]; }
constexpr element_type const& operator[](std::ptrdiff_t pos) const { return m_value[pos]; }

constexpr operator element_type const *() const { return this->get(); }
constexpr operator element_type const*() const { return this->get(); }

// ---------- member functions ---------------------------
constexpr element_type* get() { return &m_value[0]; }
Expand Down