forked from qt-creator/qt-creator
Clang: Fix compiler warnings
MSVC64 reported implicit size_t to int/unsigned conversion. Change-Id: I253626dd25f9f3eb67b8fffb26006b619e826034 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
3b7d550a7c
commit
bd91d938c4
@@ -56,7 +56,7 @@ public:
|
|||||||
|
|
||||||
constexpr SizedArray() = default;
|
constexpr SizedArray() = default;
|
||||||
SizedArray(std::initializer_list<T> list)
|
SizedArray(std::initializer_list<T> list)
|
||||||
: m_size(list.size())
|
: m_size(std::uint8_t(list.size()))
|
||||||
{
|
{
|
||||||
std::copy(list.begin(), list.end(), begin());
|
std::copy(list.begin(), list.end(), begin());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -178,7 +178,7 @@ static const char *builtinTypeToText(CXTypeKind kind)
|
|||||||
Utf8String Type::builtinTypeToString() const
|
Utf8String Type::builtinTypeToString() const
|
||||||
{
|
{
|
||||||
const char *text = builtinTypeToText(cxType.kind);
|
const char *text = builtinTypeToText(cxType.kind);
|
||||||
return Utf8String::fromByteArray(QByteArray::fromRawData(text, strlen(text)));
|
return Utf8String::fromByteArray(QByteArray::fromRawData(text, int(strlen(text))));
|
||||||
}
|
}
|
||||||
|
|
||||||
int Type::argumentCount() const
|
int Type::argumentCount() const
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "fulltokeninfo.h"
|
||||||
#include "sourcerange.h"
|
#include "sourcerange.h"
|
||||||
#include "tokenprocessoriterator.h"
|
#include "tokenprocessoriterator.h"
|
||||||
#include "tokeninfocontainer.h"
|
#include "tokeninfocontainer.h"
|
||||||
@@ -61,7 +62,7 @@ public:
|
|||||||
}
|
}
|
||||||
~TokenProcessor()
|
~TokenProcessor()
|
||||||
{
|
{
|
||||||
clang_disposeTokens(cxTranslationUnit, cxTokens, cxCursors.size());
|
clang_disposeTokens(cxTranslationUnit, cxTokens, unsigned(cxCursors.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool isEmpty() const
|
bool isEmpty() const
|
||||||
@@ -117,7 +118,7 @@ private:
|
|||||||
QVector<TC> toTokens() const
|
QVector<TC> toTokens() const
|
||||||
{
|
{
|
||||||
QVector<TC> tokens;
|
QVector<TC> tokens;
|
||||||
tokens.reserve(size());
|
tokens.reserve(int(size()));
|
||||||
|
|
||||||
const auto isValidTokenInfo = [](const T &tokenInfo) {
|
const auto isValidTokenInfo = [](const T &tokenInfo) {
|
||||||
return !tokenInfo.hasInvalidMainType()
|
return !tokenInfo.hasInvalidMainType()
|
||||||
|
|||||||
Reference in New Issue
Block a user