dcoughlin added inline comments. ================ Comment at: lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp:68 @@ +67,3 @@ + // Methods that require a localized string + mutable llvm::StringMap<llvm::StringMap<uint8_t>> UIMethods; + // Methods that return a localized string ---------------- FWIW, #include "llvm/ADT/StringSet.h"
and using mutable llvm::StringMap<llvm::StringSet<>> UIMethods; works for me. ================ Comment at: lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp:72 @@ +71,3 @@ + // C Functions that return a localized string + mutable llvm::StringMap<char> LSF; + ---------------- Is there a reason you use StringMap<char> here and StringMap<uint8_t> for UIMethods? ================ Comment at: lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp:279 @@ +278,3 @@ + std::string SelectorString = S.getAsString(); + StringRef SelectorName = StringRef(SelectorString); + assert(!SelectorName.empty()); ---------------- You can just write StringRef SelectorName = SelectorString; here. ================ Comment at: lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp:509 @@ +508,3 @@ + StringRef(ME->getSelector().getAsString()) + .equals("localizedStringForKey:value:table:"))) { + return; ---------------- You can just write ME->getSelector().getAsString() == "localizedStringForKey:value:table:" for the string comparison. http://reviews.llvm.org/D11572 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits