Skip to content
Snippets Groups Projects
Commit 6152ee3b authored by Axel Naumann's avatar Axel Naumann
Browse files

Do not #define keywords.

parent e79225e9
No related branches found
No related tags found
No related merge requests found
......@@ -12,8 +12,12 @@
#include <exception>
#if defined(_MSC_VER) && (_MSC_VER < 1900) && !defined(noexcept)
#define noexcept
#ifndef CLING_NOEXCEPT
# if defined(_MSC_VER) && (_MSC_VER < 1900)
# define CLING_NOEXCEPT
# else
# define CLING_NOEXCEPT noexcept
# endif
#endif
namespace clang {
......@@ -27,9 +31,9 @@ namespace cling {
///
class InterpreterException : public std::exception {
public:
virtual ~InterpreterException() noexcept;
virtual ~InterpreterException() CLING_NOEXCEPT;
virtual const char* what() const noexcept;
virtual const char* what() const CLING_NOEXCEPT;
virtual void diagnose() const {}
};
......@@ -46,9 +50,9 @@ namespace cling {
DerefType m_Type;
public:
InvalidDerefException(clang::Sema* S, clang::Expr* E, DerefType type);
virtual ~InvalidDerefException() noexcept;
virtual ~InvalidDerefException() CLING_NOEXCEPT;
const char* what() const noexcept override;
const char* what() const CLING_NOEXCEPT override;
void diagnose() const override;
};
} // end namespace cling
......
......@@ -14,8 +14,12 @@
#include "clang/AST/DeclVisitor.h"
#if defined(_MSC_VER) && (_MSC_VER < 1900) && !defined(constexpr)
#define constexpr const
#ifndef CLING_CONSTEXPR
# if defined(_MSC_VER) && (_MSC_VER < 1900)
# define CLING_CONSTEXPR const
# else
# define CLING_CONSTEXPR constexpr
# endif
#endif
namespace clang {
......@@ -256,7 +260,7 @@ namespace clang {
///
void CollectFilesToUncache(SourceLocation Loc);
constexpr static bool isDefinition(void*) { return false; }
CLING_CONSTEXPR static bool isDefinition(void*) { return false; }
static bool isDefinition(TagDecl* R);
static void resetDefinitionData(void*) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment