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

Side by Side Diff: tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp

Issue 951673002: Revert "Pull chromium at 2c3ffb2355a27c32f45e508ef861416b820c823b" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « tools/android/memconsumer/memconsumer.gyp ('k') | tools/clang/blink_gc_plugin/Config.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // This clang plugin checks various invariants of the Blink garbage 5 // This clang plugin checks various invariants of the Blink garbage
6 // collection infrastructure. 6 // collection infrastructure.
7 // 7 //
8 // Errors are described at: 8 // Errors are described at:
9 // http://www.chromium.org/developers/blink-gc-plugin-errors 9 // http://www.chromium.org/developers/blink-gc-plugin-errors
10 10
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 bool CheckTraceBaseCall(CallExpr* call) { 464 bool CheckTraceBaseCall(CallExpr* call) {
465 MemberExpr* callee = dyn_cast<MemberExpr>(call->getCallee()); 465 MemberExpr* callee = dyn_cast<MemberExpr>(call->getCallee());
466 if (!callee) 466 if (!callee)
467 return false; 467 return false;
468 468
469 FunctionDecl* fn = dyn_cast<FunctionDecl>(callee->getMemberDecl()); 469 FunctionDecl* fn = dyn_cast<FunctionDecl>(callee->getMemberDecl());
470 if (!fn || !Config::IsTraceMethod(fn, nullptr)) 470 if (!fn || !Config::IsTraceMethod(fn, nullptr))
471 return false; 471 return false;
472 472
473 if (trace_->getName() == kTraceImplName) { 473 // Currently, a manually dispatched class cannot have mixin bases (having
474 if (fn->getName() != kTraceName) 474 // one would add a vtable which we explicitly check against). This means
475 return false; 475 // that we can only make calls to a trace method of the same name. Revisit
476 } else { 476 // this if our mixin/vtable assumption changes.
477 // Currently, a manually dispatched class cannot have mixin bases (having 477 if (fn->getName() != trace_->getName())
478 // one would add a vtable which we explicitly check against). This means 478 return false;
479 // that we can only make calls to a trace method of the same name. Revisit
480 // this if our mixin/vtable assumption changes.
481 if (fn->getName() != trace_->getName())
482 return false;
483 }
484 479
485 CXXRecordDecl* decl = 0; 480 CXXRecordDecl* decl = 0;
486 if (callee && callee->hasQualifier()) { 481 if (callee && callee->hasQualifier()) {
487 if (const Type* type = callee->getQualifier()->getAsType()) 482 if (const Type* type = callee->getQualifier()->getAsType())
488 decl = type->getAsCXXRecordDecl(); 483 decl = type->getAsCXXRecordDecl();
489 } 484 }
490 if (!decl) 485 if (!decl)
491 return false; 486 return false;
492 487
493 RecordInfo::Bases::iterator it = info_->GetBases().find(decl); 488 RecordInfo::Bases::iterator it = info_->GetBases().find(decl);
(...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1939 1934
1940 private: 1935 private:
1941 BlinkGCPluginOptions options_; 1936 BlinkGCPluginOptions options_;
1942 }; 1937 };
1943 1938
1944 } // namespace 1939 } // namespace
1945 1940
1946 static FrontendPluginRegistry::Add<BlinkGCPluginAction> X( 1941 static FrontendPluginRegistry::Add<BlinkGCPluginAction> X(
1947 "blink-gc-plugin", 1942 "blink-gc-plugin",
1948 "Check Blink GC invariants"); 1943 "Check Blink GC invariants");
OLDNEW
« no previous file with comments | « tools/android/memconsumer/memconsumer.gyp ('k') | tools/clang/blink_gc_plugin/Config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698