Skip to content

Commit c74da90

Browse files
committed
add preferred type annotations i inexplicably didn't add earlier and remove the MathExtras.h noise
1 parent 980a6fa commit c74da90

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

llvm/include/llvm/Demangle/ItaniumDemangle.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2996,7 +2996,7 @@ template <typename Derived, typename Alloc> struct AbstractManglingParser {
29962996
};
29972997
char Enc[2]; // Encoding
29982998
OIKind Kind; // Kind of operator
2999-
bool Flag : 1; // Entry-specific flag
2999+
bool Flag : 1; // Entry-specific flag
30003000
Node::Prec Prec : 7; // Precedence
30013001
const char *Name; // Spelling
30023002

llvm/include/llvm/IR/User.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,9 @@ class User : public Value {
7979
struct AllocInfo {
8080
public:
8181
const unsigned NumOps : NumUserOperandsBits;
82+
LLVM_PREFERRED_TYPE(bool)
8283
const unsigned HasHungOffUses : 1;
84+
LLVM_PREFERRED_TYPE(bool)
8385
const unsigned HasDescriptor : 1;
8486

8587
AllocInfo() = delete;

llvm/include/llvm/Support/MathExtras.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ template <typename T, typename U, typename = enableif_int<T, U>>
4040
using common_sint =
4141
std::common_type_t<std::make_signed_t<T>, std::make_signed_t<U>>;
4242

43-
#pragma GCC diagnostic push
44-
#pragma GCC diagnostic ignored "-Wc++17-extensions"
45-
4643
/// Mathematical constants.
4744
namespace numbers {
4845
// TODO: Track C++20 std::numbers.
@@ -80,8 +77,6 @@ constexpr float ef = 0x1.5bf0a8P+1F, // (2.71828183) https://oeis.org/A
8077
// clang-format on
8178
} // namespace numbers
8279

83-
#pragma GCC diagnostic pop
84-
8580
/// Create a bitmask with the N right-most bits set to 1, and all other
8681
/// bits set to 0. Only unsigned types are allowed.
8782
template <typename T> T maskTrailingOnes(unsigned N) {

0 commit comments

Comments
 (0)