Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp

Issue 294903002: Blink GC plugin: look for checked namespaces within the list of namespaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698