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

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

Issue 1173333003: GC plugin: enable plugin on anonymous namespaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | tools/clang/blink_gc_plugin/tests/stack_allocated.cpp » ('j') | 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 4805bc646017adf14ba9042dbd304f8d54e83abe..7f61bc4f8f1647836b65a51118a2d9bdc4426ac8 100644
--- a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
+++ b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
@@ -1015,7 +1015,6 @@ class BlinkGCPluginConsumer : public ASTConsumer {
// Only check structures in the blink and WebKit namespaces.
options_.checked_namespaces.insert("blink");
- options_.checked_namespaces.insert("WebKit");
// Ignore GC implementation files.
options_.ignored_directories.push_back("/heap/");
@@ -1752,6 +1751,8 @@ class BlinkGCPluginConsumer : public ASTConsumer {
!context->isTranslationUnit();
context = context->getParent()) {
if (NamespaceDecl* decl = dyn_cast<NamespaceDecl>(context)) {
+ if (decl->isAnonymousNamespace())
+ return true;
if (options_.checked_namespaces.find(decl->getNameAsString()) !=
options_.checked_namespaces.end()) {
return true;
« no previous file with comments | « no previous file | tools/clang/blink_gc_plugin/tests/stack_allocated.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698