Skip to content

Commit

Permalink
add google checks
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Aug 4, 2023
1 parent 0055f3e commit 00c08aa
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ Checks: >
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-*,
google-build-explicit-make-pair,
google-build-namespaces,
google-global-names-in-headers,
misc-*,
-misc-const-correctness,
-misc-non-private-member-variables-in-classes,
Expand Down
3 changes: 1 addition & 2 deletions Src/Base/AMReX_ParallelDescriptor.H
Original file line number Diff line number Diff line change
Expand Up @@ -898,8 +898,7 @@ ParallelDescriptor::Bcast (T* t,
#ifdef BL_LAZY
int r;
MPI_Comm_compare(comm, Communicator(), &r);
if (r == MPI_IDENT)
Lazy::EvalReduction();
if (r == MPI_IDENT) { Lazy::EvalReduction(); }
#endif

BL_ASSERT(n < static_cast<size_t>(std::numeric_limits<int>::max()));
Expand Down
6 changes: 2 additions & 4 deletions Src/Base/AMReX_ParallelDescriptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,7 @@ Barrier (const MPI_Comm &comm, const std::string &message)
#ifdef BL_LAZY
int r;
MPI_Comm_compare(comm, Communicator(), &r);
if (r == MPI_IDENT)
Lazy::EvalReduction();
if (r == MPI_IDENT) { Lazy::EvalReduction(); }
#endif

BL_PROFILE_S("ParallelDescriptor::Barrier(comm)");
Expand Down Expand Up @@ -1130,8 +1129,7 @@ Bcast(void *buf, int count, MPI_Datatype datatype, int root, MPI_Comm comm)
#ifdef BL_LAZY
int r;
MPI_Comm_compare(comm, Communicator(), &r);
if (r == MPI_IDENT)
Lazy::EvalReduction();
if (r == MPI_IDENT) { Lazy::EvalReduction(); }
#endif

BL_PROFILE_S("ParallelDescriptor::Bcast(viMiM)");
Expand Down
2 changes: 0 additions & 2 deletions Tests/Amr/Advection_AmrLevel/Exec/SingleVortex/Prob_Parm.H
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

#include <AMReX_REAL.H>

using namespace amrex::literals;

// Define the struct to contain problem-specific variables here.
// For this case, since we don't need any, the struct is empty.
struct ProbParm {};
Expand Down
1 change: 0 additions & 1 deletion Tests/EB/CNS/Source/CNS.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <AMReX_EBCellFlag.H>
#include <AMReX_EBFluxRegister.H>

using namespace amrex;
class CNS
:
public amrex::AmrLevel
Expand Down

0 comments on commit 00c08aa

Please sign in to comment.