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

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

Issue 840623002: Do not iterate past the end on processing leaf class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/left_most_gc_base.h » ('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 6cb6b43544a675ac9f62f925ef55989a6e4e7310..6f93c5e8da127b188f19c2eb0462e343c04f42be 100644
--- a/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
+++ b/tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp
@@ -1100,7 +1100,9 @@ class BlinkGCPluginConsumer : public ASTConsumer {
if (DeclaresVirtualMethods(left_most))
return;
if (left_most_base) {
- ++it; // Get the base next to the "safe polymorphic base"
+ // Get the base next to the "safe polymorphic base"
+ if (it != left_most->bases_end())
+ ++it;
if (it != left_most->bases_end()) {
if (CXXRecordDecl* next_base = it->getType()->getAsCXXRecordDecl()) {
if (CXXRecordDecl* next_left_most = GetLeftMostBase(next_base)) {
« no previous file with comments | « no previous file | tools/clang/blink_gc_plugin/tests/left_most_gc_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698