aboutsummaryrefslogtreecommitdiffstats
path: root/src/libs/3rdparty/cplusplus/ASTVisitor.h
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2019-07-24 18:40:10 +0200
committerhjk <hjk@qt.io>2019-07-26 09:23:48 +0000
commit7ab6783e24c6a05a67f319817cd1bdd026a7ce43 (patch)
tree8b56ea311d333f45f300b915c3bd25a2b77b4aef /src/libs/3rdparty/cplusplus/ASTVisitor.h
parenteab0df22f98fab37585e4513de836a06e4aa05d5 (diff)
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>
Diffstat (limited to 'src/libs/3rdparty/cplusplus/ASTVisitor.h')
-rw-r--r--src/libs/3rdparty/cplusplus/ASTVisitor.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/libs/3rdparty/cplusplus/ASTVisitor.h b/src/libs/3rdparty/cplusplus/ASTVisitor.h
index 46bfde340b..a1740e12cd 100644
--- a/src/libs/3rdparty/cplusplus/ASTVisitor.h
+++ b/src/libs/3rdparty/cplusplus/ASTVisitor.h
@@ -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);