Skip to content

Commit 81efa0f

Browse files
committed
removed some unnecessary __cplusplus preprocessor checks
1 parent afd595b commit 81efa0f

2 files changed

Lines changed: 2 additions & 8 deletions

File tree

lib/config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
// C++11 noexcept
4141
#if (defined(__GNUC__) && (__GNUC__ >= 5)) \
42-
|| (defined(__clang__) && (defined (__cplusplus)) && (__cplusplus >= 201103L)) \
42+
|| defined(__clang__) \
4343
|| defined(__CPPCHECK__)
4444
# define NOEXCEPT noexcept
4545
#else
@@ -48,7 +48,7 @@
4848

4949
// C++11 noreturn
5050
#if (defined(__GNUC__) && (__GNUC__ >= 5)) \
51-
|| (defined(__clang__) && (defined (__cplusplus)) && (__cplusplus >= 201103L)) \
51+
|| defined(__clang__) \
5252
|| defined(__CPPCHECK__)
5353
# define NORETURN [[noreturn]]
5454
#else

lib/valueflow.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,7 @@ static void bailoutInternal(const std::string& type, TokenList *tokenlist, Error
131131
errorLogger->reportErr(errmsg);
132132
}
133133

134-
#if (defined __cplusplus) && __cplusplus >= 201103L
135134
#define bailout2(type, tokenlist, errorLogger, tok, what) bailoutInternal(type, tokenlist, errorLogger, tok, what, __FILE__, __LINE__, __func__)
136-
#elif (defined __GNUC__) || (defined __clang__) || (defined _MSC_VER)
137-
#define bailout2(type, tokenlist, errorLogger, tok, what) bailoutInternal(type, tokenlist, errorLogger, tok, what, __FILE__, __LINE__, __FUNCTION__)
138-
#else
139-
#define bailout2(type, tokenlist, errorLogger, tok, what) bailoutInternal(type, tokenlist, errorLogger, tok, what, __FILE__, __LINE__, "(valueFlow)")
140-
#endif
141135

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

0 commit comments

Comments
 (0)