-
Notifications
You must be signed in to change notification settings - Fork 579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc clang-tidy #6104
base: master
Are you sure you want to change the base?
Misc clang-tidy #6104
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
89de30d
to
5e147b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
src/rcx/src/dbUtil.cpp
Outdated
#include "odb/db.h" | ||
#include "odb/dbShape.h" | ||
#include "odb/dbWireCodec.h" | ||
#include "utl/Logger.h" | ||
|
||
namespace rcx { | ||
|
||
using odb::Ath__array1D; | ||
using odb::dbBPin; | ||
using odb::dbIntProperty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: using decl 'Array1D' is unused [misc-unused-using-decls]
using odb::Array1D;
^
Additional context
src/rcx/src/dbUtil.cpp:42: remove the using
using odb::Array1D;
^
src/rcx/src/grids.cpp
Outdated
@@ -168,89 +170,88 @@ void Ath__searchBox::set(int x1, int y1, int x2, int y2, uint l, int dir) | |||
_otherId = 0; | |||
_type = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: use '= default' to define a trivial default constructor [modernize-use-equals-default]
src/rcx/src/grids.cpp:171:
- {
- }
+ = default;
src/rcx/src/wire.h
Outdated
@@ -391,88 +388,77 @@ class Ath__grid | |||
|
|||
bool anyTrackAvailable(); | |||
|
|||
uint addWireList(Ath__box* box); | |||
uint addWireList(Box* list); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: function 'rcx::Grid::addWireList' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
uint addWireList(Box* box);
^
Additional context
src/rcx/src/grids.cpp:1600: the definition seen here
uint Grid::addWireList(Box* list)
^
src/rcx/src/wire.h:390: differing parameters are named here: ('box'), in definition: ('list')
uint addWireList(Box* box);
^
src/rcx/src/wire.h
Outdated
Wire* makeWire(int* ll, int* ur, uint id, uint* m1); | ||
Wire* makeWire(uint dir, int* ll, int* ur, uint id1, uint id2, uint type = 0); | ||
|
||
Wire* makeWire(Wire* v, uint type = 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: function 'rcx::Grid::makeWire' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
Wire* makeWire(Wire* w, uint type = 0);
^
Additional context
src/rcx/src/grids.cpp:1754: the definition seen here
Wire* Grid::makeWire(Wire* v, uint type)
^
src/rcx/src/wire.h:426: differing parameters are named here: ('w'), in definition: ('v')
Wire* makeWire(Wire* w, uint type = 0);
^
src/rcx/src/wire.h
Outdated
void getBoxes(Ath__array1D<uint>* table); | ||
uint getBoxes(uint ii, Ath__array1D<uint>* table); | ||
void getBoxes(Array1D<uint>* table); | ||
uint getBoxes(uint trackIndex, Array1D<uint>* table); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: function 'rcx::Grid::getBoxes' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
uint getBoxes(uint ii, Array1D<uint>* table);
^
Additional context
src/rcx/src/grids.cpp:1499: the definition seen here
uint Grid::getBoxes(uint trackIndex, Array1D<uint>* table)
^
src/rcx/src/wire.h:452: differing parameters are named here: ('ii'), in definition: ('trackIndex')
uint getBoxes(uint ii, Array1D<uint>* table);
^
src/rcx/src/wire.h
Outdated
int xMin(); | ||
int xMax(); | ||
int yMin(); | ||
int yMax(); | ||
uint getRowNum(int x); | ||
uint getColNum(int y); | ||
uint getRowNum(int y); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: function 'rcx::GridTable::getRowNum' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
uint getRowNum(int x);
^
Additional context
src/rcx/src/grids.cpp:2726: the definition seen here
uint GridTable::getRowNum(int y)
^
src/rcx/src/wire.h:609: differing parameters are named here: ('x'), in definition: ('y')
uint getRowNum(int x);
^
src/rcx/src/wire.h
Outdated
uint getRowNum(int x); | ||
uint getColNum(int y); | ||
uint getRowNum(int y); | ||
uint getColNum(int x); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: function 'rcx::GridTable::getColNum' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
uint getColNum(int y);
^
Additional context
src/rcx/src/grids.cpp:2734: the definition seen here
uint GridTable::getColNum(int x)
^
src/rcx/src/wire.h:610: differing parameters are named here: ('y'), in definition: ('x')
uint getColNum(int y);
^
src/rcx/src/wire.h
Outdated
@@ -685,24 +668,24 @@ | |||
uint* id1, | |||
uint* id2, | |||
uint* wireType); | |||
void getCCdist(uint wid, uint* width, uint* level, uint* id1, uint* id2); | |||
void getCCdist(uint wid, uint* width, uint* len, uint* id1, uint* id2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: function 'rcx::GridTable::getCCdist' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
void getCCdist(uint wid, uint* width, uint* level, uint* id1, uint* id2);
^
Additional context
src/rcx/src/grids.cpp:3088: the definition seen here
void GridTable::getCCdist(uint wid,
^
src/rcx/src/wire.h:670: differing parameters are named here: ('level'), in definition: ('len')
void getCCdist(uint wid, uint* width, uint* level, uint* id1, uint* id2);
^
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
5e147b2
to
e834b09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@@ -2553,7 +2549,7 @@ int diffDefReadFile(char* inFile, | |||
return (2); | |||
} | |||
|
|||
res = defrRead(f, inFile, userData, 1); | |||
const int res = defrRead(f, inFile, userData, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: Value stored to 'res' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
const int res = defrRead(f, inFile, userData, 1);
^
Additional context
src/odb/src/def/defdiff/diffDefRW.cpp:2551: Value stored to 'res' during its initialization is never read
const int res = defrRead(f, inFile, userData, 1);
^
@@ -2553,7 +2549,7 @@ | |||
return (2); | |||
} | |||
|
|||
res = defrRead(f, inFile, userData, 1); | |||
const int res = defrRead(f, inFile, userData, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: unused variable 'res' [clang-diagnostic-unused-variable]
const int res = defrRead(f, inFile, userData, 1);
^
if (viaCuts < 2 || viaCuts > 4) | ||
return LEFW_BAD_DATA; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: statement should be inside braces [google-readability-braces-around-statements]
if (viaCuts < 2 || viaCuts > 4) | |
return LEFW_BAD_DATA; | |
if (viaCuts < 2 || viaCuts > 4) { | |
return LEFW_BAD_DATA; | |
} |
if (viaCuts < 2 || viaCuts > 4) | ||
return LEFW_BAD_DATA; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
warning: statement should be inside braces [google-readability-braces-around-statements]
if (viaCuts < 2 || viaCuts > 4) | |
return LEFW_BAD_DATA; | |
if (viaCuts < 2 || viaCuts > 4) { | |
return LEFW_BAD_DATA; | |
} |
No description provided.