Simplify code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189168 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2013-08-24 12:15:54 +00:00
parent 6bee6319c6
commit 4321d4e4a9

View File

@ -313,12 +313,7 @@ static bool isObjCClass(StringRef Name) {
static bool hasObjCCategory(StringRef Name) { static bool hasObjCCategory(StringRef Name) {
if (!isObjCClass(Name)) return false; if (!isObjCClass(Name)) return false;
size_t pos = Name.find(')'); return Name.find(") ") != StringRef::npos;
if (pos != std::string::npos) {
if (Name[pos+1] != ' ') return false;
return true;
}
return false;
} }
static void getObjCClassCategory(StringRef In, StringRef &Class, static void getObjCClassCategory(StringRef In, StringRef &Class,