File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,6 @@ namespace CheckInstances
2929{
3030 /* * List of registered check classes. This is used by Cppcheck to run checks and generate documentation */
3131 CPPCHECKLIB const std::list<Check *>& get ();
32- };
32+ }
3333
3434#endif // checksH
Original file line number Diff line number Diff line change @@ -78,8 +78,8 @@ Settings::~Settings() = default;
7878Settings::Settings (const Settings&) = default;
7979Settings & Settings::operator =(const Settings &) = default ;
8080
81- Settings::Settings (Settings&&) noexcept = default;
82- Settings & Settings::operator =(Settings &&) noexcept = default ;
81+ Settings::Settings (Settings&&) CPPCHECK_NOEXCEPT = default;
82+ Settings & Settings::operator =(Settings &&) CPPCHECK_NOEXCEPT = default ;
8383
8484std::string Settings::loadCppcheckCfg (Settings& settings, Suppressions& suppressions, bool debug)
8585{
Original file line number Diff line number Diff line change @@ -94,6 +94,16 @@ class SimpleEnableGroup {
9494};
9595
9696
97+ #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ <= 9
98+ // Hack to workaround GCC bug.
99+ // Details: https://trac.cppcheck.net/ticket/14850
100+ // seen on g++ before 10.x
101+ #define CPPCHECK_NOEXCEPT
102+ #else
103+ #define CPPCHECK_NOEXCEPT noexcept
104+ #endif
105+
106+
97107/* *
98108 * @brief This is just a container for general settings so that we don't need
99109 * to pass individual values to functions or constructors now or in the
@@ -113,8 +123,8 @@ class CPPCHECKLIB WARN_UNUSED Settings {
113123 Settings (const Settings&);
114124 Settings& operator =(const Settings&);
115125
116- Settings (Settings&&) noexcept ;
117- Settings& operator =(Settings&&) noexcept ;
126+ Settings (Settings&&) CPPCHECK_NOEXCEPT ;
127+ Settings& operator =(Settings&&) CPPCHECK_NOEXCEPT ;
118128
119129 static std::string loadCppcheckCfg (Settings& settings, Suppressions& suppressions, bool debug = false );
120130
You can’t perform that action at this time.
0 commit comments