From f74de74d86b634164dba0b3237d42c0cd417b292 Mon Sep 17 00:00:00 2001 From: Andreas Fertig Date: Fri, 11 Oct 2019 19:49:52 +0200 Subject: [PATCH 1/6] Test Clang 9 custom build. --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e4e58977..3538fcaf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,15 +19,15 @@ llvm_current_packages: &all_llvm_current_packages jobs: include: - # OSX clang 8 build - - env: COMPILER='clang++' LLVM_CONFIG='llvm-config' LLVM_VERSION='8.0.0' COVERAGE='No' STATIC='No' DEBUG='No' UPLOAD='Yes' SKIP_TESTS='No' TIDY='No' SHACMD='shasum -a 256' + # OSX clang 9 build + - env: COMPILER='clang++' LLVM_CONFIG='llvm-config' LLVM_VERSION='9.0.0' COVERAGE='No' STATIC='No' DEBUG='No' UPLOAD='Yes' SKIP_TESTS='No' TIDY='No' SHACMD='shasum -a 256' os: osx - osx_image: xcode9.3 + osx_image: xcode11.2 compiler: clang - env: COMPILER='clang++' LLVM_CONFIG='llvm-config' LLVM_VERSION='8.0.0' COVERAGE='Yes' STATIC='No' DEBUG='Yes' UPLOAD='No' SKIP_TESTS='No' TIDY='No' SHACMD='shasum -a 256' os: osx - osx_image: xcode9.3 + osx_image: xcode11.2 compiler: clang # Linux Clang Build From 5b98c02555715fc4914d19cea9b6552c4f6e3a3c Mon Sep 17 00:00:00 2001 From: Andreas Fertig Date: Fri, 11 Oct 2019 23:24:49 +0200 Subject: [PATCH 2/6] Install headers under macOS 10.14. --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3538fcaf..e48a4dc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -145,7 +145,10 @@ install: wget -q --continue --directory-prefix=$HOME/Library/Caches/Homebrew https://github.com/andreasfertig/cppinsights-compiler-binaries/releases/download/${LLVM_VERSION}/clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin.tar.xz mkdir current - tar -xJf $HOME/Library/Caches/Homebrew/clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin.tar.xz -C current --strip-components 1 + tar -xJf $HOME/Library/Caches/Homebrew/clang+llvm-${LLVM_VERSION}-x86_64-apple-darwin.tar.xz -C current --strip-components 1 + # Temporary fix for image: xcode11 to use GCC. + # Source: https://github.com/Farwaykorse/fwkSudoku/commit/9dff745e37390abcfacd6e4f8da650e7db54444e + sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / fi - | if [[ "${UPLOAD}" = "Yes" ]]; then From b1ea02b23272c1b426759b5adbd12e6e5f5c1ddd Mon Sep 17 00:00:00 2001 From: Andreas Fertig Date: Sat, 12 Oct 2019 09:21:17 +0200 Subject: [PATCH 3/6] Added names to Travis-CI builds. --- .travis.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e48a4dc9..cb3e5797 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,16 +22,19 @@ jobs: # OSX clang 9 build - env: COMPILER='clang++' LLVM_CONFIG='llvm-config' LLVM_VERSION='9.0.0' COVERAGE='No' STATIC='No' DEBUG='No' UPLOAD='Yes' SKIP_TESTS='No' TIDY='No' SHACMD='shasum -a 256' os: osx + name: "Clang 8 @ macOS Release" osx_image: xcode11.2 compiler: clang - env: COMPILER='clang++' LLVM_CONFIG='llvm-config' LLVM_VERSION='8.0.0' COVERAGE='Yes' STATIC='No' DEBUG='Yes' UPLOAD='No' SKIP_TESTS='No' TIDY='No' SHACMD='shasum -a 256' os: osx + name: "Clang 8 @ macOS Code Coverage & Debug" osx_image: xcode11.2 compiler: clang # Linux Clang Build - os: linux + name: "Clang unstable @ Ubuntu" compiler: clang addons: apt: @@ -44,6 +47,7 @@ jobs: # Clang stable deployment - os: linux + name: "Clang stable @ Ubuntu Release" sudo: required services: - docker @@ -55,6 +59,7 @@ jobs: # Linux g++ Build - os: linux + name: "GCC 8 / LLVM unstable @ Ubuntu" compiler: gcc addons: apt: @@ -66,6 +71,7 @@ jobs: # Linux g++ clang 8 build - os: linux + name: "GCC 8 / LLVM 8 @ Ubuntu" compiler: gcc addons: &clang80 apt: @@ -84,18 +90,21 @@ jobs: # Clang-tidy analysis - os: linux + name: "GCC 8 / LLVM 8 @ Ubuntu clang-tidy check" compiler: gcc addons: *clang80 env: COMPILER='g++-8' LLVM_CONFIG='/usr/bin/llvm-config-8' COVERAGE='No' STATIC='No' DEBUG='No' TIDY='Yes' # Clang-format check - os: linux + name: "GCC 8 / LLVM 8 @ Ubuntu clang-format check" compiler: gcc addons: *clang80 env: COMPILER='g++-8' LLVM_CONFIG='/usr/bin/llvm-config-8' COVERAGE='No' STATIC='No' DEBUG='No' TIDY='No' CFORMAT='Yes' CFORMAT_NAME='clang-format-8' # Debug build with coverage - os: linux + name: "GCC 8 / LLVM unstable @ Ubuntu Code Coverage & Debug" compiler: gcc addons: &covcurrent apt: @@ -107,8 +116,8 @@ jobs: - lcov env: COMPILER='g++-8' LLVM_CONFIG=${LLVM_CONFIG_CURRENT} COVERAGE='Yes' STATIC='No' DEBUG='Yes' TIDY='No' - # Linux Clang Coverage Build - os: linux + name: "GCC 8 / LLVM unstable @ Ubuntu Code Coverage" compiler: gcc addons: *covcurrent env: COMPILER='g++-8' LLVM_CONFIG=${LLVM_CONFIG_CURRENT} STATIC='No' COVERAGE='Yes' DEBUG='No' TIDY='No' @@ -127,6 +136,7 @@ jobs: before_deploy: true env: COMPILER='clang++-8' LLVM_CONFIG=/usr/bin/llvm-config-8 COVERAGE='No' DEPLOY='No' STATIC='No' DEBUG='No' UPLOAD='No' TIDY='No' SHACMD='sha256sum' DOCKER_UPLOAD='Yes' os: linux + name: "Final deploy to DockerHub" install: - | From 928cdaeb6160b700a1de625dab651f42800ca281 Mon Sep 17 00:00:00 2001 From: Andreas Fertig Date: Sat, 12 Oct 2019 12:55:50 +0200 Subject: [PATCH 4/6] Fixed test for Clang 9. --- tests/CharLiteralTest.expect | 2 +- tests/ClassOpInTemplateFunctionTest.expect | 1 - tests/ClassOperatorHandler2Test.expect | 2 +- tests/ClassTemplateDeclTest.cerr | 5 +-- tests/CompilerGeneratedHandler2Test.expect | 2 +- tests/EmptyLambda.expect | 2 +- tests/ForStmtWithLambdaInInitTest.expect | 25 +++++++----- tests/GlobalBracedInitTest.expect | 6 +-- tests/IfStmtWithLambdaInInitTest.expect | 6 +-- tests/ImplicitValueInitExprTest.expect | 2 + tests/Issue158.expect | 2 +- tests/Issue2.cerr | 2 +- tests/Issue2.expect | 9 +++-- tests/Issue205.expect | 4 +- tests/Issue205_2.expect | 4 +- tests/Issue238_2.cerr | 6 +-- tests/Issue238_2.expect | 1 - tests/Issue3.expect | 6 +-- tests/Issue4.expect | 3 +- tests/Issue46.expect | 5 ++- tests/Issue60.expect | 2 +- tests/Issue64.expect | 4 +- tests/LambdaAndInClassInitializerTest.expect | 3 +- tests/LambdaAsTemplateArgTest.expect | 3 +- tests/LambdaCapturingFunctionTest.expect | 3 +- tests/LambdaConstexprTest.expect | 3 +- tests/LambdaHandler2Test.expect | 2 +- tests/LambdaHandler3Test.expect | 3 +- tests/LambdaHandler4Test.expect | 12 ++++-- tests/LambdaHandler5Test.expect | 6 +-- tests/LambdaHandler6Test.expect | 5 ++- tests/LambdaHandler7Test.expect | 2 +- tests/LambdaHandler8Test.expect | 3 +- tests/LambdaHandlerCaptureLessTest.cerr | 4 +- tests/LambdaHandlerCaptureLessTest.expect | 3 +- tests/LambdaHandlerInFunctionTest.expect | 4 +- tests/LambdaHandlerTest.cerr | 10 ++--- tests/LambdaHandlerTest.expect | 41 ++++++++++++-------- tests/LambdaHandlerVLA2Test.cerr | 14 +++---- tests/LambdaHandlerVLA2Test.expect | 5 ++- tests/LambdaHandlerVLATest.expect | 5 ++- tests/LambdaImplicitCaptureTest.expect | 3 +- tests/LambdaInLamdaTest.expect | 6 ++- tests/LambdaInVarDeclTest.expect | 3 +- tests/LambdaPackExpansionTest.expect | 11 +++--- tests/LambdaWithFunctionPointerTest.expect | 4 +- tests/MemberExprTemplateTest.expect | 3 +- tests/MultipleLambdasInOneLineTest.expect | 4 +- tests/NonTypeTemplateParameterPackTest.cerr | 17 ++------ tests/RangeForStmtHandlerTest.expect | 6 ++- tests/ReplaceClangNamespaceTest.expect | 2 +- tests/SizeOfPackExprTest.expect | 1 - tests/StaticInLambdaTest.expect | 4 +- tests/StructuredBindingsHandler3Test.cerr | 18 ++++++--- tests/StructuredBindingsHandler5Test.expect | 4 -- tests/StructuredBindingsHandler6Test.expect | 2 - tests/StructuredBindingsHandler7Test.expect | 3 +- tests/TemplateArgumentsTest.expect | 3 -- tests/TemplateKeywordTest.cerr | 15 +------ tests/TemplateMemberFunctionTest.expect | 6 +-- tests/TemplatesWithAutoAndLambdaTest.cerr | 6 +-- tests/TemplatesWithAutoAndLambdaTest.expect | 2 - tests/VarTemplateWithLambdaTest.cerr | 10 ++--- tests/VarTemplateWithLambdaTest.expect | 2 - 64 files changed, 189 insertions(+), 178 deletions(-) diff --git a/tests/CharLiteralTest.expect b/tests/CharLiteralTest.expect index 8803a722..d8e2995a 100644 --- a/tests/CharLiteralTest.expect +++ b/tests/CharLiteralTest.expect @@ -69,7 +69,7 @@ struct Foo inline void operator=(char v) volatile; - // inline ~Foo() = default; + // inline ~Foo() noexcept = default; }; #endif diff --git a/tests/ClassOpInTemplateFunctionTest.expect b/tests/ClassOpInTemplateFunctionTest.expect index 6385bc98..e1f1df96 100644 --- a/tests/ClassOpInTemplateFunctionTest.expect +++ b/tests/ClassOpInTemplateFunctionTest.expect @@ -38,7 +38,6 @@ class Foo } - /* First instantiated from: ClassOpInTemplateFunctionTest.cpp:37 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline constexpr int get<1>() const noexcept diff --git a/tests/ClassOperatorHandler2Test.expect b/tests/ClassOperatorHandler2Test.expect index 1b45dd01..e637b130 100644 --- a/tests/ClassOperatorHandler2Test.expect +++ b/tests/ClassOperatorHandler2Test.expect @@ -105,7 +105,7 @@ int main() } using retType_60_5 = void (*)(); - inline /*constexpr */ operator retType_60_5 () const + inline /*constexpr */ operator retType_60_5 () const noexcept { return __invoke; }; diff --git a/tests/ClassTemplateDeclTest.cerr b/tests/ClassTemplateDeclTest.cerr index a799bfeb..ed503d7b 100644 --- a/tests/ClassTemplateDeclTest.cerr +++ b/tests/ClassTemplateDeclTest.cerr @@ -1,7 +1,6 @@ -.tmp.cpp:33:23: error: no template named 'Tmpl'; did you mean 'Test::Tmpl'? +.tmp.cpp:33:23: error: use of undeclared identifier 'Tmpl'; did you mean 'Test::Tmpl'? Test::Tmpl x = Tmpl(); - ^~~~ - Test::Tmpl + ^ .tmp.cpp:9:9: note: 'Test::Tmpl' declared here class Tmpl ^ diff --git a/tests/CompilerGeneratedHandler2Test.expect b/tests/CompilerGeneratedHandler2Test.expect index 0f78cf12..a272781a 100644 --- a/tests/CompilerGeneratedHandler2Test.expect +++ b/tests/CompilerGeneratedHandler2Test.expect @@ -19,7 +19,7 @@ class C2 public: const int i{2}; - inline constexpr C2() = default; + inline constexpr C2() noexcept = default; }; diff --git a/tests/EmptyLambda.expect b/tests/EmptyLambda.expect index a7904b50..4753f040 100644 --- a/tests/EmptyLambda.expect +++ b/tests/EmptyLambda.expect @@ -9,7 +9,7 @@ void foo() } using retType_2_1 = void (*)(); - inline /*constexpr */ operator retType_2_1 () const + inline /*constexpr */ operator retType_2_1 () const noexcept { return __invoke; }; diff --git a/tests/ForStmtWithLambdaInInitTest.expect b/tests/ForStmtWithLambdaInInitTest.expect index d349fc89..79947d04 100644 --- a/tests/ForStmtWithLambdaInInitTest.expect +++ b/tests/ForStmtWithLambdaInInitTest.expect @@ -6,13 +6,14 @@ int main() class __lambda_7_17 { - int & x; public: inline /*constexpr */ int operator()() const { return x * 2; } + private: + int & x; public: __lambda_7_17(int & _x) : x{_x} {} @@ -27,13 +28,14 @@ int main() class __lambda_11_17 { - int & x; public: inline /*constexpr */ int operator()() const { return x * 2; } + private: + int & x; public: __lambda_11_17(int & _x) : x{_x} {} @@ -43,13 +45,14 @@ int main() class __lambda_11_43 { - int & x; public: inline /*constexpr */ int operator()() const { return x * 2; } + private: + int & x; public: __lambda_11_43(int & _x) : x{_x} {} @@ -71,7 +74,7 @@ int main() } using retType_15_9 = auto (*)() -> void; - inline /*constexpr */ operator retType_15_9 () const + inline /*constexpr */ operator retType_15_9 () const noexcept { return __invoke; }; @@ -88,13 +91,14 @@ int main() class __lambda_15_37 { - int & x; public: inline /*constexpr */ int operator()() const { return --x; } + private: + int & x; public: __lambda_15_37(int & _x) : x{_x} {} @@ -111,7 +115,7 @@ int main() } using retType_15_59 = auto (*)() -> void; - inline /*constexpr */ operator retType_15_59 () const + inline /*constexpr */ operator retType_15_59 () const noexcept { return __invoke; }; @@ -139,7 +143,7 @@ int main() } using retType_19_9 = auto (*)() -> void; - inline /*constexpr */ operator retType_19_9 () const + inline /*constexpr */ operator retType_19_9 () const noexcept { return __invoke; }; @@ -163,7 +167,7 @@ int main() } using retType_20_9 = auto (*)() -> void; - inline /*constexpr */ operator retType_20_9 () const + inline /*constexpr */ operator retType_20_9 () const noexcept { return __invoke; }; @@ -180,13 +184,14 @@ int main() class __lambda_20_37 { - int & x; public: inline /*constexpr */ int operator()() const { return --x; } + private: + int & x; public: __lambda_20_37(int & _x) : x{_x} {} @@ -203,7 +208,7 @@ int main() } using retType_20_59 = auto (*)() -> void; - inline /*constexpr */ operator retType_20_59 () const + inline /*constexpr */ operator retType_20_59 () const noexcept { return __invoke; }; diff --git a/tests/GlobalBracedInitTest.expect b/tests/GlobalBracedInitTest.expect index 9aec1f77..aaf34e4d 100644 --- a/tests/GlobalBracedInitTest.expect +++ b/tests/GlobalBracedInitTest.expect @@ -1,8 +1,8 @@ -int x0 = 27; +int x0 = {27}; -int x1 = 27; +int x1 = {27}; -int x2 = 27; +int x2 = {27}; int x3 = 27; diff --git a/tests/IfStmtWithLambdaInInitTest.expect b/tests/IfStmtWithLambdaInInitTest.expect index 589bfdcd..35221691 100644 --- a/tests/IfStmtWithLambdaInInitTest.expect +++ b/tests/IfStmtWithLambdaInInitTest.expect @@ -11,7 +11,7 @@ int main() } using retType_3_14 = auto (*)() -> int; - inline /*constexpr */ operator retType_3_14 () const + inline /*constexpr */ operator retType_3_14 () const noexcept { return __invoke; }; @@ -36,7 +36,7 @@ int main() } using retType_3_34 = auto (*)() -> int; - inline /*constexpr */ operator retType_3_34 () const + inline /*constexpr */ operator retType_3_34 () const noexcept { return __invoke; }; @@ -61,7 +61,7 @@ int main() } using retType_3_53 = auto (*)() -> int; - inline /*constexpr */ operator retType_3_53 () const + inline /*constexpr */ operator retType_3_53 () const noexcept { return __invoke; }; diff --git a/tests/ImplicitValueInitExprTest.expect b/tests/ImplicitValueInitExprTest.expect index 97413714..158e3659 100644 --- a/tests/ImplicitValueInitExprTest.expect +++ b/tests/ImplicitValueInitExprTest.expect @@ -4,6 +4,7 @@ struct Point { double x; double y; + // inline ~Point() noexcept = default; }; @@ -52,6 +53,7 @@ struct Complex { _Complex float fc; _Complex int ic; + // inline ~Complex() noexcept = default; }; diff --git a/tests/Issue158.expect b/tests/Issue158.expect index b1bfc0db..32a3c48d 100644 --- a/tests/Issue158.expect +++ b/tests/Issue158.expect @@ -1,2 +1,2 @@ -int x = 27; +int x = {27}; diff --git a/tests/Issue2.cerr b/tests/Issue2.cerr index 98843a49..27ab10ed 100644 --- a/tests/Issue2.cerr +++ b/tests/Issue2.cerr @@ -1,4 +1,4 @@ -.tmp.cpp:42:7: error: call to implicitly-deleted copy constructor of 'Movable' +.tmp.cpp:44:7: error: call to implicitly-deleted copy constructor of 'Movable' : x{_x} ^~~~~ .tmp.cpp:9:10: note: copy constructor is implicitly deleted because 'Movable' has a user-declared move constructor diff --git a/tests/Issue2.expect b/tests/Issue2.expect index 21547909..5fcf342d 100644 --- a/tests/Issue2.expect +++ b/tests/Issue2.expect @@ -29,13 +29,15 @@ int main() class __lambda_20_16 { - Movable x; - int c; public: inline /*constexpr */ void operator()() const { } + private: + Movable x; + int c; + public: // inline __lambda_20_16(const __lambda_20_16 &) = delete; // inline __lambda_20_16(__lambda_20_16 &&) = default; public: __lambda_20_16(Movable _x, int _c) @@ -50,12 +52,13 @@ int main() class __lambda_24_16 { - int c; public: inline /*constexpr */ void operator()() const { } + private: + int c; public: __lambda_24_16(int _c) : c{_c} {} diff --git a/tests/Issue205.expect b/tests/Issue205.expect index a7600d35..50fc44d5 100644 --- a/tests/Issue205.expect +++ b/tests/Issue205.expect @@ -16,13 +16,15 @@ class EventContainer class __lambda_6_43 { - EventContainer * __this; public: inline /*constexpr */ void operator()() const { std::cout.operator<<(__this->val); } + private: + EventContainer * __this; + public: // inline /*constexpr */ __lambda_6_43 & operator=(const __lambda_6_43 &) = delete; // inline /*constexpr */ __lambda_6_43(const __lambda_6_43 &) noexcept = default; // inline /*constexpr */ __lambda_6_43(__lambda_6_43 &&) noexcept = default; diff --git a/tests/Issue205_2.expect b/tests/Issue205_2.expect index 4cbee2d4..a72e2659 100644 --- a/tests/Issue205_2.expect +++ b/tests/Issue205_2.expect @@ -11,13 +11,15 @@ class EventContainer class __lambda_6_43 { - EventContainer * __this; public: inline /*constexpr */ void operator()() const { std::cout.operator<<(__this->val); } + private: + EventContainer * __this; + public: // inline /*constexpr */ __lambda_6_43 & operator=(const __lambda_6_43 &) = delete; // inline /*constexpr */ __lambda_6_43(const __lambda_6_43 &) noexcept = default; // inline /*constexpr */ __lambda_6_43(__lambda_6_43 &&) noexcept = default; diff --git a/tests/Issue238_2.cerr b/tests/Issue238_2.cerr index 0912b0cf..f086cd7f 100644 --- a/tests/Issue238_2.cerr +++ b/tests/Issue238_2.cerr @@ -1,16 +1,16 @@ .tmp.cpp:48:5: error: templates cannot be declared inside of a local class template ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.tmp.cpp:80:5: error: templates cannot be declared inside of a local class +.tmp.cpp:79:5: error: templates cannot be declared inside of a local class template ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .tmp.cpp:55:16: error: declaration of variable 'test' with deduced type 'auto' requires an initializer auto test; ^ -.tmp.cpp:87:16: error: declaration of variable 'test' with deduced type 'auto' requires an initializer +.tmp.cpp:86:16: error: declaration of variable 'test' with deduced type 'auto' requires an initializer auto test; ^ -.tmp.cpp:97:10: error: no matching member function for call to 'operator()' +.tmp.cpp:96:10: error: no matching member function for call to 'operator()' lambda.operator()(MyArrayWrapper(vec)); ~~~~~~~^~~~~~~~~~ 5 errors generated. diff --git a/tests/Issue238_2.expect b/tests/Issue238_2.expect index 513fc293..6f5edc25 100644 --- a/tests/Issue238_2.expect +++ b/tests/Issue238_2.expect @@ -58,7 +58,6 @@ void f() } } - /* First instantiated from: Issue238_2.cpp:20 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline /*constexpr */ void operator()(MyArrayWrapper container) const diff --git a/tests/Issue3.expect b/tests/Issue3.expect index a0f96f00..38bc3b3a 100644 --- a/tests/Issue3.expect +++ b/tests/Issue3.expect @@ -15,7 +15,7 @@ void x() } using retType_4_5 = void (*)(); - inline /*constexpr */ operator retType_4_5 () const + inline /*constexpr */ operator retType_4_5 () const noexcept { return __invoke; }; @@ -32,7 +32,7 @@ void x() } using retType_3_12 = void (*)(); - inline /*constexpr */ operator retType_3_12 () const + inline /*constexpr */ operator retType_3_12 () const noexcept { return __invoke; }; @@ -49,7 +49,7 @@ void x() } using retType_4_5 = void (*)(); - inline /*constexpr */ operator retType_4_5 () const + inline /*constexpr */ operator retType_4_5 () const noexcept { return __invoke; }; diff --git a/tests/Issue4.expect b/tests/Issue4.expect index 9342ab06..9126f91d 100644 --- a/tests/Issue4.expect +++ b/tests/Issue4.expect @@ -9,13 +9,14 @@ int main() class __lambda_9_11 { - char uuu; public: inline /*constexpr */ void operator()() const { printf("a: %c\n", static_cast(uuu)); } + private: + char uuu; public: __lambda_9_11(char _uuu) : uuu{_uuu} {} diff --git a/tests/Issue46.expect b/tests/Issue46.expect index ca796ef2..af372854 100644 --- a/tests/Issue46.expect +++ b/tests/Issue46.expect @@ -8,7 +8,7 @@ class __lambda_1_10 } using retType_1_10 = int (*)(); - inline /*constexpr */ operator retType_1_10 () const + inline /*constexpr */ operator retType_1_10 () const noexcept { return __invoke; }; @@ -28,13 +28,14 @@ __lambda_1_10 x = __lambda_1_10{}; class __lambda_5_11 { - int a; public: inline /*constexpr */ int operator()(int b) const { return b * a; } + private: + int a; public: __lambda_5_11(int _a) : a{_a} {} diff --git a/tests/Issue60.expect b/tests/Issue60.expect index 0844291a..6ec1e0a0 100644 --- a/tests/Issue60.expect +++ b/tests/Issue60.expect @@ -49,8 +49,8 @@ struct Index<&Person::age> // inline Index(const Index<&Person::age> &) = default; // inline Index(Index<&Person::age> &&) = default; // inline Index<&Person::age> & operator=(Index<&Person::age> &&) = default; - // inline Index() noexcept = default; // inline ~Index() noexcept = default; + // inline Index() noexcept = default; }; #endif diff --git a/tests/Issue64.expect b/tests/Issue64.expect index 7db6dd94..78b03673 100644 --- a/tests/Issue64.expect +++ b/tests/Issue64.expect @@ -5,13 +5,15 @@ void func(const std::basic_string & arg) class __lambda_5_11 { - const std::basic_string arg; public: inline /*constexpr */ unsigned long operator()() const { return arg.size(); } + private: + const std::basic_string arg; + public: // inline __lambda_5_11(const __lambda_5_11 &) = default; // inline __lambda_5_11(__lambda_5_11 &&) = default; public: __lambda_5_11(const std::basic_string _arg) diff --git a/tests/LambdaAndInClassInitializerTest.expect b/tests/LambdaAndInClassInitializerTest.expect index 9f8399c1..e1115f33 100644 --- a/tests/LambdaAndInClassInitializerTest.expect +++ b/tests/LambdaAndInClassInitializerTest.expect @@ -65,13 +65,14 @@ class EventContainer class __lambda_17_38 { - EventContainer * __this; public: inline /*constexpr */ void operator()() const { __this->val; } + private: + EventContainer * __this; public: __lambda_17_38(EventContainer * _this) : __this{_this} diff --git a/tests/LambdaAsTemplateArgTest.expect b/tests/LambdaAsTemplateArgTest.expect index f0583641..38693133 100644 --- a/tests/LambdaAsTemplateArgTest.expect +++ b/tests/LambdaAsTemplateArgTest.expect @@ -29,13 +29,14 @@ int main() class __lambda_12_14 { - int & y; public: inline /*constexpr */ int operator()(int x, int b) const { return x + y + b; } + private: + int & y; public: __lambda_12_14(int & _y) : y{_y} {} diff --git a/tests/LambdaCapturingFunctionTest.expect b/tests/LambdaCapturingFunctionTest.expect index 4970b3a8..53cff504 100644 --- a/tests/LambdaCapturingFunctionTest.expect +++ b/tests/LambdaCapturingFunctionTest.expect @@ -15,13 +15,14 @@ int main() class __lambda_15_14 { - D & d; public: inline /*constexpr */ void operator()() const { d(3); } + private: + D & d; public: __lambda_15_14(D & _d) : d{_d} {} diff --git a/tests/LambdaConstexprTest.expect b/tests/LambdaConstexprTest.expect index 368b0c4f..b96f0645 100644 --- a/tests/LambdaConstexprTest.expect +++ b/tests/LambdaConstexprTest.expect @@ -4,13 +4,14 @@ void Test() class __lambda_4_18 { - const int Size; public: inline void operator()() const { int Dim[3]; } + private: + const int Size; public: __lambda_4_18(const int _Size) : Size{_Size} {} diff --git a/tests/LambdaHandler2Test.expect b/tests/LambdaHandler2Test.expect index 875c0780..4c5dadb4 100644 --- a/tests/LambdaHandler2Test.expect +++ b/tests/LambdaHandler2Test.expect @@ -10,7 +10,7 @@ int main() } using retType_8_26 = int (*)(int, char); - inline /*constexpr */ operator retType_8_26 () const + inline /*constexpr */ operator retType_8_26 () const noexcept { return __invoke; } diff --git a/tests/LambdaHandler3Test.expect b/tests/LambdaHandler3Test.expect index 96cc1277..1299733c 100644 --- a/tests/LambdaHandler3Test.expect +++ b/tests/LambdaHandler3Test.expect @@ -20,13 +20,14 @@ int main() class __lambda_10_13 { - int & y; public: inline /*constexpr */ int operator()(int x) const { return x + y; } + private: + int & y; public: __lambda_10_13(int & _y) : y{_y} {} diff --git a/tests/LambdaHandler4Test.expect b/tests/LambdaHandler4Test.expect index 23833de9..99c1f186 100644 --- a/tests/LambdaHandler4Test.expect +++ b/tests/LambdaHandler4Test.expect @@ -6,13 +6,14 @@ class Foo class __lambda_6_18 { - Foo * __this; public: inline /*constexpr */ void operator()() const { __this->Get(); } + private: + Foo * __this; public: __lambda_6_18(Foo * _this) : __this{_this} @@ -24,13 +25,14 @@ class Foo class __lambda_10_18 { - Foo * __this; public: inline /*constexpr */ void operator()() const { __this->Get(); } + private: + Foo * __this; public: __lambda_10_18(Foo * _this) : __this{_this} @@ -42,13 +44,14 @@ class Foo class __lambda_14_18 { - Foo __this; public: inline /*constexpr */ void operator()() const { (&__this)->Get(); } + private: + Foo __this; public: __lambda_14_18(Foo _this) : __this{_this} @@ -88,13 +91,14 @@ struct X class __lambda_35_9 { - X * __this; public: inline /*constexpr */ int operator()() const { return __this->operator()(__this->x + __this->y); } + private: + X * __this; public: __lambda_35_9(X * _this) : __this{_this} diff --git a/tests/LambdaHandler5Test.expect b/tests/LambdaHandler5Test.expect index 2292536d..46d8ef62 100644 --- a/tests/LambdaHandler5Test.expect +++ b/tests/LambdaHandler5Test.expect @@ -9,7 +9,7 @@ int main() } using retType_4_5 = auto (*)() -> void; - inline /*constexpr */ operator retType_4_5 () const + inline /*constexpr */ operator retType_4_5 () const noexcept { return __invoke; }; @@ -33,7 +33,7 @@ int main() } using retType_7_5 = auto (*)() -> void; - inline /*constexpr */ operator retType_7_5 () const + inline /*constexpr */ operator retType_7_5 () const noexcept { return __invoke; }; @@ -60,7 +60,7 @@ int main() } using retType_13_5 = void (*)(int &, int &); - inline /*constexpr */ operator retType_13_5 () const + inline /*constexpr */ operator retType_13_5 () const noexcept { return __invoke; }; diff --git a/tests/LambdaHandler6Test.expect b/tests/LambdaHandler6Test.expect index 873f4c67..53285d0a 100644 --- a/tests/LambdaHandler6Test.expect +++ b/tests/LambdaHandler6Test.expect @@ -5,14 +5,15 @@ int main() class __lambda_5_5 { - int & l1; - int & l2; public: inline /*constexpr */ void operator()() const { l1 = 2 * l2; } + private: + int & l1; + int & l2; public: __lambda_5_5(int & _l1, int & _l2) : l1{_l1} , l2{_l2} diff --git a/tests/LambdaHandler7Test.expect b/tests/LambdaHandler7Test.expect index 59d190da..537e600e 100644 --- a/tests/LambdaHandler7Test.expect +++ b/tests/LambdaHandler7Test.expect @@ -14,7 +14,7 @@ int main() } using retType_8_57 = int (*)(int, int); - inline /*constexpr */ operator retType_8_57 () const + inline /*constexpr */ operator retType_8_57 () const noexcept { return __invoke; }; diff --git a/tests/LambdaHandler8Test.expect b/tests/LambdaHandler8Test.expect index ccf3e6fc..f2ad2a29 100644 --- a/tests/LambdaHandler8Test.expect +++ b/tests/LambdaHandler8Test.expect @@ -19,13 +19,14 @@ int get(int & v) class __lambda_9_18 { - int & v; public: inline /*constexpr */ int operator()() const { return v; } + private: + int & v; public: __lambda_9_18(int & _v) : v{_v} {} diff --git a/tests/LambdaHandlerCaptureLessTest.cerr b/tests/LambdaHandlerCaptureLessTest.cerr index 931656cf..12fc4242 100644 --- a/tests/LambdaHandlerCaptureLessTest.cerr +++ b/tests/LambdaHandlerCaptureLessTest.cerr @@ -1,10 +1,10 @@ .tmp.cpp:9:5: error: templates cannot be declared inside of a local class template ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.tmp.cpp:36:5: error: templates cannot be declared inside of a local class +.tmp.cpp:35:5: error: templates cannot be declared inside of a local class template ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.tmp.cpp:54:88: error: no type named 'retType_4_28' in '__lambda_4_28' +.tmp.cpp:53:88: error: no type named 'retType_4_28' in '__lambda_4_28' FuncPtr_4 fp = static_cast(__lambda_4_28.operator __lambda_4_28::retType_4_28()); ~~~~~~~~~~~~~~~^ 3 errors generated. diff --git a/tests/LambdaHandlerCaptureLessTest.expect b/tests/LambdaHandlerCaptureLessTest.expect index 6c2c5db9..1ef2da8a 100644 --- a/tests/LambdaHandlerCaptureLessTest.expect +++ b/tests/LambdaHandlerCaptureLessTest.expect @@ -12,7 +12,6 @@ int main() return a + b; } - /* First instantiated from: LambdaHandlerCaptureLessTest.cpp:4 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline /*constexpr */ int operator()(int a, char b) const @@ -26,7 +25,7 @@ int main() #ifdef INSIGHTS_USE_TEMPLATE using retType_4_28 = int (*)(int, char); template<> - inline /*constexpr */ operator retType_4_28 () const + inline /*constexpr */ operator retType_4_28 () const noexcept { return __invoke; } diff --git a/tests/LambdaHandlerInFunctionTest.expect b/tests/LambdaHandlerInFunctionTest.expect index 30495fcb..d0664f74 100644 --- a/tests/LambdaHandlerInFunctionTest.expect +++ b/tests/LambdaHandlerInFunctionTest.expect @@ -35,7 +35,7 @@ int main() } using retType_10_10 = auto (*)() -> void; - inline /*constexpr */ operator retType_10_10 () const + inline /*constexpr */ operator retType_10_10 () const noexcept { return __invoke; }; @@ -61,7 +61,7 @@ int main() } using retType_12_10 = auto (*)() -> int; - inline /*constexpr */ operator retType_12_10 () const + inline /*constexpr */ operator retType_12_10 () const noexcept { return __invoke; }; diff --git a/tests/LambdaHandlerTest.cerr b/tests/LambdaHandlerTest.cerr index da34caa9..4054b49a 100644 --- a/tests/LambdaHandlerTest.cerr +++ b/tests/LambdaHandlerTest.cerr @@ -1,16 +1,16 @@ -.tmp.cpp:159:5: error: templates cannot be declared inside of a local class +.tmp.cpp:164:5: error: templates cannot be declared inside of a local class template ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.tmp.cpp:183:11: error: no matching member function for call to 'operator()' +.tmp.cpp:189:11: error: no matching member function for call to 'operator()' lambda7.operator()(foo, 2); ~~~~~~~~^~~~~~~~~~ -.tmp.cpp:189:5: error: templates cannot be declared inside of a local class +.tmp.cpp:194:5: error: templates cannot be declared inside of a local class template ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.tmp.cpp:207:5: error: templates cannot be declared inside of a local class +.tmp.cpp:213:5: error: templates cannot be declared inside of a local class template ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.tmp.cpp:231:12: error: no matching member function for call to 'operator()' +.tmp.cpp:238:12: error: no matching member function for call to 'operator()' lambda73.operator()(foo, b, 44); ~~~~~~~~~^~~~~~~~~~ 5 errors generated. diff --git a/tests/LambdaHandlerTest.expect b/tests/LambdaHandlerTest.expect index 6063d8b5..e57f4d70 100644 --- a/tests/LambdaHandlerTest.expect +++ b/tests/LambdaHandlerTest.expect @@ -8,13 +8,14 @@ class Bar class __lambda_8_18 { - Bar * __this; public: inline /*constexpr */ void operator()() const { printf("%d\n", __this->a); } + private: + Bar * __this; public: __lambda_8_18(Bar * _this) : __this{_this} @@ -37,13 +38,14 @@ int main() class __lambda_20_19 { - int & foo; public: inline /*constexpr */ void operator()() const { printf("%d\n", foo); } + private: + int & foo; public: __lambda_20_19(int & _foo) : foo{_foo} {} @@ -62,7 +64,7 @@ int main() } using retType_24_20 = void (*)(); - inline /*constexpr */ operator retType_24_20 () const + inline /*constexpr */ operator retType_24_20 () const noexcept { return __invoke; }; @@ -81,7 +83,6 @@ int main() class __lambda_28_20 { - int & foo; public: inline /*constexpr */ int operator()() { @@ -89,6 +90,8 @@ int main() return foo; } + private: + int & foo; public: __lambda_28_20(int & _foo) : foo{_foo} {} @@ -100,7 +103,6 @@ int main() class __lambda_32_20 { - int & foo; public: inline /*constexpr */ int operator()(int x) const { @@ -108,6 +110,8 @@ int main() return foo + x; } + private: + int & foo; public: __lambda_32_20(int & _foo) : foo{_foo} {} @@ -118,7 +122,6 @@ int main() class __lambda_34_20 { - int & foo; public: inline /*constexpr */ int operator()(const int x) const { @@ -126,6 +129,8 @@ int main() return foo + x; } + private: + int & foo; public: __lambda_34_20(int & _foo) : foo{_foo} {} @@ -136,7 +141,6 @@ int main() class __lambda_36_20 { - int & foo; public: inline /*constexpr */ int operator()(int & x, int b) const { @@ -144,6 +148,8 @@ int main() return foo + x + b; } + private: + int & foo; public: __lambda_36_20(int & _foo) : foo{_foo} {} @@ -154,7 +160,6 @@ int main() class __lambda_38_20 { - int & foo; public: template inline /*constexpr */ auto operator()(int & x, type_parameter_0_0 b) const @@ -163,7 +168,6 @@ int main() return foo + x + b; } - /* First instantiated from: LambdaHandlerTest.cpp:39 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline /*constexpr */ int operator()(int & x, int b) const @@ -173,6 +177,8 @@ int main() } #endif + private: + int & foo; public: __lambda_38_20(int & _foo) : foo{_foo} {} @@ -184,7 +190,6 @@ int main() class __lambda_41_21 { - int & foo; public: template inline /*constexpr */ auto operator()(int & x, const type_parameter_0_0 & b) const @@ -192,6 +197,8 @@ int main() printf("%d\n", foo + x); return foo + x + b; } + private: + int & foo; public: __lambda_41_21(int & _foo) : foo{_foo} {} @@ -202,7 +209,6 @@ int main() class __lambda_43_21 { - int & foo; public: template inline /*constexpr */ auto operator()(int & x, const type_parameter_0_0 & b, const type_parameter_0_1 c) const @@ -211,7 +217,6 @@ int main() return foo + x + b + c; } - /* First instantiated from: LambdaHandlerTest.cpp:44 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline /*constexpr */ int operator()(int & x, const int & b, const int c) const @@ -221,6 +226,8 @@ int main() } #endif + private: + int & foo; public: __lambda_43_21(int & _foo) : foo{_foo} {} @@ -232,8 +239,6 @@ int main() class __lambda_46_20 { - int foo; - int b; public: inline /*constexpr */ int operator()(int & x, int bb) const { @@ -241,6 +246,9 @@ int main() return foo + x + bb; } + private: + int foo; + int b; public: __lambda_46_20(int _foo, int _b) : foo{_foo} , b{_b} @@ -252,8 +260,6 @@ int main() class __lambda_48_20 { - int foo; - int b; public: inline /*constexpr */ int operator()(int & x, int bb) const noexcept { @@ -261,6 +267,9 @@ int main() return foo + x + bb; } + private: + int foo; + int b; public: __lambda_48_20(int _foo, int _b) : foo{_foo} , b{_b} diff --git a/tests/LambdaHandlerVLA2Test.cerr b/tests/LambdaHandlerVLA2Test.cerr index c6a7758d..4fcf4f2f 100644 --- a/tests/LambdaHandlerVLA2Test.cerr +++ b/tests/LambdaHandlerVLA2Test.cerr @@ -1,22 +1,22 @@ -.tmp.cpp:7:5: warning: declaration does not declare anything [-Wmissing-declarations] +.tmp.cpp:14:5: warning: declaration does not declare anything [-Wmissing-declarations] unsigned long; ^~~~~~~~~~~~~ -.tmp.cpp:8:20: error: reference to local variable 'n' declared in enclosing function 'Test' +.tmp.cpp:15:20: error: reference to local variable 'n' declared in enclosing function 'Test' char (&buffer)[n]; ^ .tmp.cpp:1:15: note: 'n' declared here void Test(int n) ^ -.tmp.cpp:8:12: error: fields must have a constant size: 'variable length array in structure' extension will never be supported +.tmp.cpp:15:12: error: fields must have a constant size: 'variable length array in structure' extension will never be supported char (&buffer)[n]; ^ -.tmp.cpp:15:42: error: reference to local variable 'n' declared in enclosing function 'Test' +.tmp.cpp:16:42: error: reference to local variable 'n' declared in enclosing function 'Test' public: __lambda_6_5(char (&_buffer)[n]) ^ .tmp.cpp:1:15: note: 'n' declared here void Test(int n) ^ -.tmp.cpp:19:5: error: no matching constructor for initialization of 'class __lambda_6_5' +.tmp.cpp:20:5: error: no matching constructor for initialization of 'class __lambda_6_5' } __lambda_6_5{buffer}; ^ ~~~~~~~~ .tmp.cpp:5:9: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'char [n]' to 'const __lambda_6_5' for 1st argument @@ -25,10 +25,10 @@ void Test(int n) .tmp.cpp:5:9: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'char [n]' to '__lambda_6_5' for 1st argument class __lambda_6_5 ^ -.tmp.cpp:15:13: note: candidate constructor not viable: no known conversion from 'char [n]' to 'char (&)[n]' for 1st argument +.tmp.cpp:16:13: note: candidate constructor not viable: no known conversion from 'char [n]' to 'char (&)[n]' for 1st argument public: __lambda_6_5(char (&_buffer)[n]) ^ -.tmp.cpp:21:15: error: cannot use dot operator on a type +.tmp.cpp:22:15: error: cannot use dot operator on a type __lambda_6_5.operator()(1, 2); ^ 1 warning and 5 errors generated. diff --git a/tests/LambdaHandlerVLA2Test.expect b/tests/LambdaHandlerVLA2Test.expect index 4d0617ea..8beb67aa 100644 --- a/tests/LambdaHandlerVLA2Test.expect +++ b/tests/LambdaHandlerVLA2Test.expect @@ -4,14 +4,15 @@ void Test(int n) class __lambda_6_5 { - unsigned long; - char (&buffer)[n]; public: inline /*constexpr */ bool operator()(int i, int x) const { return static_cast(buffer[i]) > static_cast(buffer[x]); } + private: + unsigned long; + char (&buffer)[n]; public: __lambda_6_5(char (&_buffer)[n]) : buffer{_buffer} {} diff --git a/tests/LambdaHandlerVLATest.expect b/tests/LambdaHandlerVLATest.expect index 71f406cd..2c45a1cd 100644 --- a/tests/LambdaHandlerVLATest.expect +++ b/tests/LambdaHandlerVLATest.expect @@ -38,14 +38,15 @@ struct SA<2> class __lambda_40_8 { - unsigned long; - float (&e)[this->nt]; public: inline /*constexpr */ bool operator()(int i, int j) const { return e[i] < e[j]; } + private: + unsigned long; + float (&e)[this->nt]; public: __lambda_40_8(float (&_e)[this->nt]) : e{_e} {} diff --git a/tests/LambdaImplicitCaptureTest.expect b/tests/LambdaImplicitCaptureTest.expect index 3b944ca2..0330fc7c 100644 --- a/tests/LambdaImplicitCaptureTest.expect +++ b/tests/LambdaImplicitCaptureTest.expect @@ -6,7 +6,6 @@ int main() class __lambda_7_14 { - int x; public: inline /*constexpr */ int operator()() { @@ -14,6 +13,8 @@ int main() return x; } + private: + int x; public: __lambda_7_14(int _x) : x{_x} {} diff --git a/tests/LambdaInLamdaTest.expect b/tests/LambdaInLamdaTest.expect index e24c7007..4cf9ad49 100644 --- a/tests/LambdaInLamdaTest.expect +++ b/tests/LambdaInLamdaTest.expect @@ -4,20 +4,20 @@ int main() class __lambda_4_5 { - char & buffer; public: inline /*constexpr */ void operator()() const { class __lambda_6_9 { - char & buffer; public: inline /*constexpr */ void operator()() const { buffer = 2; } + private: + char & buffer; public: __lambda_6_9(char & _buffer) : buffer{_buffer} {} @@ -27,6 +27,8 @@ int main() __lambda_6_9.operator()(); } + private: + char & buffer; public: __lambda_4_5(char & _buffer) : buffer{_buffer} {} diff --git a/tests/LambdaInVarDeclTest.expect b/tests/LambdaInVarDeclTest.expect index b7ff0e6f..aa739769 100644 --- a/tests/LambdaInVarDeclTest.expect +++ b/tests/LambdaInVarDeclTest.expect @@ -11,13 +11,14 @@ int main() class __lambda_6_17 { - char & c; public: inline /*constexpr */ char operator()() const { return c; } + private: + char & c; public: __lambda_6_17(char & _c) : c{_c} {} diff --git a/tests/LambdaPackExpansionTest.expect b/tests/LambdaPackExpansionTest.expect index 2e70ede4..157b08d9 100644 --- a/tests/LambdaPackExpansionTest.expect +++ b/tests/LambdaPackExpansionTest.expect @@ -38,17 +38,18 @@ void f2(int __args0, int __args1, int __args2, int __ar class __lambda_19_15 { - int __args0; - int __args1; - int __args2; - int __args3; - int __args4; public: inline /*constexpr */ int operator()() const { return g(__args0, __args1, __args2, __args3, __args4); } + private: + int __args0; + int __args1; + int __args2; + int __args3; + int __args4; public: __lambda_19_15(int ___args0, int ___args1, int ___args2, int ___args3, int ___args4) : __args0{___args0} , __args1{___args1} diff --git a/tests/LambdaWithFunctionPointerTest.expect b/tests/LambdaWithFunctionPointerTest.expect index 12a7c192..36c4c8b9 100644 --- a/tests/LambdaWithFunctionPointerTest.expect +++ b/tests/LambdaWithFunctionPointerTest.expect @@ -10,7 +10,6 @@ class __lambda_3_12 return fp(a); } - /* First instantiated from: LambdaWithFunctionPointerTest.cpp:7 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline /*constexpr */ int operator()(int (*fp)(int), int a) const @@ -41,7 +40,6 @@ class __lambda_5_10 return a; } - /* First instantiated from: LambdaWithFunctionPointerTest.cpp:7 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline /*constexpr */ int operator()(int a) const @@ -55,7 +53,7 @@ class __lambda_5_10 #ifdef INSIGHTS_USE_TEMPLATE using retType_5_10 = int (*)(int); template<> - inline /*constexpr */ operator retType_5_10 () const + inline /*constexpr */ operator retType_5_10 () const noexcept { return __invoke; } diff --git a/tests/MemberExprTemplateTest.expect b/tests/MemberExprTemplateTest.expect index 22b4dfa0..b2e7e310 100644 --- a/tests/MemberExprTemplateTest.expect +++ b/tests/MemberExprTemplateTest.expect @@ -30,7 +30,6 @@ class __lambda_10_5 { - X & x; public: inline /*constexpr */ void operator()() const { @@ -38,6 +37,8 @@ x.ff(17, 2, 55.5); } + private: + X & x; public: __lambda_10_5(X & _x) : x{_x} {} diff --git a/tests/MultipleLambdasInOneLineTest.expect b/tests/MultipleLambdasInOneLineTest.expect index bf00031a..60809ac2 100644 --- a/tests/MultipleLambdasInOneLineTest.expect +++ b/tests/MultipleLambdasInOneLineTest.expect @@ -12,7 +12,7 @@ int main() } using retType_5_3 = void (*)(); - inline /*constexpr */ operator retType_5_3 () const + inline /*constexpr */ operator retType_5_3 () const noexcept { return __invoke; }; @@ -36,7 +36,7 @@ int main() } using retType_5_33 = void (*)(); - inline /*constexpr */ operator retType_5_33 () const + inline /*constexpr */ operator retType_5_33 () const noexcept { return __invoke; }; diff --git a/tests/NonTypeTemplateParameterPackTest.cerr b/tests/NonTypeTemplateParameterPackTest.cerr index 2c9b2415..60e1e806 100644 --- a/tests/NonTypeTemplateParameterPackTest.cerr +++ b/tests/NonTypeTemplateParameterPackTest.cerr @@ -1,10 +1,3 @@ -.tmp.cpp:156:27: error: no template named 'Map'; did you mean 'Test::Map'? - Test::Map a = Map(); - ^~~ - Test::Map -.tmp.cpp:124:9: note: 'Test::Map' declared here - class Map - ^ .tmp.cpp:156:41: error: use of undeclared identifier 'my_array'; did you mean 'Test::my_array'? Test::Map a = Map(); ^~~~~~~~ @@ -12,11 +5,7 @@ .tmp.cpp:106:9: note: 'Test::my_array' declared here class my_array ^ -.tmp.cpp:156:41: error: no template named 'my_array'; did you mean 'Test::my_array'? +.tmp.cpp:156:41: error: use of undeclared identifier 'my_array' Test::Map a = Map(); - ^~~~~~~~ - Test::my_array -.tmp.cpp:106:9: note: 'Test::my_array' declared here - class my_array - ^ -3 errors generated. + ^ +2 errors generated. diff --git a/tests/RangeForStmtHandlerTest.expect b/tests/RangeForStmtHandlerTest.expect index 0e797919..a57837bf 100644 --- a/tests/RangeForStmtHandlerTest.expect +++ b/tests/RangeForStmtHandlerTest.expect @@ -10,13 +10,14 @@ struct A class __lambda_10_38 { - int & i; public: inline /*constexpr */ int operator()() const { return ++i; } + private: + int & i; public: __lambda_10_38(int & _i) : i{_i} {} @@ -42,13 +43,14 @@ struct B class __lambda_22_38 { - int & i; public: inline /*constexpr */ int operator()() const { return ++i; } + private: + int & i; public: __lambda_22_38(int & _i) : i{_i} {} diff --git a/tests/ReplaceClangNamespaceTest.expect b/tests/ReplaceClangNamespaceTest.expect index 6fb8ce84..6bd17de8 100644 --- a/tests/ReplaceClangNamespaceTest.expect +++ b/tests/ReplaceClangNamespaceTest.expect @@ -19,7 +19,7 @@ int main() } using retType_11_5 = void (*)(); - inline /*constexpr */ operator retType_11_5 () const + inline /*constexpr */ operator retType_11_5 () const noexcept { return __invoke; }; diff --git a/tests/SizeOfPackExprTest.expect b/tests/SizeOfPackExprTest.expect index 4b42621d..9b1d2458 100644 --- a/tests/SizeOfPackExprTest.expect +++ b/tests/SizeOfPackExprTest.expect @@ -8,7 +8,6 @@ auto forward(F f, Types &&...args) { return sizeof...(args); } -/* First instantiated from: SizeOfPackExprTest.cpp:12 */ #ifdef INSIGHTS_USE_TEMPLATE template<> unsigned long forward(void (*f)(int, int, int), int && __args1, int && __args2, int && __args3) diff --git a/tests/StaticInLambdaTest.expect b/tests/StaticInLambdaTest.expect index f4ea4c4e..304be6ff 100644 --- a/tests/StaticInLambdaTest.expect +++ b/tests/StaticInLambdaTest.expect @@ -104,7 +104,7 @@ int main() } using retType_52_14 = Bingleton (*)(bool); - inline /*constexpr */ operator retType_52_14 () const + inline /*constexpr */ operator retType_52_14 () const noexcept { return __invoke; }; @@ -161,7 +161,7 @@ int main() } using retType_62_14 = Bingleton *(*)(bool); - inline /*constexpr */ operator retType_62_14 () const + inline /*constexpr */ operator retType_62_14 () const noexcept { return __invoke; }; diff --git a/tests/StructuredBindingsHandler3Test.cerr b/tests/StructuredBindingsHandler3Test.cerr index a7ae02b6..e8369266 100644 --- a/tests/StructuredBindingsHandler3Test.cerr +++ b/tests/StructuredBindingsHandler3Test.cerr @@ -27,12 +27,6 @@ std::tuple_element<1, constant::Q>::type b = constant::get<1UL>(constant::__q17) .tmp.cpp:103:65: error: use of undeclared identifier 'conststd' std::tuple_element<2, constant::Q>::type c = constant::get<2UL>(conststd::tuple_element<0, constant::Q>::type && a = constant::get<0UL>(constant::); ^ -.tmp.cpp:103:103: error: expected '(' for function-style cast or type construction -std::tuple_element<2, constant::Q>::type c = constant::get<2UL>(conststd::tuple_element<0, constant::Q>::type && a = constant::get<0UL>(constant::); - ~~~~~~~~~~~^ -.tmp.cpp:103:106: error: no member named 'type' in the global namespace -std::tuple_element<2, constant::Q>::type c = constant::get<2UL>(conststd::tuple_element<0, constant::Q>::type && a = constant::get<0UL>(constant::); - ~~^ .tmp.cpp:103:147: error: expected unqualified-id std::tuple_element<2, constant::Q>::type c = constant::get<2UL>(conststd::tuple_element<0, constant::Q>::type && a = constant::get<0UL>(constant::); ^ @@ -81,5 +75,17 @@ ntstd::tuple_element<1, constant::Q>::type && b = constant::get<1UL>(constant::) .tmp.cpp:50:33: note: candidate function template not viable: no known conversion from 'constant::Q' to 'constant::Q &&' for 1st argument template constexpr int get(Q &&) { return N * N; } ^ +.tmp.cpp:124:52: error: no matching function for call to 'get' + std::tuple_element<1, constant::Q>::type b = constant::get<1UL>(__q26); + ^~~~~~~~~~~~~~~~~~ +.tmp.cpp:50:33: note: candidate function template not viable: no known conversion from 'constant::Q' to 'constant::Q &&' for 1st argument + template constexpr int get(Q &&) { return N * N; } + ^ +.tmp.cpp:125:52: error: no matching function for call to 'get' + std::tuple_element<2, constant::Q>::type c = constant::get<2UL>(__q26); + ^~~~~~~~~~~~~~~~~~ +.tmp.cpp:50:33: note: candidate function template not viable: no known conversion from 'constant::Q' to 'constant::Q &&' for 1st argument + template constexpr int get(Q &&) { return N * N; } + ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. diff --git a/tests/StructuredBindingsHandler5Test.expect b/tests/StructuredBindingsHandler5Test.expect index b7287e66..f44f0d00 100644 --- a/tests/StructuredBindingsHandler5Test.expect +++ b/tests/StructuredBindingsHandler5Test.expect @@ -71,7 +71,6 @@ class Point } - /* First instantiated from: StructuredBindingsHandler5Test.cpp:64 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline constexpr double & get<0>() noexcept @@ -89,7 +88,6 @@ class Point #endif - /* First instantiated from: StructuredBindingsHandler5Test.cpp:64 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline constexpr double get<1>() noexcept @@ -116,7 +114,6 @@ class Point } - /* First instantiated from: StructuredBindingsHandler5Test.cpp:73 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline constexpr const double & get<0>() const noexcept @@ -134,7 +131,6 @@ class Point #endif - /* First instantiated from: StructuredBindingsHandler5Test.cpp:73 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline constexpr double get<1>() const noexcept diff --git a/tests/StructuredBindingsHandler6Test.expect b/tests/StructuredBindingsHandler6Test.expect index e162811b..dd754681 100644 --- a/tests/StructuredBindingsHandler6Test.expect +++ b/tests/StructuredBindingsHandler6Test.expect @@ -80,7 +80,6 @@ class Point } - /* First instantiated from: StructuredBindingsHandler6Test.cpp:58 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline constexpr double get<0>() const noexcept @@ -98,7 +97,6 @@ class Point #endif - /* First instantiated from: StructuredBindingsHandler6Test.cpp:58 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline constexpr double get<1>() const noexcept diff --git a/tests/StructuredBindingsHandler7Test.expect b/tests/StructuredBindingsHandler7Test.expect index 0e38e099..25278422 100644 --- a/tests/StructuredBindingsHandler7Test.expect +++ b/tests/StructuredBindingsHandler7Test.expect @@ -4,7 +4,6 @@ int main() class __lambda_4_5 { - char (&buffer)[2]; public: inline /*constexpr */ void operator()() const { @@ -13,6 +12,8 @@ int main() char& b = __buffer5[1]; } + private: + char (&buffer)[2]; public: __lambda_4_5(char (&_buffer)[2]) : buffer{_buffer} {} diff --git a/tests/TemplateArgumentsTest.expect b/tests/TemplateArgumentsTest.expect index 2189f497..0ed3096e 100644 --- a/tests/TemplateArgumentsTest.expect +++ b/tests/TemplateArgumentsTest.expect @@ -10,7 +10,6 @@ static inline decltype(auto) Normalize(const T& arg) } } -/* First instantiated from: TemplateArgumentsTest.cpp:16 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline char const (&Normalize(char const (&arg)[8]))[8] @@ -24,7 +23,6 @@ inline char const (&Normalize(char const (&arg)[8]))[8] #endif -/* First instantiated from: TemplateArgumentsTest.cpp:16 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline const int & Normalize(const int & arg) @@ -38,7 +36,6 @@ inline const int & Normalize(const int & arg) #endif -/* First instantiated from: TemplateArgumentsTest.cpp:16 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline const char * Normalize >(const std::basic_string & arg) diff --git a/tests/TemplateKeywordTest.cerr b/tests/TemplateKeywordTest.cerr index 2ad521c4..c32e7a84 100644 --- a/tests/TemplateKeywordTest.cerr +++ b/tests/TemplateKeywordTest.cerr @@ -1,17 +1,4 @@ .tmp.cpp:65:42: error: use of undeclared identifier 'result' compose<>::to<>::result a = result(); ^ -.tmp.cpp:65:52: error: expected '(' for function-style cast or type construction - compose<>::to<>::result a = result(); - ~~~^ -.tmp.cpp:65:54: error: expected unqualified-id - compose<>::to<>::result a = result(); - ^ -.tmp.cpp:65:53: error: expected ';' at end of declaration - compose<>::to<>::result a = result(); - ^ - ; -.tmp.cpp:65:58: error: expected unqualified-id - compose<>::to<>::result a = result(); - ^ -5 errors generated. +1 error generated. diff --git a/tests/TemplateMemberFunctionTest.expect b/tests/TemplateMemberFunctionTest.expect index 2cdbbb1c..c8604eba 100644 --- a/tests/TemplateMemberFunctionTest.expect +++ b/tests/TemplateMemberFunctionTest.expect @@ -69,7 +69,7 @@ int main() } using retType_33_10 = void (*)(); - inline /*constexpr */ operator retType_33_10 () const + inline /*constexpr */ operator retType_33_10 () const noexcept { return __invoke; }; @@ -94,7 +94,7 @@ int main() } using retType_35_18 = void (*)(); - inline /*constexpr */ operator retType_35_18 () const + inline /*constexpr */ operator retType_35_18 () const noexcept { return __invoke; }; @@ -119,7 +119,7 @@ int main() } using retType_37_21 = void (*)(); - inline /*constexpr */ operator retType_37_21 () const + inline /*constexpr */ operator retType_37_21 () const noexcept { return __invoke; }; diff --git a/tests/TemplatesWithAutoAndLambdaTest.cerr b/tests/TemplatesWithAutoAndLambdaTest.cerr index 8bb94146..4c62a5e9 100644 --- a/tests/TemplatesWithAutoAndLambdaTest.cerr +++ b/tests/TemplatesWithAutoAndLambdaTest.cerr @@ -1,13 +1,13 @@ .tmp.cpp:29:5: error: templates cannot be declared inside of a local class template ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.tmp.cpp:38:32: error: no function template matches function template specialization 'operator()' +.tmp.cpp:37:32: error: no function template matches function template specialization 'operator()' inline /*constexpr */ void operator()(const double & arg) const ^ -.tmp.cpp:48:32: error: no function template matches function template specialization 'operator()' +.tmp.cpp:46:32: error: no function template matches function template specialization 'operator()' inline /*constexpr */ void operator()(const std::basic_string & arg) const ^ -.tmp.cpp:55:5: error: templates cannot be declared inside of a local class +.tmp.cpp:53:5: error: templates cannot be declared inside of a local class template ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 4 errors generated. diff --git a/tests/TemplatesWithAutoAndLambdaTest.expect b/tests/TemplatesWithAutoAndLambdaTest.expect index d287c5aa..1ffecda6 100644 --- a/tests/TemplatesWithAutoAndLambdaTest.expect +++ b/tests/TemplatesWithAutoAndLambdaTest.expect @@ -32,7 +32,6 @@ void print<32, char [3], double, std::basic_string >(char const (&arg1)[3] std::operator<<(std::cout, ' ') << arg; } - /* First instantiated from: TemplatesWithAutoAndLambdaTest.cpp:16 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline /*constexpr */ void operator()(const double & arg) const @@ -42,7 +41,6 @@ void print<32, char [3], double, std::basic_string >(char const (&arg1)[3] #endif - /* First instantiated from: TemplatesWithAutoAndLambdaTest.cpp:16 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline /*constexpr */ void operator()(const std::basic_string & arg) const diff --git a/tests/VarTemplateWithLambdaTest.cerr b/tests/VarTemplateWithLambdaTest.cerr index 29fc35bd..1fbc6dab 100644 --- a/tests/VarTemplateWithLambdaTest.cerr +++ b/tests/VarTemplateWithLambdaTest.cerr @@ -1,19 +1,19 @@ -.tmp.cpp:20:32: error: no function template matches function template specialization 'operator()' +.tmp.cpp:19:32: error: no function template matches function template specialization 'operator()' inline /*constexpr */ double operator()(int x) const ^ .tmp.cpp:12:30: note: candidate template ignored: failed template argument deduction inline /*constexpr */ auto operator()(type_parameter_0_0 x) const ^ -.tmp.cpp:55:29: error: no function template matches function template specialization 'operator()' +.tmp.cpp:53:29: error: no function template matches function template specialization 'operator()' inline /*constexpr */ int operator()(int x) const ^ -.tmp.cpp:47:30: note: candidate template ignored: failed template argument deduction +.tmp.cpp:46:30: note: candidate template ignored: failed template argument deduction inline /*constexpr */ auto operator()(type_parameter_0_0 x) const ^ -.tmp.cpp:49:16: warning: too many braces around scalar initializer [-Wmany-braces-around-scalar-init] +.tmp.cpp:48:16: warning: too many braces around scalar initializer [-Wmany-braces-around-scalar-init] return int{{x}}; ^~~ -.tmp.cpp:82:46: note: in instantiation of function template specialization '__lambda_8_29::operator()' requested here +.tmp.cpp:80:46: note: in instantiation of function template specialization '__lambda_8_29::operator()' requested here return static_cast(funcBraced.operator()(x)); ^ 1 warning and 2 errors generated. diff --git a/tests/VarTemplateWithLambdaTest.expect b/tests/VarTemplateWithLambdaTest.expect index d7d581d4..6e58e42f 100644 --- a/tests/VarTemplateWithLambdaTest.expect +++ b/tests/VarTemplateWithLambdaTest.expect @@ -14,7 +14,6 @@ class __lambda_5_23 return double(x); } - /* First instantiated from: VarTemplateWithLambdaTest.cpp:12 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline /*constexpr */ double operator()(int x) const @@ -49,7 +48,6 @@ class __lambda_8_29 return int{{x}}; } - /* First instantiated from: VarTemplateWithLambdaTest.cpp:17 */ #ifdef INSIGHTS_USE_TEMPLATE template<> inline /*constexpr */ int operator()(int x) const From 06e3bacd60daf2487bfaaa190e4e0cd6668ef825 Mon Sep 17 00:00:00 2001 From: Andreas Fertig Date: Wed, 2 Oct 2019 16:36:13 +0200 Subject: [PATCH 5/6] Added prepare release script. fsd --- scripts/prepare-release.py | 100 +++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100755 scripts/prepare-release.py diff --git a/scripts/prepare-release.py b/scripts/prepare-release.py new file mode 100755 index 00000000..9b74ebff --- /dev/null +++ b/scripts/prepare-release.py @@ -0,0 +1,100 @@ +#! /usr/bin/env python3 +# +# +# C++ Insights, copyright (C) by Andreas Fertig +# Distributed under an MIT license. See LICENSE for details +# +#------------------------------------------------------------------------------ + +import re +import os +import subprocess +#------------------------------------------------------------------------------ + +def main(): + oldClangDevel = '9' + newClangDevel = '10' + oldClangStable = '8' + newClangStable = oldClangDevel + oldInsightsVersion = '0.4' + newInsightsVersion = '0.5' + + print('Preparing a new release:') + print(' Current Clang development : %s' %(oldClangDevel)) + print(' New Clang development : %s' %(newClangDevel)) + print(' Current Clang stable : %s' %(oldClangStable)) + print(' New Clang stable : %s' %(newClangStable)) + print(' Current Insights version : %s' %(oldInsightsVersion)) + print(' New Insights version : %s' %(newInsightsVersion)) + + + print(' - Updating .travis.yml') + travis = open('.travis.yml', 'r').read() + + regEx = re.compile('[clang|llvm]-([0-9]+)') +# regEx = re.compile('llvm-([0-9]+)', re.MULTILINE) + + travis = re.sub('(clang|llvm|clang\+\+|llvm-config|llvm-toolchain-bionic|clang-format|clang-tidy|llvm-toolchain-trusty)(-%s)' %(oldClangDevel), '\\1-%s' %(newClangDevel) , travis) + travis = re.sub('(clang|llvm|clang\+\+|llvm-config|llvm-toolchain-bionic|clang-format|clang-tidy|llvm-toolchain-trusty)(-%s)' %(oldClangStable), '\\1-%s' %(newClangStable) , travis) + travis = re.sub('(clang|Clang|llvm|LLVM) (%s)' %(oldClangStable), '\\1 %s' %(newClangStable) , travis) + travis = re.sub(r"(LLVM_VERSION=)('%s)" %(oldClangStable), r"\1'%s" %(newClangStable) , travis) + travis = re.sub(r"clang(%s)0" %(oldClangStable), r"clang%s0" %(newClangStable) , travis) + travis = re.sub(r"(llvm-toolchain-xenial)-(%s)" %(oldClangStable), r"\1-%s" %(newClangStable) , travis) +# travis = re.sub('([clang|llvm])(-[0-9]+)', r'\1-%s' %(newClangDevel) , travis) +# print regEx.sub(travis, r'\1', newClangDevel) +# m = regEx.findall(travis) + +# print(travis) + open('.travis.yml', 'w').write(travis) + + + print(' - Updating appveyor.yml') + appveyor = open('appveyor.yml', 'r').read() + appveyor = re.sub('(clang|llvm|clang\+\+|llvm-config|llvm-toolchain-bionic|clang-format|clang-tidy|llvm-toolchain-trusty)(-%s)' %(oldClangDevel), '\\1-%s' %(newClangDevel) , appveyor) + appveyor = re.sub('(clang|llvm|clang\+\+|llvm-config|llvm-toolchain-bionic|clang-format|clang-tidy|llvm-toolchain-trusty)(-%s)' %(oldClangStable), '\\1-%s' %(newClangStable) , appveyor) + appveyor = re.sub('(download)(/%s.)(0.0/llvm)' %(oldClangStable), '\\1/%s.\\3' %(newClangStable) , appveyor) + appveyor = re.sub(r"(LLVM_VERSION=)('%s)" %(oldClangStable), r"\1'%s" %(newClangStable) , appveyor) + open('appveyor.yml', 'w').write(appveyor) + + + print(' - Updating CMakeLists.txt') + cmake = open('CMakeLists.txt', 'r').read() + cmake = re.sub('(set\(INSIGHTS_MIN_LLVM_MAJOR_VERSION)( %s)\)' %(oldClangStable), '\\1 %s)' %(newClangStable) , cmake) + open('CMakeLists.txt', 'w').write(cmake) + + + print(' - Updating version.h %s -> %s' %(oldInsightsVersion, newInsightsVersion)) + version = open('version.h.in', 'r').read() + version = re.sub('(INSIGHTS_VERSION )"(.*)"', '\\1"%s"' %(newInsightsVersion) , version) + open('version.h.in', 'w').write(version) + + + print(' - Generating CHANGELOG.md') +# os.system('gren changelog --override --username=andreasfertig --repo=cppinsights %s...continous' %(oldInsightsVersion)) + + cmd = ['gren', 'changelog', '--override', '--username=andreasfertig', '--repo=cppinsights', '%s...continous' %(oldInsightsVersion)] + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + stdout, stderr = p.communicate() + + if 0 != p.returncode: + print('FAILED') + return 1 + + changeLog = open('CHANGELOG.md', 'r').read() + changeLog = re.sub('(## Continuous build.*?---)\n', '', changeLog, flags=re.DOTALL) + open('CHANGELOG.md', 'w').write(changeLog) + + print(' - Tagging v_%s' %(newInsightsVersion)) + + cppInsightsDockerBaseFile = '../cppinsights-docker-base/Dockerfile' + + print(' - Updating cppinsights-docker-base (%s)' %(cppInsightsDockerBaseFile)) + + dockerFile = open(cppInsightsDockerBaseFile, 'r').read() + dockerFile = re.sub('(ENV\s+CLANG_VERSION=)([0-9]+)', r'\g<1>%s' %(newClangStable), dockerFile) + open(cppInsightsDockerBaseFile, 'w').write(dockerFile) +#------------------------------------------------------------------------------ + +main() +#------------------------------------------------------------------------------ + From c0a63e8f63cda0e27d8fc14375ff5bdae827b7f6 Mon Sep 17 00:00:00 2001 From: Andreas Fertig Date: Fri, 18 Oct 2019 08:58:25 +0200 Subject: [PATCH 6/6] Switch to LLVM 9 and bump development version to 0.5. --- .travis.yml | 48 ++++++++++++++++++++++++------------------------ CMakeLists.txt | 2 +- appveyor.yml | 6 +++--- version.h.in | 2 +- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index cb3e5797..45278d4f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,15 +22,15 @@ jobs: # OSX clang 9 build - env: COMPILER='clang++' LLVM_CONFIG='llvm-config' LLVM_VERSION='9.0.0' COVERAGE='No' STATIC='No' DEBUG='No' UPLOAD='Yes' SKIP_TESTS='No' TIDY='No' SHACMD='shasum -a 256' os: osx - name: "Clang 8 @ macOS Release" + name: "Clang 9 @ macOS Release" osx_image: xcode11.2 compiler: clang - - env: COMPILER='clang++' LLVM_CONFIG='llvm-config' LLVM_VERSION='8.0.0' COVERAGE='Yes' STATIC='No' DEBUG='Yes' UPLOAD='No' SKIP_TESTS='No' TIDY='No' SHACMD='shasum -a 256' - os: osx - name: "Clang 8 @ macOS Code Coverage & Debug" - osx_image: xcode11.2 - compiler: clang + # - env: COMPILER='clang++' LLVM_CONFIG='llvm-config' LLVM_VERSION='9.0.0' COVERAGE='Yes' STATIC='No' DEBUG='Yes' UPLOAD='No' SKIP_TESTS='No' TIDY='No' SHACMD='shasum -a 256' + # os: osx + # name: "Clang 9 @ macOS Code Coverage & Debug" + # osx_image: xcode11.2 + # compiler: clang # Linux Clang Build - os: linux @@ -55,7 +55,7 @@ jobs: ssh_known_hosts: cppinsights.io before_install: - docker pull andreasfertig/cppinsights-builder - env: COMPILER='clang++-8' LLVM_CONFIG=/usr/bin/llvm-config-8 COVERAGE='No' DEPLOY='Yes' STATIC='Yes' DEBUG='No' UPLOAD='Yes' TIDY='No' SHACMD='sha256sum' + env: COMPILER='clang++-9' LLVM_CONFIG=/usr/bin/llvm-config-9 COVERAGE='No' DEPLOY='Yes' STATIC='Yes' DEBUG='No' UPLOAD='Yes' TIDY='No' SHACMD='sha256sum' # Linux g++ Build - os: linux @@ -69,38 +69,38 @@ jobs: - *all_llvm_current_packages env: COMPILER='g++-8' LLVM_CONFIG=${LLVM_CONFIG_CURRENT} COVERAGE='No' STATIC='No' DEBUG='No' TIDY='No' - # Linux g++ clang 8 build + # Linux g++ clang 9 build - os: linux - name: "GCC 8 / LLVM 8 @ Ubuntu" + name: "GCC 8 / LLVM 9 @ Ubuntu" compiler: gcc - addons: &clang80 + addons: &clang90 apt: packages: - g++-8 - - llvm-8-dev - - libclang-8-dev - - clang-format-8 - - clang-tidy-8 + - llvm-9-dev + - libclang-9-dev + - clang-format-9 + - clang-tidy-9 sources: - ubuntu-toolchain-r-test - - llvm-toolchain-xenial-8 - - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main' + - llvm-toolchain-xenial-9 + - sourceline: 'deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-9 main' key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' - env: COMPILER='g++-8' LLVM_CONFIG='/usr/bin/llvm-config-8' COVERAGE='No' STATIC='No' DEBUG='No' TIDY='No' + env: COMPILER='g++-8' LLVM_CONFIG='/usr/bin/llvm-config-9' COVERAGE='No' STATIC='No' DEBUG='No' TIDY='No' # Clang-tidy analysis - os: linux - name: "GCC 8 / LLVM 8 @ Ubuntu clang-tidy check" + name: "GCC 8 / LLVM 9 @ Ubuntu clang-tidy check" compiler: gcc - addons: *clang80 - env: COMPILER='g++-8' LLVM_CONFIG='/usr/bin/llvm-config-8' COVERAGE='No' STATIC='No' DEBUG='No' TIDY='Yes' + addons: *clang90 + env: COMPILER='g++-8' LLVM_CONFIG='/usr/bin/llvm-config-9' COVERAGE='No' STATIC='No' DEBUG='No' TIDY='Yes' # Clang-format check - os: linux - name: "GCC 8 / LLVM 8 @ Ubuntu clang-format check" + name: "GCC 8 / LLVM 9 @ Ubuntu clang-format check" compiler: gcc - addons: *clang80 - env: COMPILER='g++-8' LLVM_CONFIG='/usr/bin/llvm-config-8' COVERAGE='No' STATIC='No' DEBUG='No' TIDY='No' CFORMAT='Yes' CFORMAT_NAME='clang-format-8' + addons: *clang90 + env: COMPILER='g++-8' LLVM_CONFIG='/usr/bin/llvm-config-9' COVERAGE='No' STATIC='No' DEBUG='No' TIDY='No' CFORMAT='Yes' CFORMAT_NAME='clang-format-9' # Debug build with coverage - os: linux @@ -134,7 +134,7 @@ jobs: fi after_success: true before_deploy: true - env: COMPILER='clang++-8' LLVM_CONFIG=/usr/bin/llvm-config-8 COVERAGE='No' DEPLOY='No' STATIC='No' DEBUG='No' UPLOAD='No' TIDY='No' SHACMD='sha256sum' DOCKER_UPLOAD='Yes' + env: COMPILER='clang++-9' LLVM_CONFIG=/usr/bin/llvm-config-9 COVERAGE='No' DEPLOY='No' STATIC='No' DEBUG='No' UPLOAD='No' TIDY='No' SHACMD='sha256sum' DOCKER_UPLOAD='Yes' os: linux name: "Final deploy to DockerHub" diff --git a/CMakeLists.txt b/CMakeLists.txt index d3b153b2..eca7425b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ endif() set(INSIGHTS_LLVM_CONFIG "llvm-config" CACHE STRING "LLVM config executable to use") -set(INSIGHTS_MIN_LLVM_MAJOR_VERSION 8) +set(INSIGHTS_MIN_LLVM_MAJOR_VERSION 9) set(INSIGHTS_MIN_LLVM_VERSION ${INSIGHTS_MIN_LLVM_MAJOR_VERSION}.0) if(NOT DEFINED LLVM_VERSION_MAJOR) # used when build inside the clang tool/extra folder diff --git a/appveyor.yml b/appveyor.yml index 13692a45..76b61aac 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -8,12 +8,12 @@ install: - cmd: if not exist C:\llvm-bin\downloaded ( mkdir C:\llvm-bin && cd C:\llvm-bin && - (powershell Start-FileDownload "https://github.com/andreasfertig/cppinsights-compiler-binaries/releases/download/8.0.0/llvm+clang-8.0.0-win64-msvc-release.tar.xz" -FileName llvm.tar.xz) && + (powershell Start-FileDownload "https://github.com/andreasfertig/cppinsights-compiler-binaries/releases/download/9.0.0/llvm+clang-9.0.0-win64-msvc-release.tar.xz" -FileName llvm.tar.xz) && 7z x C:\llvm-bin\llvm.tar.xz && 7z x C:\llvm-bin\llvm.tar && del llvm.tar && echo "downloaded" > downloaded ) - - cmd: set PATH=%PATH%;C:\llvm-bin\llvm+clang-8.0.0-win64-msvc-release\bin + - cmd: set PATH=%PATH%;C:\llvm-bin\llvm+clang-9.0.0-win64-msvc-release\bin - cmd: echo PATH %PATH% - cmd: md c:\ciuploadtool - cmd: cd c:\ciuploadtool @@ -28,7 +28,7 @@ build_script: - cmd: mkdir "%APPVEYOR_BUILD_FOLDER%/build" - cmd: cd "%APPVEYOR_BUILD_FOLDER%/build" - cmd: clang++ --version - - cmd: cmake -G "Visual Studio 15 2017 Win64" -T LLVM -DINSIGHTS_STATIC=Yes -DINSIGHTS_LLVM_CONFIG=C:\llvm-bin\llvm+clang-8.0.0-win64-msvc-release\bin\llvm-config .. + - cmd: cmake -G "Visual Studio 15 2017 Win64" -T LLVM -DINSIGHTS_STATIC=Yes -DINSIGHTS_LLVM_CONFIG=C:\llvm-bin\llvm+clang-9.0.0-win64-msvc-release\bin\llvm-config .. - cmd: cmake --build . --config Release --target insights - cmd: cd Release diff --git a/version.h.in b/version.h.in index 1b3ee7a1..4d99754e 100644 --- a/version.h.in +++ b/version.h.in @@ -1,7 +1,7 @@ #ifndef INSIGHTS_VERSION_H #define INSIGHTS_VERSION_H -#define INSIGHTS_VERSION "0.4" +#define INSIGHTS_VERSION "0.5" #define GIT_REPO_URL "@GIT_REPO_URL@" #define GIT_COMMIT_HASH "@GIT_COMMIT_HASH@"