Standardize on int for line and column values

Recently tons of warnings show up for presumably "problematic"
singned <-> unsigned and size conversions.

The Qt side uses 'int', and that's the biggest 'integration surface'
for us, so instead of establishing some internal boundary between
signed and unsigned areas, push that boundary out of creator core code,
and use 'int' everywhere.

Because it reduces friction further, also do it in libcplusplus.

Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
hjk
2019-07-24 18:40:10 +02:00
parent eab0df22f9
commit 7ab6783e24
153 changed files with 3181 additions and 3194 deletions

View File

@@ -38,27 +38,27 @@ public:
void setTranslationUnit(TranslationUnit *translationUnit);
Control *control() const;
unsigned tokenCount() const;
const Token &tokenAt(unsigned index) const;
int tokenKind(unsigned index) const;
const char *spell(unsigned index) const;
const Identifier *identifier(unsigned index) const;
const Literal *literal(unsigned index) const;
const NumericLiteral *numericLiteral(unsigned index) const;
const StringLiteral *stringLiteral(unsigned index) const;
int tokenCount() const;
const Token &tokenAt(int index) const;
int tokenKind(int index) const;
const char *spell(int index) const;
const Identifier *identifier(int index) const;
const Literal *literal(int index) const;
const NumericLiteral *numericLiteral(int index) const;
const StringLiteral *stringLiteral(int index) const;
void getPosition(unsigned offset,
unsigned *line,
unsigned *column = 0,
const StringLiteral **fileName = 0) const;
void getPosition(int offset,
int *line,
int *column = nullptr,
const StringLiteral **fileName = nullptr) const;
void getTokenPosition(unsigned index,
unsigned *line,
unsigned *column = 0,
const StringLiteral **fileName = 0) const;
void getTokenPosition(int index,
int *line,
int *column = nullptr,
const StringLiteral **fileName = nullptr) const;
void getTokenStartPosition(unsigned index, unsigned *line, unsigned *column) const;
void getTokenEndPosition(unsigned index, unsigned *line, unsigned *column) const;
void getTokenStartPosition(int index, int *line, int *column) const;
void getTokenEndPosition(int index, int *line, int *column) const;
void accept(AST *ast);