Skip to content

Commit 24bba27

Browse files
authored
Fix PointsToInfo (#719)
* add vector include to PointsToInfo.h + create use * Add comment
1 parent 488da6a commit 24bba27

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

include/phasar/Pointer/PointsToInfo.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
#include "phasar/Utils/ByRef.h"
1515

1616
#include <cassert>
17-
#include <memory>
1817
#include <optional>
1918
#include <type_traits>
2019
#include <utility>
20+
#include <vector>
2121

2222
namespace psr {
2323

@@ -39,8 +39,10 @@ struct PointsToTraits<PointsToInfo<PTATraits>> : PTATraits {};
3939
template <typename PTATraits>
4040
class PointsToInfoRef<PTATraits,
4141
std::enable_if_t<is_PointsToTraits_v<PTATraits>>>
42-
: PointsToInfoBase<PointsToInfoRef<PTATraits>> {
42+
: public PointsToInfoBase<PointsToInfoRef<PTATraits>> {
4343
friend class PointsToInfo<PTATraits>;
44+
friend PointsToInfoBase<PointsToInfoRef<PTATraits>>;
45+
4446
using base_t = PointsToInfoBase<PointsToInfoRef<PTATraits>>;
4547

4648
public:

lib/Pointer/PointsToInfo.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
#include "llvm/ADT/STLExtras.h"
1919

2020
#include <array>
21+
#include <tuple>
2122
#include <utility>
2223

2324
namespace llvm {
@@ -151,6 +152,9 @@ class DummyFieldSensitivePointsToAnalysis
151152

152153
PointsToInfo<PointsToTraits<DummyFieldSensitivePointsToAnalysis>> TEPTA4(
153154
std::in_place_type<DummyFieldSensitivePointsToAnalysis>);
155+
156+
// Make sure, the template gets instantiated:
157+
std::ignore = TEPTA1.getInterestingPointersAt(nullptr);
154158
}
155159

156160
template class PointsToInfoBase<DummyFieldSensitivePointsToAnalysis>;

0 commit comments

Comments
 (0)