File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -146,12 +146,13 @@ void ForwardDeclarationNamespaceCheck::onEndOfTranslationUnit() {
146146 }
147147 // Check if a definition in another namespace exists.
148148 const auto DeclName = CurDecl->getName ();
149- if (!DeclNameToDefinitions.contains (DeclName)) {
149+ auto It = DeclNameToDefinitions.find (DeclName);
150+ if (It == DeclNameToDefinitions.end ()) {
150151 continue ; // No definition in this translation unit, we can skip it.
151152 }
152153 // Make a warning for each definition with the same name (in other
153154 // namespaces).
154- const auto &Definitions = DeclNameToDefinitions[DeclName] ;
155+ const auto &Definitions = It-> second ;
155156 for (const auto *Def : Definitions) {
156157 diag (CurDecl->getLocation (),
157158 " no definition found for %0, but a definition with "
You can’t perform that action at this time.
0 commit comments