diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2018-04-04 09:07:16 +0200 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2018-04-04 08:08:39 +0000 |
commit | bfdcbf861fc06fc1616ac029e766276e61315b04 (patch) | |
tree | d450f492dbf7c512a9441b2935fec6be9f1f8cac /share/qtcreator/cplusplus/examples/tidy_example.cpp | |
parent | 217f2a49f6be36a33c986ead20333fb6c6b2ab97 (diff) | |
download | qt-creator-bfdcbf861fc06fc1616ac029e766276e61315b04.tar.gz |
Clang: Fix parse errors in clazy/tidy demo project
...otherwise not all intended diagnostics can be demonstrated.
Change-Id: I2f69862cc6c8a2e58059d9075ad6fd7c7e72b4a5
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Diffstat (limited to 'share/qtcreator/cplusplus/examples/tidy_example.cpp')
-rw-r--r-- | share/qtcreator/cplusplus/examples/tidy_example.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/share/qtcreator/cplusplus/examples/tidy_example.cpp b/share/qtcreator/cplusplus/examples/tidy_example.cpp index 3d09460818..dc921114ea 100644 --- a/share/qtcreator/cplusplus/examples/tidy_example.cpp +++ b/share/qtcreator/cplusplus/examples/tidy_example.cpp @@ -29,6 +29,8 @@ #include <algorithm> #include <cstdlib> #include <vector> +#include <cstring> +#include <csetjmp> #include "tidy_example.h" @@ -57,11 +59,11 @@ nb::A a; class Base { public: - Base(); + Base() {} // google-explicit-constructor - Base(int arg); - virtual ~Base(); + Base(int arg) {} + virtual ~Base() = default; Base(const Base &) = default; Base(Base &&) = default; @@ -175,7 +177,7 @@ public: } // cppcoreguidelines-pro-type-reinterpret-cast - return a + c + reinterpret_cast<int>(&val); + return a + c + reinterpret_cast<int64_t>(&val); } }; |