aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Basic/IdentifierTable.h18
-rw-r--r--lib/Sema/SemaDeclObjC.cpp4
2 files changed, 13 insertions, 9 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;
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index 6ca64e388e..fb74519b57 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1137,7 +1137,7 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property,
Diag(property->getLocation(),
diag::err_accessor_property_type_mismatch)
<< property->getDeclName()
- << GetterMethod->getSelector().getAsIdentifierInfo();
+ << GetterMethod->getSelector();
Diag(GetterMethod->getLocation(), diag::note_declared_at);
}
@@ -1150,7 +1150,7 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property,
Diag(property->getLocation(),
diag::err_accessor_property_type_mismatch)
<< property->getDeclName()
- << SetterMethod->getSelector().getAsIdentifierInfo();
+ << SetterMethod->getSelector();
Diag(SetterMethod->getLocation(), diag::note_declared_at);
}
}