aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Basic/Diagnostic.cpp8
-rw-r--r--lib/Sema/SemaDeclObjC.cpp4
2 files changed, 10 insertions, 2 deletions
diff --git a/lib/Basic/Diagnostic.cpp b/lib/Basic/Diagnostic.cpp
index 893eae5d1a..84d4055b78 100644
--- a/lib/Basic/Diagnostic.cpp
+++ b/lib/Basic/Diagnostic.cpp
@@ -657,6 +657,14 @@ FormatDiagnostic(llvm::SmallVectorImpl<char> &OutStr) const {
OutStr.push_back('\'');
break;
}
+ case Diagnostic::ak_selector: {
+ Selector S = getArgSelector(ArgNo);
+ OutStr.push_back('\'');
+ const std::string &s = S.getAsString();
+ OutStr.append(&s[0], &s[0]+s.length());
+ OutStr.push_back('\'');
+ break;
+ }
case Diagnostic::ak_qualtype:
case Diagnostic::ak_declarationname:
case Diagnostic::ak_nameddecl:
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index f91feb423f..a26581824f 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1139,7 +1139,7 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property,
Diag(property->getLocation(),
diag::err_accessor_property_type_mismatch)
<< property->getDeclName()
- << GetterMethod->getSelector().getAsString();
+ << GetterMethod->getSelector();
Diag(GetterMethod->getLocation(), diag::note_declared_at);
}
@@ -1152,7 +1152,7 @@ void Sema::ProcessPropertyDecl(ObjCPropertyDecl *property,
Diag(property->getLocation(),
diag::err_accessor_property_type_mismatch)
<< property->getDeclName()
- << SetterMethod->getSelector().getAsString();
+ << SetterMethod->getSelector();
Diag(SetterMethod->getLocation(), diag::note_declared_at);
}
}