[PATCH] D40580: [clang-tidy] Adding Fuchsia checker for multiple inheritance

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 30 09:33:54 PST 2017


alexfh added inline comments.


================
Comment at: clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:35-36
+  StringRef Name = Node->getIdentifier()->getName();
+  if (InterfaceMap.count(Name)) {
+    isInterface = InterfaceMap.lookup(Name);
+    return true;
----------------
One lookup is enough here. Use `StringMap::find()` instead of count + lookup.


https://reviews.llvm.org/D40580





More information about the cfe-commits mailing list