r278525 - BugReporter: Use ilist_half_embedded_sentinel_traits, NFC
Duncan P. N. Exon Smith via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 12 09:46:26 PDT 2016
Author: dexonsmith
Date: Fri Aug 12 11:46:25 2016
New Revision: 278525
URL: http://llvm.org/viewvc/llvm-project?rev=278525&view=rev
Log:
BugReporter: Use ilist_half_embedded_sentinel_traits, NFC
This avoids duplicated code with llvm/ADT/ilist.h. No functionality
change.
Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h?rev=278525&r1=278524&r2=278525&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h Fri Aug 12 11:46:25 2016
@@ -315,22 +315,9 @@ public:
} // end clang namespace
namespace llvm {
- template<> struct ilist_traits<clang::ento::BugReport>
- : public ilist_default_traits<clang::ento::BugReport> {
- clang::ento::BugReport *createSentinel() const {
- return static_cast<clang::ento::BugReport *>(&Sentinel);
- }
- void destroySentinel(clang::ento::BugReport *) const {}
-
- clang::ento::BugReport *provideInitialHead() const {
- return createSentinel();
- }
- clang::ento::BugReport *ensureHead(clang::ento::BugReport *) const {
- return createSentinel();
- }
- private:
- mutable ilist_half_node<clang::ento::BugReport> Sentinel;
- };
+template <>
+struct ilist_sentinel_traits<clang::ento::BugReport>
+ : public ilist_half_embedded_sentinel_traits<clang::ento::BugReport> {};
}
namespace clang {
More information about the cfe-commits
mailing list