summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/IdentifierTable.h
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
committerdim <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
commit3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (patch)
treedbbd4047878da71c1a706e26ce05b4e7791b14cc /include/clang/Basic/IdentifierTable.h
parent38d6f2e7f2ce51a5b3836d26596c6c34a3288752 (diff)
downloadFreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.zip
FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.tar.gz
Vendor import of clang trunk r238337:
https://llvm.org/svn/llvm-project/cfe/trunk@238337
Diffstat (limited to 'include/clang/Basic/IdentifierTable.h')
-rw-r--r--include/clang/Basic/IdentifierTable.h40
1 files changed, 24 insertions, 16 deletions
diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h
index 1de9dd1..bc586e4 100644
--- a/include/clang/Basic/IdentifierTable.h
+++ b/include/clang/Basic/IdentifierTable.h
@@ -53,7 +53,8 @@ class IdentifierInfo {
bool HasMacro : 1; // True if there is a #define for this.
bool HadMacro : 1; // True if there was a #define for this.
bool IsExtension : 1; // True if identifier is a lang extension.
- bool IsCXX11CompatKeyword : 1; // True if identifier is a keyword in C++11.
+ bool IsFutureCompatKeyword : 1; // True if identifier is a keyword in a
+ // newer Standard or proposed Standard.
bool IsPoisoned : 1; // True if identifier is poisoned.
bool IsCPPOperatorKeyword : 1; // True if ident is a C++ operator keyword.
bool NeedsHandleIdentifier : 1; // See "RecomputeNeedsHandleIdentifier".
@@ -73,8 +74,8 @@ class IdentifierInfo {
void *FETokenInfo; // Managed by the language front-end.
llvm::StringMapEntry<IdentifierInfo*> *Entry;
- IdentifierInfo(const IdentifierInfo&) LLVM_DELETED_FUNCTION;
- void operator=(const IdentifierInfo&) LLVM_DELETED_FUNCTION;
+ IdentifierInfo(const IdentifierInfo&) = delete;
+ void operator=(const IdentifierInfo&) = delete;
friend class IdentifierTable;
@@ -124,6 +125,7 @@ public:
}
/// \brief Return true if this identifier is \#defined to some other value.
+ /// \note The current definition may be in a module and not currently visible.
bool hasMacroDefinition() const {
return HasMacro;
}
@@ -212,13 +214,14 @@ public:
RecomputeNeedsHandleIdentifier();
}
- /// is/setIsCXX11CompatKeyword - Initialize information about whether or not
- /// this language token is a keyword in C++11. This controls compatibility
- /// warnings, and is only true when not parsing C++11. Once a compatibility
- /// problem has been diagnosed with this keyword, the flag will be cleared.
- bool isCXX11CompatKeyword() const { return IsCXX11CompatKeyword; }
- void setIsCXX11CompatKeyword(bool Val) {
- IsCXX11CompatKeyword = Val;
+ /// is/setIsFutureCompatKeyword - Initialize information about whether or not
+ /// this language token is a keyword in a newer or proposed Standard. This
+ /// controls compatibility warnings, and is only true when not parsing the
+ /// corresponding Standard. Once a compatibility problem has been diagnosed
+ /// with this keyword, the flag will be cleared.
+ bool isFutureCompatKeyword() const { return IsFutureCompatKeyword; }
+ void setIsFutureCompatKeyword(bool Val) {
+ IsFutureCompatKeyword = Val;
if (Val)
NeedsHandleIdentifier = 1;
else
@@ -308,7 +311,12 @@ public:
else
RecomputeNeedsHandleIdentifier();
}
-
+
+ /// \brief Provide less than operator for lexicographical sorting.
+ bool operator<(const IdentifierInfo &RHS) const {
+ return getName() < RHS.getName();
+ }
+
private:
/// The Preprocessor::HandleIdentifier does several special (but rare)
/// things to identifiers of various sorts. For example, it changes the
@@ -319,7 +327,7 @@ private:
void RecomputeNeedsHandleIdentifier() {
NeedsHandleIdentifier =
(isPoisoned() | hasMacroDefinition() | isCPlusPlusOperatorKeyword() |
- isExtensionToken() | isCXX11CompatKeyword() || isOutOfDate() ||
+ isExtensionToken() | isFutureCompatKeyword() || isOutOfDate() ||
isModulesImport());
}
};
@@ -356,8 +364,8 @@ public:
/// actual functionality.
class IdentifierIterator {
private:
- IdentifierIterator(const IdentifierIterator &) LLVM_DELETED_FUNCTION;
- void operator=(const IdentifierIterator &) LLVM_DELETED_FUNCTION;
+ IdentifierIterator(const IdentifierIterator &) = delete;
+ void operator=(const IdentifierIterator &) = delete;
protected:
IdentifierIterator() { }
@@ -727,8 +735,8 @@ public:
/// multi-keyword caching.
class SelectorTable {
void *Impl; // Actually a SelectorTableImpl
- SelectorTable(const SelectorTable &) LLVM_DELETED_FUNCTION;
- void operator=(const SelectorTable &) LLVM_DELETED_FUNCTION;
+ SelectorTable(const SelectorTable &) = delete;
+ void operator=(const SelectorTable &) = delete;
public:
SelectorTable();
~SelectorTable();
OpenPOWER on IntegriCloud