File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919#ifndef CPPCHECKLIBRARYDATA_H
2020#define CPPCHECKLIBRARYDATA_H
2121
22- #include " config.h"
23-
2422#include < cstdint>
2523#include < utility>
2624
@@ -230,7 +228,7 @@ class CppcheckLibraryData {
230228 entrypoints.clear ();
231229 }
232230
233- void swap (CppcheckLibraryData &other) NOEXCEPT {
231+ void swap (CppcheckLibraryData &other) noexcept {
234232 containers.swap (other.containers );
235233 defines.swap (other.defines );
236234 undefines.swap (other.undefines );
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ class CPPCHECKLIB VarInfo {
7575 referenced.erase (varid);
7676 }
7777
78- void swap (VarInfo &other) NOEXCEPT {
78+ void swap (VarInfo &other) noexcept {
7979 alloctype.swap (other.alloctype );
8080 possibleUsage.swap (other.possibleUsage );
8181 conditionalAlloc.swap (other.conditionalAlloc );
Original file line number Diff line number Diff line change 5252#define __has_feature (x ) 0
5353#endif
5454
55- // C++11 noexcept
56- #if defined(__cpp_noexcept_function_type) || \
57- (defined (__GNUC__) && (__GNUC__ >= 5 )) \
58- || defined (__clang__) \
59- || defined (__CPPCHECK__)
60- # define NOEXCEPT noexcept
61- #else
62- # define NOEXCEPT
63- #endif
64-
6555// C++11 noreturn
6656#if __has_cpp_attribute (noreturn) \
6757 || (defined (__GNUC__) && (__GNUC__ >= 5 )) \
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ void ProgramMemory::erase_if(const std::function<bool(const ExprIdToken&)>& pred
205205 }
206206}
207207
208- void ProgramMemory::swap (ProgramMemory &pm) NOEXCEPT
208+ void ProgramMemory::swap (ProgramMemory &pm) noexcept
209209{
210210 mValues .swap (pm.mValues );
211211}
Original file line number Diff line number Diff line change @@ -79,11 +79,11 @@ struct ExprIdToken {
7979 return !(lhs < rhs);
8080 }
8181
82- const Token& operator *() const NOEXCEPT {
82+ const Token& operator *() const noexcept {
8383 return *tok;
8484 }
8585
86- const Token* operator ->() const NOEXCEPT {
86+ const Token* operator ->() const noexcept {
8787 return tok;
8888 }
8989
@@ -128,7 +128,7 @@ struct CPPCHECKLIB ProgramMemory {
128128
129129 void erase_if (const std::function<bool (const ExprIdToken&)>& pred);
130130
131- void swap (ProgramMemory &pm) NOEXCEPT ;
131+ void swap (ProgramMemory &pm) noexcept ;
132132
133133 void clear ();
134134
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class CPPCHECKLIB TokenList {
5656 TokenList (const TokenList &) = delete ;
5757 TokenList &operator =(const TokenList &) = delete ;
5858
59- TokenList (TokenList&& other) NOEXCEPT = default ;
59+ TokenList (TokenList&& other) noexcept = default ;
6060
6161 /* * @return the source file path. e.g. "file.cpp" */
6262 const std::string& getSourceFilePath () const ;
Original file line number Diff line number Diff line change @@ -53,12 +53,12 @@ class CPPCHECKLIB ValuePtr {
5353 mPtr .reset (mClone (rhs.get ()));
5454 }
5555 }
56- ValuePtr (ValuePtr&& rhs) NOEXCEPT : mPtr (std::move(rhs.mPtr )), mClone (std::move(rhs.mClone )) {}
56+ ValuePtr (ValuePtr&& rhs) noexcept : mPtr (std::move(rhs.mPtr )), mClone (std::move(rhs.mClone )) {}
5757
58- T* get () NOEXCEPT {
58+ T* get () noexcept {
5959 return mPtr .get ();
6060 }
61- const T* get () const NOEXCEPT {
61+ const T* get () const noexcept {
6262 return mPtr .get ();
6363 }
6464
@@ -69,14 +69,14 @@ class CPPCHECKLIB ValuePtr {
6969 return *get ();
7070 }
7171
72- T* operator ->() NOEXCEPT {
72+ T* operator ->() noexcept {
7373 return get ();
7474 }
75- const T* operator ->() const NOEXCEPT {
75+ const T* operator ->() const noexcept {
7676 return get ();
7777 }
7878
79- void swap (ValuePtr& rhs) NOEXCEPT {
79+ void swap (ValuePtr& rhs) noexcept {
8080 using std::swap;
8181 swap (mPtr , rhs.mPtr );
8282 swap (mClone , rhs.mClone );
@@ -88,7 +88,7 @@ class CPPCHECKLIB ValuePtr {
8888 }
8989
9090 // NOLINTNEXTLINE(google-explicit-constructor)
91- operator bool () const NOEXCEPT {
91+ operator bool () const noexcept {
9292 return !!mPtr ;
9393 }
9494
You can’t perform that action at this time.
0 commit comments