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

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

Issue 935333002: Update from https://crrev.com/316786 (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/run_pie/run_pie.gyp ('k') | tools/clang/blink_gc_plugin/OWNERS » ('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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 it->second.MarkTraced(); 377 it->second.MarkTraced();
378 } 378 }
379 } 379 }
380 380
381 QualType base = expr->getBaseType(); 381 QualType base = expr->getBaseType();
382 if (!base->isPointerType()) 382 if (!base->isPointerType())
383 return true; 383 return true;
384 CXXRecordDecl* decl = base->getPointeeType()->getAsCXXRecordDecl(); 384 CXXRecordDecl* decl = base->getPointeeType()->getAsCXXRecordDecl();
385 if (decl) 385 if (decl)
386 CheckTraceFieldCall(expr->getMemberName().getAsString(), decl, arg); 386 CheckTraceFieldCall(expr->getMemberName().getAsString(), decl, arg);
387 if (expr->getMemberName().getAsString() == kTraceImplName)
388 delegates_to_traceimpl_ = true;
387 return true; 389 return true;
388 } 390 }
389 391
390 if (CXXMemberCallExpr* expr = dyn_cast<CXXMemberCallExpr>(call)) { 392 if (CXXMemberCallExpr* expr = dyn_cast<CXXMemberCallExpr>(call)) {
391 if (CheckTraceFieldCall(expr) || CheckRegisterWeakMembers(expr)) 393 if (CheckTraceFieldCall(expr) || CheckRegisterWeakMembers(expr))
392 return true; 394 return true;
393 395
394 if (expr->getMethodDecl()->getNameAsString() == kTraceImplName) { 396 if (expr->getMethodDecl()->getNameAsString() == kTraceImplName) {
395 delegates_to_traceimpl_ = true; 397 delegates_to_traceimpl_ = true;
396 return true; 398 return true;
(...skipping 1535 matching lines...) Expand 10 before | Expand all | Expand 10 after
1932 1934
1933 private: 1935 private:
1934 BlinkGCPluginOptions options_; 1936 BlinkGCPluginOptions options_;
1935 }; 1937 };
1936 1938
1937 } // namespace 1939 } // namespace
1938 1940
1939 static FrontendPluginRegistry::Add<BlinkGCPluginAction> X( 1941 static FrontendPluginRegistry::Add<BlinkGCPluginAction> X(
1940 "blink-gc-plugin", 1942 "blink-gc-plugin",
1941 "Check Blink GC invariants"); 1943 "Check Blink GC invariants");
OLDNEW
« no previous file with comments | « tools/android/run_pie/run_pie.gyp ('k') | tools/clang/blink_gc_plugin/OWNERS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698