Skip to content

Commit

Permalink
[StaticAnalyzer] Fix failures due to the iteration order of ExplodedNode
Browse files Browse the repository at this point in the history
Summary:
This fixes failures seen in the reverse iteration builder:
http://lab.llvm.org:8011/builders/reverse-iteration/builds/26

Failing Tests (4):
    Clang :: Analysis/MisusedMovedObject.cpp
    Clang :: Analysis/keychainAPI.m
    Clang :: Analysis/loop-unrolling.cpp
    Clang :: Analysis/malloc.c

Reviewers: zaks.anna, bkramer, chandlerc, krememek, nikhgupt

Reviewed By: zaks.anna

Subscribers: dcoughlin, NoQ, cfe-commits

Differential Revision: https://reviews.llvm.org/D37400

llvm-svn: 312677
  • Loading branch information
Mandeep Singh Grang committed Sep 6, 2017
1 parent 442e28d commit 8557051
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -27,7 +27,7 @@
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
#include <memory>
Expand Down Expand Up @@ -404,7 +404,7 @@ class ExplodedGraph {
};

class ExplodedNodeSet {
typedef llvm::SmallPtrSet<ExplodedNode*,5> ImplTy;
typedef llvm::SmallSetVector<ExplodedNode*, 4> ImplTy;
ImplTy Impl;

public:
Expand All @@ -424,7 +424,7 @@ class ExplodedNodeSet {

unsigned size() const { return Impl.size(); }
bool empty() const { return Impl.empty(); }
bool erase(ExplodedNode *N) { return Impl.erase(N); }
bool erase(ExplodedNode *N) { return Impl.remove(N); }

void clear() { Impl.clear(); }
void insert(const ExplodedNodeSet &S) {
Expand Down

0 comments on commit 8557051

Please sign in to comment.