Skip to content

Commit 1f87900

Browse files
committed
[flang] Reformat with latest clang-format and .clang-format
Original-commit: flang-compiler/f18@9fe84f4 Reviewed-on: flang-compiler/f18#1094
1 parent 10b1add commit 1f87900

File tree

265 files changed

+5587
-4857
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

265 files changed

+5587
-4857
lines changed

flang/include/flang/Common/Fortran-features.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ class LanguageFeatureControl {
6161
LanguageFeatures warn_;
6262
bool warnAll_{false};
6363
};
64-
}
65-
#endif // FORTRAN_COMMON_FORTRAN_FEATURES_H_
64+
} // namespace Fortran::common
65+
#endif // FORTRAN_COMMON_FORTRAN_FEATURES_H_

flang/include/flang/Common/Fortran.h

+9-9
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@ ENUM_CLASS(IoSpecKind, Access, Action, Advance, Asynchronous, Blank, Decimal,
5252
Id, Iomsg, Iostat, Name, Named, Newunit, Nextrec, Nml, Number, Opened, Pad,
5353
Pending, Pos, Position, Read, Readwrite, Rec, Recl, Round, Sequential, Sign,
5454
Size, Status, Stream, Unformatted, Unit, Write,
55-
Convert, // nonstandard
56-
Dispose, // nonstandard
55+
Convert, // nonstandard
56+
Dispose, // nonstandard
5757
)
5858

5959
// Floating-point rounding modes; these are packed into a byte to save
6060
// room in the runtime's format processing context structure.
6161
enum class RoundingMode : std::uint8_t {
62-
TiesToEven, // ROUND=NEAREST, RN - default IEEE rounding
63-
ToZero, // ROUND=ZERO, RZ - truncation
64-
Down, // ROUND=DOWN, RD
65-
Up, // ROUND=UP, RU
66-
TiesAwayFromZero, // ROUND=COMPATIBLE, RC - ties round away from zero
62+
TiesToEven, // ROUND=NEAREST, RN - default IEEE rounding
63+
ToZero, // ROUND=ZERO, RZ - truncation
64+
Down, // ROUND=DOWN, RD
65+
Up, // ROUND=UP, RU
66+
TiesAwayFromZero, // ROUND=COMPATIBLE, RC - ties round away from zero
6767
};
6868

6969
// Fortran arrays may have up to 15 dimensions (See Fortran 2018 section 5.4.6).
7070
static constexpr int maxRank{15};
71-
}
72-
#endif // FORTRAN_COMMON_FORTRAN_H_
71+
} // namespace Fortran::common
72+
#endif // FORTRAN_COMMON_FORTRAN_H_

flang/include/flang/Common/bit-population-count.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -70,18 +70,18 @@ inline constexpr int BitPopulationCount(std::uint8_t x) {
7070
return (x & 0xf) + (x >> 4);
7171
}
7272

73-
template<typename UINT> inline constexpr bool Parity(UINT x) {
73+
template <typename UINT> inline constexpr bool Parity(UINT x) {
7474
return BitPopulationCount(x) & 1;
7575
}
7676

7777
// "Parity is for farmers." -- Seymour R. Cray
7878

79-
template<typename UINT> inline constexpr int TrailingZeroBitCount(UINT x) {
79+
template <typename UINT> inline constexpr int TrailingZeroBitCount(UINT x) {
8080
if ((x & 1) != 0) {
81-
return 0; // fast path for odd values
81+
return 0; // fast path for odd values
8282
} else {
8383
return BitPopulationCount(static_cast<UINT>(x ^ (x - 1))) - !!x;
8484
}
8585
}
86-
}
87-
#endif // FORTRAN_COMMON_BIT_POPULATION_COUNT_H_
86+
} // namespace Fortran::common
87+
#endif // FORTRAN_COMMON_BIT_POPULATION_COUNT_H_

flang/include/flang/Common/constexpr-bitset.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
namespace Fortran::common {
2323

24-
template<int BITS> class BitSet {
24+
template <int BITS> class BitSet {
2525
static_assert(BITS > 0 && BITS <= 64);
2626
static constexpr bool partialWord{BITS != 32 && BITS != 64};
2727
using Word = std::conditional_t<(BITS > 32), std::uint64_t, std::uint32_t>;
@@ -143,5 +143,5 @@ template<int BITS> class BitSet {
143143
private:
144144
Word bits_{0};
145145
};
146-
}
147-
#endif // FORTRAN_COMMON_CONSTEXPR_BITSET_H_
146+
} // namespace Fortran::common
147+
#endif // FORTRAN_COMMON_CONSTEXPR_BITSET_H_

flang/include/flang/Common/default-kinds.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ class IntrinsicTypeDefaultKinds {
5050
// comprise two default REAL components.
5151
int defaultIntegerKind_{4};
5252
int subscriptIntegerKind_{8};
53-
int sizeIntegerKind_{4}; // SIZE(), UBOUND(), &c. default KIND=
53+
int sizeIntegerKind_{4}; // SIZE(), UBOUND(), &c. default KIND=
5454
int defaultRealKind_{defaultIntegerKind_};
5555
int doublePrecisionKind_{2 * defaultRealKind_};
5656
int quadPrecisionKind_{2 * doublePrecisionKind_};
5757
int defaultCharacterKind_{1};
5858
int defaultLogicalKind_{defaultIntegerKind_};
5959
};
60-
}
61-
#endif // FORTRAN_COMMON_DEFAULT_KINDS_H_
60+
} // namespace Fortran::common
61+
#endif // FORTRAN_COMMON_DEFAULT_KINDS_H_

flang/include/flang/Common/enum-set.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
namespace Fortran::common {
2828

29-
template<typename ENUM, std::size_t BITS> class EnumSet {
29+
template <typename ENUM, std::size_t BITS> class EnumSet {
3030
static_assert(BITS > 0);
3131

3232
public:
@@ -191,7 +191,7 @@ template<typename ENUM, std::size_t BITS> class EnumSet {
191191
}
192192
}
193193

194-
template<typename FUNC> void IterateOverMembers(const FUNC &f) const {
194+
template <typename FUNC> void IterateOverMembers(const FUNC &f) const {
195195
EnumSet copy{*this};
196196
while (auto least{copy.LeastElement()}) {
197197
f(*least);
@@ -212,13 +212,13 @@ template<typename ENUM, std::size_t BITS> class EnumSet {
212212
private:
213213
bitsetType bitset_{};
214214
};
215-
}
215+
} // namespace Fortran::common
216216

217-
template<typename ENUM, std::size_t values>
217+
template <typename ENUM, std::size_t values>
218218
struct std::hash<Fortran::common::EnumSet<ENUM, values>> {
219219
std::size_t operator()(
220220
const Fortran::common::EnumSet<ENUM, values> &x) const {
221221
return std::hash(x.bitset());
222222
}
223223
};
224-
#endif // FORTRAN_COMMON_ENUM_SET_H_
224+
#endif // FORTRAN_COMMON_ENUM_SET_H_

0 commit comments

Comments
 (0)