From: Alp Toker Date: Sun, 2 Mar 2014 02:26:52 +0000 (+0000) Subject: [C++11] Drop legacy conditionals for TokenKind's underlying type X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e1dd18219c6b582ed6a7b5fe3149276f0fb84d16;p=clang [C++11] Drop legacy conditionals for TokenKind's underlying type This relies on forward declaration of enums. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202605 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/Diagnostic.h b/include/clang/Basic/Diagnostic.h index d83c4c0b9b..5e3fd015a5 100644 --- a/include/clang/Basic/Diagnostic.h +++ b/include/clang/Basic/Diagnostic.h @@ -18,9 +18,6 @@ #include "clang/Basic/DiagnosticIDs.h" #include "clang/Basic/DiagnosticOptions.h" #include "clang/Basic/SourceLocation.h" -#if !LLVM_HAS_STRONG_ENUMS -#include "clang/Basic/TokenKinds.h" -#endif #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" @@ -38,11 +35,9 @@ namespace clang { class Preprocessor; class DiagnosticErrorTrap; class StoredDiagnostic; -#if LLVM_HAS_STRONG_ENUMS namespace tok { enum TokenKind : unsigned short; } -#endif /// \brief Annotates a diagnostic with some code that should be /// inserted, removed, or replaced to fix the problem. diff --git a/include/clang/Basic/TokenKinds.h b/include/clang/Basic/TokenKinds.h index bca267fe50..794625ca91 100644 --- a/include/clang/Basic/TokenKinds.h +++ b/include/clang/Basic/TokenKinds.h @@ -22,7 +22,7 @@ namespace clang { namespace tok { /// \brief Provides a simple uniform namespace for tokens from all C languages. -enum TokenKind LLVM_ENUM_INT_TYPE(unsigned short) { +enum TokenKind : unsigned short { #define TOK(X) X, #include "clang/Basic/TokenKinds.def" NUM_TOKENS