From 057647d8783c01301a84bc09c9e5b667460c1ceb Mon Sep 17 00:00:00 2001 From: Artem Dergachev Date: Mon, 3 Dec 2018 22:19:05 +0000 Subject: [AST] [analyzer] NFC: Reuse code in stable ID dumping methods. Use the new fancy method introduced in r348197 to simplify some code. Differential Revision: https://reviews.llvm.org/D54488 llvm-svn: 348199 --- clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp') diff --git a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp index d76710004c8..d6bcbb96b55 100644 --- a/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp @@ -284,10 +284,7 @@ ExplodedNode * const *ExplodedNode::NodeGroup::end() const { } int64_t ExplodedNode::getID(ExplodedGraph *G) const { - Optional Out = G->getAllocator().identifyObject(this); - assert(Out && "Wrong allocator used"); - assert(*Out % alignof(ExplodedNode) == 0 && "Wrong alignment information"); - return *Out / alignof(ExplodedNode); + return G->getAllocator().identifyKnownAlignedObject(this); } bool ExplodedNode::isTrivial() const { -- cgit v1.2.3