OLD | NEW |
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 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 if (visitor.ContainsInvalidFields(info)) | 1118 if (visitor.ContainsInvalidFields(info)) |
1119 ReportClassContainsInvalidFields(info, &visitor.invalid_fields()); | 1119 ReportClassContainsInvalidFields(info, &visitor.invalid_fields()); |
1120 } | 1120 } |
1121 | 1121 |
1122 if (info->IsGCDerived()) { | 1122 if (info->IsGCDerived()) { |
1123 | 1123 |
1124 if (!info->IsGCMixin()) { | 1124 if (!info->IsGCMixin()) { |
1125 CheckLeftMostDerived(info); | 1125 CheckLeftMostDerived(info); |
1126 CheckDispatch(info); | 1126 CheckDispatch(info); |
1127 if (CXXMethodDecl* newop = info->DeclaresNewOperator()) | 1127 if (CXXMethodDecl* newop = info->DeclaresNewOperator()) |
1128 ReportClassOverridesNew(info, newop); | 1128 if (!Config::IsIgnoreAnnotated(newop)) |
| 1129 ReportClassOverridesNew(info, newop); |
1129 if (info->IsGCMixinInstance()) { | 1130 if (info->IsGCMixinInstance()) { |
1130 // Require that declared GCMixin implementations | 1131 // Require that declared GCMixin implementations |
1131 // also provide a trace() override. | 1132 // also provide a trace() override. |
1132 if (info->DeclaresGCMixinMethods() | 1133 if (info->DeclaresGCMixinMethods() |
1133 && !info->DeclaresLocalTraceMethod()) | 1134 && !info->DeclaresLocalTraceMethod()) |
1134 ReportClassMustDeclareGCMixinTraceMethod(info); | 1135 ReportClassMustDeclareGCMixinTraceMethod(info); |
1135 } | 1136 } |
1136 } | 1137 } |
1137 | 1138 |
1138 { | 1139 { |
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2047 | 2048 |
2048 private: | 2049 private: |
2049 BlinkGCPluginOptions options_; | 2050 BlinkGCPluginOptions options_; |
2050 }; | 2051 }; |
2051 | 2052 |
2052 } // namespace | 2053 } // namespace |
2053 | 2054 |
2054 static FrontendPluginRegistry::Add<BlinkGCPluginAction> X( | 2055 static FrontendPluginRegistry::Add<BlinkGCPluginAction> X( |
2055 "blink-gc-plugin", | 2056 "blink-gc-plugin", |
2056 "Check Blink GC invariants"); | 2057 "Check Blink GC invariants"); |
OLD | NEW |