forked from qt-creator/qt-creator
Remove workarounds for unsupported compilers
Change-Id: Ie28ff761b0bae13c6ebdf7dd649cfbba28e0fc2c Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
committed by
Orgad Shaneh
parent
531fba61f0
commit
e1660a18cf
4
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
4
src/libs/3rdparty/cplusplus/Parser.cpp
vendored
@@ -33,9 +33,7 @@
|
||||
#include <string>
|
||||
#include <cstdio> // for putchar
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1800)
|
||||
# define va_copy(dst, src) ((dst) = (src))
|
||||
#elif defined(__INTEL_COMPILER) && !defined(va_copy)
|
||||
#if defined(__INTEL_COMPILER) && !defined(va_copy)
|
||||
# define va_copy __va_copy
|
||||
#endif
|
||||
|
||||
|
||||
@@ -32,9 +32,7 @@
|
||||
#include <algorithm>
|
||||
#include <utility>
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1800)
|
||||
# define va_copy(dst, src) ((dst) = (src))
|
||||
#elif defined(__INTEL_COMPILER) && !defined(va_copy)
|
||||
#if defined(__INTEL_COMPILER) && !defined(va_copy)
|
||||
# define va_copy __va_copy
|
||||
#endif
|
||||
|
||||
|
||||
21
src/libs/3rdparty/cplusplus/TranslationUnit.h
vendored
21
src/libs/3rdparty/cplusplus/TranslationUnit.h
vendored
@@ -25,20 +25,8 @@
|
||||
#include "Token.h"
|
||||
#include "DiagnosticClient.h"
|
||||
#include <cstdio>
|
||||
#include <vector>
|
||||
|
||||
#if !(__cplusplus > 199711L || __GXX_EXPERIMENTAL_CXX0X__ || _MSC_VER >= 1600 || defined( _LIBCPP_VERSION )) \
|
||||
|| (defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402))
|
||||
#define USE_TR1
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1600
|
||||
# include <map>
|
||||
#elif defined(USE_TR1)
|
||||
# include <tr1/unordered_map>
|
||||
#else
|
||||
#include <unordered_map>
|
||||
#endif
|
||||
#include <vector>
|
||||
|
||||
namespace CPlusPlus {
|
||||
|
||||
@@ -185,14 +173,7 @@ private:
|
||||
std::vector<Token> *_comments;
|
||||
std::vector<unsigned> _lineOffsets;
|
||||
std::vector<PPLine> _ppLines;
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1600
|
||||
// MSVC2008 and earlier do not implement TR1.
|
||||
typedef std::map<unsigned, std::pair<unsigned, unsigned> > TokenLineColumn;
|
||||
#elif defined(USE_TR1)
|
||||
typedef std::tr1::unordered_map<unsigned, std::pair<unsigned, unsigned> > TokenLineColumn;
|
||||
#else
|
||||
typedef std::unordered_map<unsigned, std::pair<unsigned, unsigned> > TokenLineColumn;
|
||||
#endif
|
||||
TokenLineColumn _expandedLineColumn;
|
||||
MemoryPool *_pool;
|
||||
AST *_ast;
|
||||
|
||||
@@ -73,9 +73,3 @@ private:
|
||||
uint qHash(const CPlusPlus::LookupItem &result);
|
||||
|
||||
} // namespace CPlusPlus
|
||||
|
||||
#if defined(Q_CC_MSVC) && _MSC_VER <= 1300
|
||||
//this ensures that code outside QmlJS can use the hash function
|
||||
//it also a workaround for some compilers
|
||||
inline uint qHash(const CPlusPlus::LookupItem &item) { return CPlusPlus::qHash(item); }
|
||||
#endif
|
||||
|
||||
@@ -38,17 +38,9 @@
|
||||
|
||||
#include "sqlite3.h"
|
||||
|
||||
#if defined(Q_CC_GNU)
|
||||
#define QTC_THREAD_LOCAL __thread
|
||||
#elif defined(Q_CC_MSVC)
|
||||
#define QTC_THREAD_LOCAL __declspec(thread)
|
||||
#else
|
||||
#define QTC_THREAD_LOCAL thread_local
|
||||
#endif
|
||||
|
||||
#define SIZE_OF_BYTEARRAY_ARRAY(array) sizeof(array)/sizeof(QByteArray)
|
||||
|
||||
QTC_THREAD_LOCAL SqliteDatabaseBackend *sqliteDatabaseBackend = nullptr;
|
||||
thread_local SqliteDatabaseBackend *sqliteDatabaseBackend = nullptr;
|
||||
|
||||
SqliteDatabaseBackend::SqliteDatabaseBackend()
|
||||
: databaseHandle(nullptr),
|
||||
|
||||
@@ -25,13 +25,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if !(__cplusplus > 199711L || __GXX_EXPERIMENTAL_CXX0X__ || _MSC_VER >= 1600 || defined( _LIBCPP_VERSION )) || \
|
||||
(defined(__GNUC_LIBSTD__) && ((__GNUC_LIBSTD__-0) * 100 + __GNUC_LIBSTD_MINOR__-0 <= 402))
|
||||
# include <algorithm>
|
||||
#else // C++11
|
||||
#include <utility>
|
||||
#endif
|
||||
|
||||
|
||||
namespace Utils {
|
||||
/// RAII object to save a value, and restore it when the scope is left.
|
||||
|
||||
Reference in New Issue
Block a user