[PATCH] D49158: [clang-tidy] Fixing segfault when there's no IdentifierInfo
Jonas Toth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 11 01:13:25 PDT 2018
JonasToth added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/fuchsia/MultipleInheritanceCheck.cpp:44
bool &isInterface) const {
- StringRef Name = Node->getIdentifier()->getName();
- llvm::StringMapConstIterator<bool> Pair = InterfaceMap.find(Name);
- if (Pair == InterfaceMap.end())
- return false;
- isInterface = Pair->second;
- return true;
+ if (!Node) return false;
+ if (const auto *Id = Node->getIdentifier()) {
----------------
Please move then `return false` onto the next line.
https://reviews.llvm.org/D49158
More information about the cfe-commits
mailing list