Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions gui/cppchecklibrarydata.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
#ifndef CPPCHECKLIBRARYDATA_H
#define CPPCHECKLIBRARYDATA_H

#include "config.h"

#include <cstdint>
#include <utility>

Expand Down Expand Up @@ -230,7 +228,7 @@ class CppcheckLibraryData {
entrypoints.clear();
}

void swap(CppcheckLibraryData &other) NOEXCEPT {
void swap(CppcheckLibraryData &other) noexcept {
containers.swap(other.containers);
defines.swap(other.defines);
undefines.swap(other.undefines);
Expand Down
2 changes: 1 addition & 1 deletion lib/checkleakautovar.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class CPPCHECKLIB VarInfo {
referenced.erase(varid);
}

void swap(VarInfo &other) NOEXCEPT {
void swap(VarInfo &other) noexcept {
alloctype.swap(other.alloctype);
possibleUsage.swap(other.possibleUsage);
conditionalAlloc.swap(other.conditionalAlloc);
Expand Down
10 changes: 0 additions & 10 deletions lib/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,6 @@
#define __has_feature(x) 0
#endif

// C++11 noexcept
#if defined(__cpp_noexcept_function_type) || \
(defined(__GNUC__) && (__GNUC__ >= 5)) \
|| defined(__clang__) \
|| defined(__CPPCHECK__)
# define NOEXCEPT noexcept
#else
# define NOEXCEPT
#endif

// C++11 noreturn
#if __has_cpp_attribute (noreturn) \
|| (defined(__GNUC__) && (__GNUC__ >= 5)) \
Expand Down
2 changes: 1 addition & 1 deletion lib/programmemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ void ProgramMemory::erase_if(const std::function<bool(const ExprIdToken&)>& pred
}
}

void ProgramMemory::swap(ProgramMemory &pm) NOEXCEPT
void ProgramMemory::swap(ProgramMemory &pm) noexcept
{
mValues.swap(pm.mValues);
}
Expand Down
6 changes: 3 additions & 3 deletions lib/programmemory.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ struct ExprIdToken {
return !(lhs < rhs);
}

const Token& operator*() const NOEXCEPT {
const Token& operator*() const noexcept {
return *tok;
}

const Token* operator->() const NOEXCEPT {
const Token* operator->() const noexcept {
return tok;
}

Expand Down Expand Up @@ -128,7 +128,7 @@ struct CPPCHECKLIB ProgramMemory {

void erase_if(const std::function<bool(const ExprIdToken&)>& pred);

void swap(ProgramMemory &pm) NOEXCEPT;
void swap(ProgramMemory &pm) noexcept;

void clear();

Expand Down
2 changes: 1 addition & 1 deletion lib/tokenlist.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class CPPCHECKLIB TokenList {
TokenList(const TokenList &) = delete;
TokenList &operator=(const TokenList &) = delete;

TokenList(TokenList&& other) NOEXCEPT = default;
TokenList(TokenList&& other) noexcept = default;

/** @return the source file path. e.g. "file.cpp" */
const std::string& getSourceFilePath() const;
Expand Down
14 changes: 7 additions & 7 deletions lib/valueptr.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,12 @@ class CPPCHECKLIB ValuePtr {
mPtr.reset(mClone(rhs.get()));
}
}
ValuePtr(ValuePtr&& rhs) NOEXCEPT : mPtr(std::move(rhs.mPtr)), mClone(std::move(rhs.mClone)) {}
ValuePtr(ValuePtr&& rhs) noexcept : mPtr(std::move(rhs.mPtr)), mClone(std::move(rhs.mClone)) {}

T* get() NOEXCEPT {
T* get() noexcept {
return mPtr.get();
}
const T* get() const NOEXCEPT {
const T* get() const noexcept {
return mPtr.get();
}

Expand All @@ -69,14 +69,14 @@ class CPPCHECKLIB ValuePtr {
return *get();
}

T* operator->() NOEXCEPT {
T* operator->() noexcept {
return get();
}
const T* operator->() const NOEXCEPT {
const T* operator->() const noexcept {
return get();
}

void swap(ValuePtr& rhs) NOEXCEPT {
void swap(ValuePtr& rhs) noexcept {
using std::swap;
swap(mPtr, rhs.mPtr);
swap(mClone, rhs.mClone);
Expand All @@ -88,7 +88,7 @@ class CPPCHECKLIB ValuePtr {
}

// NOLINTNEXTLINE(google-explicit-constructor)
operator bool() const NOEXCEPT {
operator bool() const noexcept {
return !!mPtr;
}

Expand Down
Loading