From 573f6313b0a82039b804bf0afad05f8fa3ef218e Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Fri, 12 Aug 2016 16:46:25 +0000 Subject: [PATCH] BugReporter: Use ilist_half_embedded_sentinel_traits, NFC This avoids duplicated code with llvm/ADT/ilist.h. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@278525 91177308-0d34-0410-b5e6-96231b3b80d8 --- .../Core/BugReporter/BugReporter.h | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h index 57c73fd6ec..02f56fc6bf 100644 --- a/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h +++ b/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h @@ -315,22 +315,9 @@ public: } // end clang namespace namespace llvm { - template<> struct ilist_traits - : public ilist_default_traits { - clang::ento::BugReport *createSentinel() const { - return static_cast(&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 Sentinel; - }; +template <> +struct ilist_sentinel_traits + : public ilist_half_embedded_sentinel_traits {}; } namespace clang { -- 2.40.0