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

Side by Side Diff: tools/clang/plugins/FindBadConstructsConsumer.h

Issue 1302053002: Roll Clang 243039:245402 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 | « no previous file | tools/clang/plugins/FindBadConstructsConsumer.cpp » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 file defines a bunch of recurring problems in the Chromium C++ code. 5 // This file defines a bunch of recurring problems in the Chromium C++ code.
6 // 6 //
7 // Checks that are implemented: 7 // Checks that are implemented:
8 // - Constructors/Destructors should not be inlined if they are of a complex 8 // - Constructors/Destructors should not be inlined if they are of a complex
9 // class type. 9 // class type.
10 // - Missing "virtual" keywords on methods that should be virtual. 10 // - Missing "virtual" keywords on methods that should be virtual.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void CheckVirtualBodies(const clang::CXXMethodDecl* method); 78 void CheckVirtualBodies(const clang::CXXMethodDecl* method);
79 79
80 void CountType(const clang::Type* type, 80 void CountType(const clang::Type* type,
81 int* trivial_member, 81 int* trivial_member,
82 int* non_trivial_member, 82 int* non_trivial_member,
83 int* templated_non_trivial_member); 83 int* templated_non_trivial_member);
84 84
85 static RefcountIssue CheckRecordForRefcountIssue( 85 static RefcountIssue CheckRecordForRefcountIssue(
86 const clang::CXXRecordDecl* record, 86 const clang::CXXRecordDecl* record,
87 clang::SourceLocation& loc); 87 clang::SourceLocation& loc);
88 #if defined(LLVM_FORCE_HEAD_REVISION)
89 bool IsRefCounted(const clang::CXXBaseSpecifier* base, 88 bool IsRefCounted(const clang::CXXBaseSpecifier* base,
90 clang::CXXBasePath& path); 89 clang::CXXBasePath& path);
91 #else
92 static bool IsRefCountedCallback(const clang::CXXBaseSpecifier* base,
93 clang::CXXBasePath& path,
94 void* user_data);
95 #endif
96 static bool HasPublicDtorCallback(const clang::CXXBaseSpecifier* base, 90 static bool HasPublicDtorCallback(const clang::CXXBaseSpecifier* base,
97 clang::CXXBasePath& path, 91 clang::CXXBasePath& path,
98 void* user_data); 92 void* user_data);
99 void PrintInheritanceChain(const clang::CXXBasePath& path); 93 void PrintInheritanceChain(const clang::CXXBasePath& path);
100 unsigned DiagnosticForIssue(RefcountIssue issue); 94 unsigned DiagnosticForIssue(RefcountIssue issue);
101 void CheckRefCountedDtors(clang::SourceLocation record_location, 95 void CheckRefCountedDtors(clang::SourceLocation record_location,
102 clang::CXXRecordDecl* record); 96 clang::CXXRecordDecl* record);
103 97
104 void CheckWeakPtrFactoryMembers(clang::SourceLocation record_location, 98 void CheckWeakPtrFactoryMembers(clang::SourceLocation record_location,
105 clang::CXXRecordDecl* record); 99 clang::CXXRecordDecl* record);
106 100
107 unsigned diag_method_requires_override_; 101 unsigned diag_method_requires_override_;
108 unsigned diag_redundant_virtual_specifier_; 102 unsigned diag_redundant_virtual_specifier_;
109 unsigned diag_base_method_virtual_and_final_; 103 unsigned diag_base_method_virtual_and_final_;
110 unsigned diag_no_explicit_dtor_; 104 unsigned diag_no_explicit_dtor_;
111 unsigned diag_public_dtor_; 105 unsigned diag_public_dtor_;
112 unsigned diag_protected_non_virtual_dtor_; 106 unsigned diag_protected_non_virtual_dtor_;
113 unsigned diag_weak_ptr_factory_order_; 107 unsigned diag_weak_ptr_factory_order_;
114 unsigned diag_bad_enum_last_value_; 108 unsigned diag_bad_enum_last_value_;
115 unsigned diag_note_inheritance_; 109 unsigned diag_note_inheritance_;
116 unsigned diag_note_implicit_dtor_; 110 unsigned diag_note_implicit_dtor_;
117 unsigned diag_note_public_dtor_; 111 unsigned diag_note_public_dtor_;
118 unsigned diag_note_protected_non_virtual_dtor_; 112 unsigned diag_note_protected_non_virtual_dtor_;
119 }; 113 };
120 114
121 } // namespace chrome_checker 115 } // namespace chrome_checker
122 116
123 #endif // TOOLS_CLANG_PLUGINS_FINDBADCONSTRUCTSCONSUMER_H_ 117 #endif // TOOLS_CLANG_PLUGINS_FINDBADCONSTRUCTSCONSUMER_H_
OLDNEW
« no previous file with comments | « no previous file | tools/clang/plugins/FindBadConstructsConsumer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698