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

Unified Diff: tools/clang/plugins/FindBadConstructsConsumer.cpp

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/clang/plugins/FindBadConstructsConsumer.h ('k') | tools/clang/scripts/package.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/plugins/FindBadConstructsConsumer.cpp
diff --git a/tools/clang/plugins/FindBadConstructsConsumer.cpp b/tools/clang/plugins/FindBadConstructsConsumer.cpp
index 1400171de647bf0c2ca6a97ca755f33ea72fe143..c99c389879270d6e0283e0c2c5c503218c77b52f 100644
--- a/tools/clang/plugins/FindBadConstructsConsumer.cpp
+++ b/tools/clang/plugins/FindBadConstructsConsumer.cpp
@@ -641,20 +641,10 @@ FindBadConstructsConsumer::CheckRecordForRefcountIssue(
// Returns true if |base| specifies one of the Chromium reference counted
// classes (base::RefCounted / base::RefCountedThreadSafe).
-#if defined(LLVM_FORCE_HEAD_REVISION)
bool FindBadConstructsConsumer::IsRefCounted(
const CXXBaseSpecifier* base,
CXXBasePath& path) {
FindBadConstructsConsumer* self = this;
-#else
-// static
-bool FindBadConstructsConsumer::IsRefCountedCallback(
- const CXXBaseSpecifier* base,
- CXXBasePath& path,
- void* user_data) {
- FindBadConstructsConsumer* self =
- static_cast<FindBadConstructsConsumer*>(user_data);
-#endif
const TemplateSpecializationType* base_type =
dyn_cast<TemplateSpecializationType>(
UnwrapType(base->getType().getTypePtr()));
@@ -740,17 +730,11 @@ void FindBadConstructsConsumer::CheckRefCountedDtors(
// Determine if the current type is even ref-counted.
CXXBasePaths refcounted_path;
-#if defined(LLVM_FORCE_HEAD_REVISION)
if (!record->lookupInBases(
[this](const CXXBaseSpecifier* base, CXXBasePath& path) {
return IsRefCounted(base, path);
},
refcounted_path)) {
-#else
- if (!record->lookupInBases(&FindBadConstructsConsumer::IsRefCountedCallback,
- this,
- refcounted_path)) {
-#endif
return; // Class does not derive from a ref-counted base class.
}
@@ -800,18 +784,12 @@ void FindBadConstructsConsumer::CheckRefCountedDtors(
// Find all public destructors. This will record the class hierarchy
// that leads to the public destructor in |dtor_paths|.
CXXBasePaths dtor_paths;
-#if defined(LLVM_FORCE_HEAD_REVISION)
if (!record->lookupInBases(
[](const CXXBaseSpecifier* base, CXXBasePath& path) {
// TODO(thakis): Inline HasPublicDtorCallback() after clang roll.
return HasPublicDtorCallback(base, path, nullptr);
},
dtor_paths)) {
-#else
- if (!record->lookupInBases(&FindBadConstructsConsumer::HasPublicDtorCallback,
- nullptr,
- dtor_paths)) {
-#endif
return;
}
« no previous file with comments | « tools/clang/plugins/FindBadConstructsConsumer.h ('k') | tools/clang/scripts/package.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698