Skip to content

Commit b55f57b

Browse files
r-barnespytorchmergebot
authored andcommitted
[codemod][lowrisk] Remove extra semi colon from caffe2/c10/core/SymNodeImpl.h (pytorch#123055)
Summary: `-Wextra-semi` or `-Wextra-semi-stmt` If the code compiles, this is safe to land. Pull Request resolved: pytorch#123055 Approved by: https://github.com/Skylion007
1 parent 023f05c commit b55f57b

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

c10/core/SymNodeImpl.h

+19-19
Original file line numberDiff line numberDiff line change
@@ -30,61 +30,61 @@ class C10_API SymNodeImpl : public c10::intrusive_ptr_target {
3030
// these could be pure virtual when we implement LTC versions
3131
virtual bool is_int() {
3232
TORCH_CHECK(false, "NYI");
33-
};
33+
}
3434
virtual bool is_bool() {
3535
TORCH_CHECK(false, "NYI");
36-
};
36+
}
3737
virtual bool is_float() {
3838
TORCH_CHECK(false, "NYI");
39-
};
39+
}
4040
virtual bool is_nested_int() const {
4141
return false;
42-
};
42+
}
4343
virtual SymNode add(const SymNode& other) {
4444
TORCH_CHECK(false, "NYI");
45-
};
45+
}
4646
virtual SymNode sub(const SymNode& other) {
4747
TORCH_CHECK(false, "NYI");
48-
};
48+
}
4949
virtual SymNode mul(const SymNode& other) {
5050
TORCH_CHECK(false, "NYI");
51-
};
51+
}
5252
virtual SymNode truediv(const SymNode& other) {
5353
TORCH_CHECK(false, "NYI");
54-
};
54+
}
5555
virtual SymNode pow(const SymNode& other) {
5656
TORCH_CHECK(false, "NYI");
57-
};
57+
}
5858
virtual SymNode floordiv(const SymNode& other) {
5959
TORCH_CHECK(false, "NYI");
60-
};
60+
}
6161
virtual SymNode mod(const SymNode& other) {
6262
TORCH_CHECK(false, "NYI");
63-
};
63+
}
6464
virtual SymNode eq(const SymNode& other) {
6565
TORCH_CHECK(false, "NYI");
66-
};
66+
}
6767
virtual SymNode ne(const SymNode& other) {
6868
TORCH_CHECK(false, "NYI");
69-
};
69+
}
7070
virtual SymNode gt(const SymNode& other) {
7171
TORCH_CHECK(false, "NYI");
72-
};
72+
}
7373
virtual SymNode lt(const SymNode& other) {
7474
TORCH_CHECK(false, "NYI");
75-
};
75+
}
7676
virtual SymNode le(const SymNode& other) {
7777
TORCH_CHECK(false, "NYI");
78-
};
78+
}
7979
virtual SymNode ge(const SymNode& other) {
8080
TORCH_CHECK(false, "NYI");
81-
};
81+
}
8282
virtual SymNode ceil() {
8383
TORCH_CHECK(false, "NYI");
84-
};
84+
}
8585
virtual SymNode floor() {
8686
TORCH_CHECK(false, "NYI");
87-
};
87+
}
8888
virtual SymNode neg() {
8989
TORCH_CHECK(false, "NYI");
9090
};

c10/util/BFloat16.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ struct alignas(2) BFloat16 {
9999
}
100100

101101
constexpr C10_HOST_DEVICE BFloat16(unsigned short bits, from_bits_t)
102-
: x(bits){};
102+
: x(bits) {}
103103
inline C10_HOST_DEVICE BFloat16(float value);
104104
inline C10_HOST_DEVICE operator float() const;
105105

c10/util/Exception.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ namespace {
142142
WarningHandler* getBaseHandler() {
143143
static WarningHandler base_warning_handler_ = WarningHandler();
144144
return &base_warning_handler_;
145-
};
145+
}
146146

147147
class ThreadWarningHandler {
148148
public:

c10/util/Float8_e4m3fn.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ struct alignas(1) Float8_e4m3fn {
233233
Float8_e4m3fn() = default;
234234

235235
constexpr C10_HOST_DEVICE Float8_e4m3fn(uint8_t bits, from_bits_t)
236-
: x(bits){};
236+
: x(bits) {}
237237
inline C10_HOST_DEVICE Float8_e4m3fn(float value);
238238
inline C10_HOST_DEVICE operator float() const;
239239
inline C10_HOST_DEVICE bool isnan() const;

c10/util/Float8_e4m3fnuz.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ struct alignas(1) Float8_e4m3fnuz {
121121
Float8_e4m3fnuz() = default;
122122

123123
constexpr C10_HOST_DEVICE Float8_e4m3fnuz(uint8_t bits, from_bits_t)
124-
: x(bits){};
124+
: x(bits) {}
125125
inline C10_HOST_DEVICE Float8_e4m3fnuz(float value);
126126
inline C10_HOST_DEVICE operator float() const;
127127
inline C10_HOST_DEVICE bool isnan() const;

c10/util/Logging.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ std::function<::c10::Backtrace()>& GetFetchStackTrace() {
3030
return get_lazy_backtrace(/*frames_to_skip=*/1);
3131
};
3232
return func;
33-
};
33+
}
3434
} // namespace
3535

3636
void SetStackTraceFetcher(std::function<::c10::Backtrace()> fetcher) {
@@ -134,19 +134,19 @@ APIUsageLoggerType* GetAPIUsageLogger() {
134134
static APIUsageLoggerType func =
135135
IsAPIUsageDebugMode() ? &APIUsageDebug : [](const string&) {};
136136
return &func;
137-
};
137+
}
138138

139139
APIUsageMetadataLoggerType* GetAPIUsageMetadataLogger() {
140140
static APIUsageMetadataLoggerType func =
141141
[](const std::string&,
142142
const std::map<std::string, std::string>& metadata_map) {};
143143
return &func;
144-
};
144+
}
145145

146146
DDPUsageLoggerType* GetDDPUsageLogger() {
147147
static DDPUsageLoggerType func = [](const DDPLoggingData&) {};
148148
return &func;
149-
};
149+
}
150150
} // namespace
151151

152152
void SetAPIUsageLogger(std::function<void(const std::string&)> logger) {

0 commit comments

Comments
 (0)