summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-07 01:22:02 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-07 01:22:02 +0000
commit0666a6ce703631d6f0c107afb6a42758208a6c42 (patch)
treeedf0eb727bd42219e2a3c50b141fa4320545bc8e /clang/lib/Sema/SemaDeclObjC.cpp
parentb6b7ce4b50ecc2ae104f1bef95b18b575bc59226 (diff)
downloadbcm5719-llvm-0666a6ce703631d6f0c107afb6a42758208a6c42.tar.gz
bcm5719-llvm-0666a6ce703631d6f0c107afb6a42758208a6c42.zip
Selector: (changes made after discussing this more with Steve Naroff)
- Make Selector::getAsIdentifierInfo() private. Using IdentifierInfo* in Selector is an implementation detail that clients shouldn't think about. - Modify diagnostic emission in Sema::ProcessPropertyDecl to not use Selector::getAsIdentifierInfo() (which could crash when IdentifierInfo* is null) and instead use Selector::getAsString(). - Tidy up Selector::getAsString() implementation. llvm-svn: 66313
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 476b6afea57..f91feb423f9 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/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().getAsIdentifierInfo();
+ << GetterMethod->getSelector().getAsString();
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().getAsIdentifierInfo();
+ << SetterMethod->getSelector().getAsString();
Diag(SetterMethod->getLocation(), diag::note_declared_at);
}
}
OpenPOWER on IntegriCloud