Skip to content

Commit

Permalink
removed some unnecessary __cplusplus preprocessor checks
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed May 14, 2022
1 parent afd595b commit 81efa0f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 2 additions & 2 deletions lib/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

// C++11 noexcept
#if (defined(__GNUC__) && (__GNUC__ >= 5)) \
|| (defined(__clang__) && (defined (__cplusplus)) && (__cplusplus >= 201103L)) \
|| defined(__clang__) \
|| defined(__CPPCHECK__)
# define NOEXCEPT noexcept
#else
Expand All @@ -48,7 +48,7 @@

// C++11 noreturn
#if (defined(__GNUC__) && (__GNUC__ >= 5)) \
|| (defined(__clang__) && (defined (__cplusplus)) && (__cplusplus >= 201103L)) \
|| defined(__clang__) \
|| defined(__CPPCHECK__)
# define NORETURN [[noreturn]]
#else
Expand Down
6 changes: 0 additions & 6 deletions lib/valueflow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,7 @@ static void bailoutInternal(const std::string& type, TokenList *tokenlist, Error
errorLogger->reportErr(errmsg);
}

#if (defined __cplusplus) && __cplusplus >= 201103L
#define bailout2(type, tokenlist, errorLogger, tok, what) bailoutInternal(type, tokenlist, errorLogger, tok, what, __FILE__, __LINE__, __func__)
#elif (defined __GNUC__) || (defined __clang__) || (defined _MSC_VER)
#define bailout2(type, tokenlist, errorLogger, tok, what) bailoutInternal(type, tokenlist, errorLogger, tok, what, __FILE__, __LINE__, __FUNCTION__)
#else
#define bailout2(type, tokenlist, errorLogger, tok, what) bailoutInternal(type, tokenlist, errorLogger, tok, what, __FILE__, __LINE__, "(valueFlow)")
#endif

#define bailout(tokenlist, errorLogger, tok, what) bailout2("valueFlowBailout", tokenlist, errorLogger, tok, what)

Expand Down

0 comments on commit 81efa0f

Please sign in to comment.