| Index: tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
|
| diff --git a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
|
| index 4b023c3a9d46e7ffe5b7648f14cf09e7fdc38a1b..31a83e8f2ddbf9054228b86344ac9785510dfca7 100644
|
| --- a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
|
| +++ b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
|
| @@ -1060,12 +1060,14 @@ class BlinkGCPluginConsumer : public ASTConsumer {
|
| DeclContext* context = info->record()->getDeclContext();
|
| if (context->isRecord())
|
| return InCheckedNamespace(cache_.Lookup(context));
|
| - if (context->isNamespace()) {
|
| - const NamespaceDecl* decl = dyn_cast<NamespaceDecl>(context);
|
| + while (context->isNamespace()) {
|
| + NamespaceDecl* decl = dyn_cast<NamespaceDecl>(context);
|
| if (decl->isAnonymousNamespace())
|
| return false;
|
| - return options_.checked_namespaces.find(decl->getNameAsString()) !=
|
| - options_.checked_namespaces.end();
|
| + if (options_.checked_namespaces.find(decl->getNameAsString()) !=
|
| + options_.checked_namespaces.end())
|
| + return true;
|
| + context = decl->getDeclContext();
|
| }
|
| return false;
|
| }
|
|
|