Skip to content

Commit 6ae7e32

Browse files
committed
run clang-format
they changed the * location for multivar decls...
1 parent 8fde2cc commit 6ae7e32

Some content is hidden

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

44 files changed

+226
-209
lines changed

src/analysis/function_analysis.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class DefinednessAnalysis {
6565
typedef llvm::DenseSet<InternedString> RequiredSet;
6666

6767
private:
68-
llvm::DenseMap<CFGBlock*, llvm::DenseMap<InternedString, DefinitionLevel>> defined_at_beginning, defined_at_end;
68+
llvm::DenseMap<CFGBlock *, llvm::DenseMap<InternedString, DefinitionLevel>> defined_at_beginning, defined_at_end;
6969
llvm::DenseMap<CFGBlock*, RequiredSet> defined_at_end_sets;
7070

7171
public:

src/asm_writing/assembler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ enum class MovType {
6969

7070
class Assembler {
7171
private:
72-
uint8_t* const start_addr, *const end_addr;
72+
uint8_t *const start_addr, *const end_addr;
7373
uint8_t* addr;
7474
bool failed; // if the rewrite failed at the assembly-generation level for some reason
7575

src/asm_writing/icinfo.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ class ICInfo {
131131
int slot_size, llvm::CallingConv::ID calling_conv, LiveOutSet live_outs,
132132
assembler::GenericRegister return_register, TypeRecorder* type_recorder);
133133
~ICInfo();
134-
void* const start_addr, *const slowpath_rtn_addr, *const continue_addr;
134+
void *const start_addr, *const slowpath_rtn_addr, *const continue_addr;
135135

136136
int getSlotSize() { return slot_size; }
137137
int getNumSlots() { return num_slots; }

src/asm_writing/mc_writer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ const int OPCODE_ADD = 0b000, OPCODE_SUB = 0b101;
117117
class X86MCWriter : public MCWriter {
118118
private:
119119
uint8_t* addr;
120-
uint8_t* const start_addr, *const end_addr;
120+
uint8_t *const start_addr, *const end_addr;
121121
int pops_required;
122122

123123
inline void _emitByte(uint8_t b) {

src/capi/abstract.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ extern "C" PyObject* PyObject_Type(PyObject* o) noexcept {
6262

6363
extern "C" Py_ssize_t _PyObject_LengthHint(PyObject* o, Py_ssize_t defaultvalue) noexcept {
6464
static PyObject* hintstrobj = NULL;
65-
PyObject* ro, *hintmeth;
65+
PyObject *ro, *hintmeth;
6666
Py_ssize_t rv;
6767

6868
/* try o.__len__() */
@@ -164,8 +164,8 @@ extern "C" int PyBuffer_IsContiguous(Py_buffer* view, char fort) noexcept {
164164
extern "C" int PyBuffer_ToContiguous(void* buf, Py_buffer* view, Py_ssize_t len, char fort) noexcept {
165165
int k;
166166
void (*addone)(int, Py_ssize_t*, const Py_ssize_t*);
167-
Py_ssize_t* indices, elements;
168-
char* dest, *ptr;
167+
Py_ssize_t *indices, elements;
168+
char *dest, *ptr;
169169

170170
if (len > view->len) {
171171
len = view->len;
@@ -263,7 +263,7 @@ extern "C" void PyBuffer_Release(Py_buffer* view) noexcept {
263263
static PyObject* objargs_mktuple(va_list va) noexcept {
264264
int i, n = 0;
265265
va_list countva;
266-
PyObject* result, *tmp;
266+
PyObject *result, *tmp;
267267

268268
#ifdef VA_LIST_IS_ARRAY
269269
memcpy(countva, va, sizeof(va_list));
@@ -508,7 +508,7 @@ extern "C" int PyObject_IsInstance(PyObject* inst, PyObject* cls) noexcept {
508508
}
509509

510510
extern "C" PyObject* PyObject_CallFunctionObjArgs(PyObject* callable, ...) noexcept {
511-
PyObject* args, *tmp;
511+
PyObject *args, *tmp;
512512
va_list vargs;
513513

514514
if (callable == NULL)
@@ -666,7 +666,7 @@ extern "C" PyObject* PyObject_CallMethod(PyObject* o, const char* name, const ch
666666
}
667667

668668
extern "C" PyObject* PyObject_CallMethodObjArgs(PyObject* callable, PyObject* name, ...) noexcept {
669-
PyObject* args, *tmp;
669+
PyObject *args, *tmp;
670670
va_list vargs;
671671

672672
if (callable == NULL || name == NULL)
@@ -943,8 +943,8 @@ extern "C" void _Py_add_one_to_index_C(int nd, Py_ssize_t* index, const Py_ssize
943943
extern "C" int PyObject_CopyData(PyObject* dest, PyObject* src) noexcept {
944944
Py_buffer view_dest, view_src;
945945
int k;
946-
Py_ssize_t* indices, elements;
947-
char* dptr, *sptr;
946+
Py_ssize_t *indices, elements;
947+
char *dptr, *sptr;
948948

949949
if (!PyObject_CheckBuffer(dest) || !PyObject_CheckBuffer(src)) {
950950
PyErr_SetString(PyExc_TypeError, "both destination and source must have the "
@@ -1131,7 +1131,7 @@ static PyObject* binary_iop(PyObject* v, PyObject* w, const int iop_slot, const
11311131
*/
11321132

11331133
static PyObject* ternary_op(PyObject* v, PyObject* w, PyObject* z, const int op_slot, const char* op_name) noexcept {
1134-
PyNumberMethods* mv, *mw, *mz;
1134+
PyNumberMethods *mv, *mw, *mz;
11351135
PyObject* x = NULL;
11361136
ternaryfunc slotv = NULL;
11371137
ternaryfunc slotw = NULL;
@@ -1180,7 +1180,7 @@ static PyObject* ternary_op(PyObject* v, PyObject* w, PyObject* z, const int op_
11801180

11811181
if (!NEW_STYLE_NUMBER(v) || !NEW_STYLE_NUMBER(w) || (z != Py_None && !NEW_STYLE_NUMBER(z))) {
11821182
/* we have an old style operand, coerce */
1183-
PyObject* v1, *z1, *w2, *z2;
1183+
PyObject *v1, *z1, *w2, *z2;
11841184
int c;
11851185

11861186
c = PyNumber_Coerce(&v, &w);
@@ -1473,7 +1473,7 @@ extern "C" PyObject* PySequence_Repeat(PyObject* o, Py_ssize_t count) noexcept {
14731473
have an nb_multiply slot, not an sq_repeat slot. so we fall back
14741474
to nb_multiply if o appears to be a sequence. */
14751475
if (PySequence_Check(o)) {
1476-
PyObject* n, *result;
1476+
PyObject *n, *result;
14771477
n = PyInt_FromSsize_t(count);
14781478
if (n == NULL)
14791479
return NULL;
@@ -1520,7 +1520,7 @@ extern "C" PyObject* PySequence_InPlaceRepeat(PyObject* o, Py_ssize_t count) noe
15201520
return m->sq_repeat(o, count);
15211521

15221522
if (PySequence_Check(o)) {
1523-
PyObject* n, *result;
1523+
PyObject *n, *result;
15241524
n = PyInt_FromSsize_t(count);
15251525
if (n == NULL)
15261526
return NULL;
@@ -1556,7 +1556,7 @@ extern "C" PyObject* PySequence_GetItem(PyObject* s, Py_ssize_t i) noexcept {
15561556
}
15571557

15581558
PyObject* _PySlice_FromIndices(Py_ssize_t istart, Py_ssize_t istop) {
1559-
PyObject* start, *end, *slice;
1559+
PyObject *start, *end, *slice;
15601560
start = PyInt_FromSsize_t(istart);
15611561
if (!start)
15621562
return NULL;
@@ -1794,7 +1794,7 @@ extern "C" int PyMapping_HasKey(PyObject* o, PyObject* key) noexcept {
17941794
}
17951795

17961796
extern "C" PyObject* PyMapping_GetItemString(PyObject* o, char* key) noexcept {
1797-
PyObject* okey, *r;
1797+
PyObject *okey, *r;
17981798

17991799
if (key == NULL)
18001800
return null_error();

src/capi/codecs.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static PyObject* normalizestring(const char* string) {
114114

115115
PyObject* _PyCodec_Lookup(const char* encoding) noexcept {
116116
// PyInterpreterState *interp; Pyston change
117-
PyObject* result, * args = NULL, *v;
117+
PyObject *result, *args = NULL, *v;
118118
Py_ssize_t i, len;
119119

120120
if (encoding == NULL) {
@@ -234,7 +234,7 @@ static PyObject* codec_getitem(const char* encoding, int index) {
234234
/* Helper function to create an incremental codec. */
235235

236236
static PyObject* codec_getincrementalcodec(const char* encoding, const char* errors, const char* attrname) {
237-
PyObject* codecs, *ret, *inccodec;
237+
PyObject *codecs, *ret, *inccodec;
238238

239239
codecs = _PyCodec_Lookup(encoding);
240240
if (codecs == NULL)
@@ -254,7 +254,7 @@ static PyObject* codec_getincrementalcodec(const char* encoding, const char* err
254254
/* Helper function to create a stream codec. */
255255

256256
static PyObject* codec_getstreamcodec(const char* encoding, PyObject* stream, const char* errors, const int index) {
257-
PyObject* codecs, *streamcodec, *codeccls;
257+
PyObject *codecs, *streamcodec, *codeccls;
258258

259259
codecs = _PyCodec_Lookup(encoding);
260260
if (codecs == NULL)
@@ -306,7 +306,7 @@ PyObject* PyCodec_StreamWriter(const char* encoding, PyObject* stream, const cha
306306

307307
PyObject* PyCodec_Encode(PyObject* object, const char* encoding, const char* errors) noexcept {
308308
PyObject* encoder = NULL;
309-
PyObject* args = NULL, * result = NULL;
309+
PyObject *args = NULL, *result = NULL;
310310
PyObject* v;
311311

312312
encoder = PyCodec_Encoder(encoding);
@@ -348,7 +348,7 @@ PyObject* PyCodec_Encode(PyObject* object, const char* encoding, const char* err
348348

349349
PyObject* PyCodec_Decode(PyObject* object, const char* encoding, const char* errors) noexcept {
350350
PyObject* decoder = NULL;
351-
PyObject* args = NULL, * result = NULL;
351+
PyObject *args = NULL, *result = NULL;
352352
PyObject* v;
353353

354354
decoder = PyCodec_Decoder(encoding);

src/capi/errors.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ extern "C" void PyErr_SetNone(PyObject* exception) noexcept {
138138
/* Call when an exception has occurred but there is no way for Python
139139
to handle it. Examples: exception in __del__ or during GC. */
140140
extern "C" void PyErr_WriteUnraisable(PyObject* obj) noexcept {
141-
PyObject* f, *t, *v, *tb;
141+
PyObject *f, *t, *v, *tb;
142142
PyErr_Fetch(&t, &v, &tb);
143143
f = PySys_GetObject("stderr");
144144
if (f != NULL) {
@@ -273,7 +273,7 @@ extern "C" void PyErr_Display(PyObject* exception, PyObject* value, PyObject* tb
273273
err = PyTraceBack_Print(tb, f);
274274
if (err == 0 && PyObject_HasAttrString(value, "print_file_and_line")) {
275275
PyObject* message;
276-
const char* filename, *text;
276+
const char *filename, *text;
277277
int lineno, offset;
278278
if (!parse_syntax_error(value, &message, &filename, &lineno, &offset, &text))
279279
PyErr_Clear();
@@ -352,7 +352,7 @@ extern "C" void PyErr_Display(PyObject* exception, PyObject* value, PyObject* tb
352352
}
353353

354354
static void handle_system_exit(void) noexcept {
355-
PyObject* exception, *value, *tb;
355+
PyObject *exception, *value, *tb;
356356
int exitcode = 0;
357357

358358
if (Py_InspectFlag)
@@ -404,7 +404,7 @@ static void handle_system_exit(void) noexcept {
404404
}
405405

406406
extern "C" void PyErr_PrintEx(int set_sys_last_vars) noexcept {
407-
PyObject* exception, *v, *tb, *hook;
407+
PyObject *exception, *v, *tb, *hook;
408408

409409
if (PyErr_ExceptionMatches(PyExc_SystemExit)) {
410410
handle_system_exit();
@@ -426,7 +426,7 @@ extern "C" void PyErr_PrintEx(int set_sys_last_vars) noexcept {
426426
PyObject* args = PyTuple_Pack(3, exception, v, tb ? tb : Py_None);
427427
PyObject* result = PyEval_CallObject(hook, args);
428428
if (result == NULL) {
429-
PyObject* exception2, *v2, *tb2;
429+
PyObject *exception2, *v2, *tb2;
430430
if (PyErr_ExceptionMatches(PyExc_SystemExit)) {
431431
handle_system_exit();
432432
}

src/capi/modsupport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ static PyObject* do_mkdict(const char** p_format, va_list* p_va, int endchar, in
280280
/* Note that we can't bail immediately on error as this will leak
281281
refcounts on any 'N' arguments. */
282282
for (i = 0; i < n; i += 2) {
283-
PyObject* k, *v;
283+
PyObject *k, *v;
284284
int err;
285285
k = do_mkvalue(p_format, p_va, flags);
286286
if (k == NULL) {

src/capi/object.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ extern "C" void Py_ReprLeave(PyObject* obj) noexcept {
645645
static int adjust_tp_compare(int c) {
646646
if (PyErr_Occurred()) {
647647
if (c != -1 && c != -2) {
648-
PyObject* t, *v, *tb;
648+
PyObject *t, *v, *tb;
649649
PyErr_Fetch(&t, &v, &tb);
650650
if (PyErr_Warn(PyExc_RuntimeWarning, "tp_compare didn't return -1 or -2 "
651651
"for exception") < 0) {
@@ -832,7 +832,7 @@ static int try_3way_compare(PyObject* v, PyObject* w) {
832832
*/
833833
/* Pyston change: static*/ int default_3way_compare(PyObject* v, PyObject* w) {
834834
int c;
835-
const char* vname, *wname;
835+
const char *vname, *wname;
836836

837837
if (v->cls == w->cls) {
838838
/* When comparing these pointers, they must be cast to

0 commit comments

Comments
 (0)