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

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

Issue 1901643003: Always enable warn-raw-ptr's check of raw heap pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sof-gc-plugin-upd
Patch Set: rebased Created 4 years, 8 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 | « tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp ('k') | tools/clang/blink_gc_plugin/BlinkGCPluginOptions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp
diff --git a/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp b/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp
index 7c90ddd35045c0e8d6cf3af8b46ebf0808adf927..d49afc69b090c08ca5f91bc041a06c051acf7057 100644
--- a/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp
+++ b/tools/clang/blink_gc_plugin/BlinkGCPluginConsumer.cpp
@@ -964,25 +964,19 @@ void BlinkGCPluginConsumer::ReportFieldsRequireTracing(
void BlinkGCPluginConsumer::ReportClassContainsInvalidFields(
RecordInfo* info,
const CheckFieldsVisitor::Errors& errors) {
- bool only_warnings = options_.warn_raw_ptr;
- for (auto& error : errors)
- if (!CheckFieldsVisitor::IsWarning(error.second))
- only_warnings = false;
ReportDiagnostic(info->record()->getLocStart(),
- only_warnings ?
- diag_class_contains_invalid_fields_warning_ :
diag_class_contains_invalid_fields_)
<< info->record();
for (auto& error : errors) {
unsigned note;
- if (CheckFieldsVisitor::IsRawPtrError(error.second)) {
+ if (error.second == CheckFieldsVisitor::kRawPtrToGCManaged) {
note = diag_raw_ptr_to_gc_managed_class_note_;
- } else if (CheckFieldsVisitor::IsReferencePtrError(error.second)) {
- note = diag_reference_ptr_to_gc_managed_class_note_;
} else if (error.second == CheckFieldsVisitor::kRefPtrToGCManaged) {
note = diag_ref_ptr_to_gc_managed_class_note_;
+ } else if (error.second == CheckFieldsVisitor::kReferencePtrToGCManaged) {
+ note = diag_reference_ptr_to_gc_managed_class_note_;
} else if (error.second == CheckFieldsVisitor::kOwnPtrToGCManaged) {
note = diag_own_ptr_to_gc_managed_class_note_;
} else if (error.second == CheckFieldsVisitor::kMemberToGCUnmanaged) {
« no previous file with comments | « tools/clang/blink_gc_plugin/BlinkGCPlugin.cpp ('k') | tools/clang/blink_gc_plugin/BlinkGCPluginOptions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698