forked from qt-creator/qt-creator
ClangStaticAnalyzer: Add test project with C++11 includes
Task-number: QTCREATORBUG-16526 Change-Id: I67bbf172dabe993697d43b7b9d804a79ebfffa9c Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
This commit is contained in:
@@ -110,6 +110,11 @@ void ClangStaticAnalyzerUnitTests::testProject_data()
|
|||||||
QTest::newRow("simple qmake library project")
|
QTest::newRow("simple qmake library project")
|
||||||
<< QString(m_tmpDir->absolutePath("simple-library/simple-library.pro")) << 0;
|
<< QString(m_tmpDir->absolutePath("simple-library/simple-library.pro")) << 0;
|
||||||
|
|
||||||
|
QTest::newRow("stdc++11-includes qbs project")
|
||||||
|
<< QString(m_tmpDir->absolutePath("stdc++11-includes/stdc++11-includes.qbs")) << 0;
|
||||||
|
QTest::newRow("stdc++11-includes qmake project")
|
||||||
|
<< QString(m_tmpDir->absolutePath("stdc++11-includes/stdc++11-includes.pro")) << 0;
|
||||||
|
|
||||||
QTest::newRow("qt-widgets-app qbs project")
|
QTest::newRow("qt-widgets-app qbs project")
|
||||||
<< QString(m_tmpDir->absolutePath("qt-widgets-app/qt-widgets-app.qbs")) << 0;
|
<< QString(m_tmpDir->absolutePath("qt-widgets-app/qt-widgets-app.qbs")) << 0;
|
||||||
QTest::newRow("qt-widgets-app qmake project")
|
QTest::newRow("qt-widgets-app qmake project")
|
||||||
|
@@ -16,5 +16,8 @@
|
|||||||
<file>unit-tests/simple-library/simple-library.h</file>
|
<file>unit-tests/simple-library/simple-library.h</file>
|
||||||
<file>unit-tests/simple-library/simple-library.pro</file>
|
<file>unit-tests/simple-library/simple-library.pro</file>
|
||||||
<file>unit-tests/simple-library/simple-library.qbs</file>
|
<file>unit-tests/simple-library/simple-library.qbs</file>
|
||||||
|
<file>unit-tests/stdc++11-includes/main.cpp</file>
|
||||||
|
<file>unit-tests/stdc++11-includes/stdc++11-includes.pro</file>
|
||||||
|
<file>unit-tests/stdc++11-includes/stdc++11-includes.qbs</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@@ -0,0 +1,88 @@
|
|||||||
|
// Based on http://en.cppreference.com/w/cpp/header
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
#include <array>
|
||||||
|
#include <atomic>
|
||||||
|
#include <bitset>
|
||||||
|
#include <cassert>
|
||||||
|
#include <ccomplex>
|
||||||
|
#include <cctype>
|
||||||
|
#include <cerrno>
|
||||||
|
#include <cfenv>
|
||||||
|
#include <cfloat>
|
||||||
|
#include <chrono>
|
||||||
|
#include <cinttypes>
|
||||||
|
#include <ciso646>
|
||||||
|
#include <climits>
|
||||||
|
#include <clocale>
|
||||||
|
#include <cmath>
|
||||||
|
#include <codecvt>
|
||||||
|
#include <complex>
|
||||||
|
#include <condition_variable>
|
||||||
|
#include <csetjmp>
|
||||||
|
#include <csignal>
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
# include <cstdalign>
|
||||||
|
#endif
|
||||||
|
#include <cstdarg>
|
||||||
|
#include <cstdbool>
|
||||||
|
#include <cstddef>
|
||||||
|
#include <cstdint>
|
||||||
|
#include <cstdio>
|
||||||
|
#include <cstdlib>
|
||||||
|
#include <cstring>
|
||||||
|
#include <ctgmath>
|
||||||
|
#include <ctime>
|
||||||
|
#if defined(_MSC_VER) && _MSC_VER > 1800
|
||||||
|
# include <cuchar>
|
||||||
|
#endif
|
||||||
|
#include <cwchar>
|
||||||
|
#include <cwctype>
|
||||||
|
#include <deque>
|
||||||
|
#include <exception>
|
||||||
|
#include <forward_list>
|
||||||
|
#include <fstream>
|
||||||
|
#include <functional>
|
||||||
|
#include <future>
|
||||||
|
#include <initializer_list>
|
||||||
|
#include <iomanip>
|
||||||
|
#include <ios>
|
||||||
|
#include <iosfwd>
|
||||||
|
#include <iostream>
|
||||||
|
#include <istream>
|
||||||
|
#include <iterator>
|
||||||
|
#include <limits>
|
||||||
|
#include <list>
|
||||||
|
#include <locale>
|
||||||
|
#include <map>
|
||||||
|
#include <memory>
|
||||||
|
#include <mutex>
|
||||||
|
#include <new>
|
||||||
|
#include <numeric>
|
||||||
|
#include <ostream>
|
||||||
|
#include <queue>
|
||||||
|
#include <random>
|
||||||
|
#include <ratio>
|
||||||
|
#include <regex>
|
||||||
|
#include <scoped_allocator>
|
||||||
|
#include <set>
|
||||||
|
#include <sstream>
|
||||||
|
#include <stack>
|
||||||
|
#include <stdexcept>
|
||||||
|
#include <streambuf>
|
||||||
|
#include <string>
|
||||||
|
#include <system_error>
|
||||||
|
#include <thread>
|
||||||
|
#include <tuple>
|
||||||
|
#include <type_traits>
|
||||||
|
#include <typeindex>
|
||||||
|
#include <typeinfo>
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <unordered_set>
|
||||||
|
#include <utility>
|
||||||
|
#include <valarray>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
}
|
@@ -0,0 +1,7 @@
|
|||||||
|
TEMPLATE = app
|
||||||
|
CONFIG += console c++11
|
||||||
|
CONFIG -= app_bundle
|
||||||
|
CONFIG -= qt
|
||||||
|
|
||||||
|
TARGET = stdc++11-includes
|
||||||
|
SOURCES += main.cpp
|
@@ -0,0 +1,14 @@
|
|||||||
|
import qbs
|
||||||
|
|
||||||
|
CppApplication {
|
||||||
|
name : "Standard C++ Includes"
|
||||||
|
consoleApplication: true
|
||||||
|
cpp.cxxLanguageVersion: "c++11"
|
||||||
|
|
||||||
|
files: "main.cpp"
|
||||||
|
|
||||||
|
Group { // Properties for the produced executable
|
||||||
|
fileTagsFilter: product.type
|
||||||
|
qbs.install: true
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user