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

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

Issue 1926863002: GC plugin: split out reporting of errors/warnings. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: whitespace Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "CheckFieldsVisitor.h" 5 #include "CheckFieldsVisitor.h"
6 6
7 #include <cassert> 7 #include <cassert>
8 8
9 #include "BlinkGCPluginOptions.h" 9 #include "BlinkGCPluginOptions.h"
10 #include "RecordInfo.h" 10 #include "RecordInfo.h"
11 11
12 CheckFieldsVisitor::CheckFieldsVisitor(const BlinkGCPluginOptions& options) 12 CheckFieldsVisitor::CheckFieldsVisitor()
13 : options_(options), 13 : current_(0),
14 current_(0),
15 stack_allocated_host_(false) { 14 stack_allocated_host_(false) {
16 } 15 }
17 16
18 CheckFieldsVisitor::Errors& CheckFieldsVisitor::invalid_fields() { 17 CheckFieldsVisitor::Errors& CheckFieldsVisitor::invalid_fields() {
19 return invalid_fields_; 18 return invalid_fields_;
20 } 19 }
21 20
22 bool CheckFieldsVisitor::ContainsInvalidFields(RecordInfo* info) { 21 bool CheckFieldsVisitor::ContainsInvalidFields(RecordInfo* info) {
23 stack_allocated_host_ = info->IsStackAllocated(); 22 stack_allocated_host_ = info->IsStackAllocated();
24 managed_host_ = stack_allocated_host_ || 23 managed_host_ = stack_allocated_host_ ||
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 return kReferencePtrToGCManaged; 111 return kReferencePtrToGCManaged;
113 else 112 else
114 return kRawPtrToGCManaged; 113 return kRawPtrToGCManaged;
115 } 114 }
116 if (ptr->IsRefPtr()) 115 if (ptr->IsRefPtr())
117 return kRefPtrToGCManaged; 116 return kRefPtrToGCManaged;
118 if (ptr->IsOwnPtr()) 117 if (ptr->IsOwnPtr())
119 return kOwnPtrToGCManaged; 118 return kOwnPtrToGCManaged;
120 assert(false && "Unknown smart pointer kind"); 119 assert(false && "Unknown smart pointer kind");
121 } 120 }
OLDNEW
« no previous file with comments | « tools/clang/blink_gc_plugin/CheckFieldsVisitor.h ('k') | tools/clang/blink_gc_plugin/DiagnosticsReporter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698