aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/IdentifierTable.h
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-14 00:20:08 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-14 00:20:08 +0000
commit8af2c16571f3aade6d47ce81fa3857d01d375719 (patch)
tree6fe904a951ab4628630b2cb15c08b6cd6d35493a /include/clang/Basic/IdentifierTable.h
parent0ddcd1409f6a417cc88ea51e085a6d86a37eb358 (diff)
Make Selector::getIdentifierInfo() private. I took a first attempt at this last
week in: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090302/013580.html That patch caused the output of the diagnostics to change. Since 'DeclarationName' can already reason about Selectors and the Diagnostics logic reasons about DeclarationName, there is no additional code needed to get the diagnostics working by making Selector::getIdentifierInfo() private. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66992 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/IdentifierTable.h')
-rw-r--r--include/clang/Basic/IdentifierTable.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/include/clang/Basic/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h
index 70e1cbfdd3..02296c0e29 100644
--- a/include/clang/Basic/IdentifierTable.h
+++ b/include/clang/Basic/IdentifierTable.h
@@ -337,6 +337,8 @@ private:
/// selectors that take no arguments and selectors that take 1 argument, which
/// accounts for 78% of all selectors in Cocoa.h.
class Selector {
+ friend class DiagnosticInfo;
+
enum IdentifierInfoFlag {
// MultiKeywordSelector = 0.
ZeroArg = 0x1,
@@ -356,13 +358,6 @@ class Selector {
assert((InfoPtr & ArgFlags) == 0 &&"Insufficiently aligned IdentifierInfo");
}
Selector(uintptr_t V) : InfoPtr(V) {}
-public:
- friend class SelectorTable; // only the SelectorTable can create these
- friend class DeclarationName; // and the AST's DeclarationName.
-
- /// The default ctor should only be used when creating data structures that
- /// will contain selectors.
- Selector() : InfoPtr(0) {}
IdentifierInfo *getAsIdentifierInfo() const {
if (getIdentifierInfoFlag())
@@ -372,6 +367,15 @@ public:
unsigned getIdentifierInfoFlag() const {
return InfoPtr & ArgFlags;
}
+
+public:
+ friend class SelectorTable; // only the SelectorTable can create these
+ friend class DeclarationName; // and the AST's DeclarationName.
+
+ /// The default ctor should only be used when creating data structures that
+ /// will contain selectors.
+ Selector() : InfoPtr(0) {}
+
/// operator==/!= - Indicate whether the specified selectors are identical.
bool operator==(Selector RHS) const {
return InfoPtr == RHS.InfoPtr;