Skip to content

Commit d8def22

Browse files
author
Balazs Benics
committed
[analyzer][NFC] Remove unused friend SVal declarations
Reviewed By: martong, xazax.hun Differential Revision: https://reviews.llvm.org/D125707
1 parent e37b287 commit d8def22

File tree

1 file changed

+0
-32
lines changed
  • clang/include/clang/StaticAnalyzer/Core/PathSensitive

1 file changed

+0
-32
lines changed

clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,7 @@ inline raw_ostream &operator<<(raw_ostream &os, clang::ento::SVal V) {
218218
class UndefinedVal : public SVal {
219219
public:
220220
UndefinedVal() : SVal(UndefinedValKind) {}
221-
222221
static bool classof(SVal V) { return V.getBaseKind() == UndefinedValKind; }
223-
224-
private:
225-
friend class SVal;
226222
};
227223

228224
class DefinedOrUnknownSVal : public SVal {
@@ -239,19 +235,13 @@ class DefinedOrUnknownSVal : public SVal {
239235
explicit DefinedOrUnknownSVal(const void *d, bool isLoc, unsigned ValKind)
240236
: SVal(d, isLoc, ValKind) {}
241237
explicit DefinedOrUnknownSVal(BaseKind k, void *D = nullptr) : SVal(k, D) {}
242-
243-
private:
244-
friend class SVal;
245238
};
246239

247240
class UnknownVal : public DefinedOrUnknownSVal {
248241
public:
249242
explicit UnknownVal() : DefinedOrUnknownSVal(UnknownValKind) {}
250243

251244
static bool classof(SVal V) { return V.getBaseKind() == UnknownValKind; }
252-
253-
private:
254-
friend class SVal;
255245
};
256246

257247
class DefinedSVal : public DefinedOrUnknownSVal {
@@ -268,14 +258,10 @@ class DefinedSVal : public DefinedOrUnknownSVal {
268258
DefinedSVal() = default;
269259
explicit DefinedSVal(const void *d, bool isLoc, unsigned ValKind)
270260
: DefinedOrUnknownSVal(d, isLoc, ValKind) {}
271-
272-
private:
273-
friend class SVal;
274261
};
275262

276263
/// Represents an SVal that is guaranteed to not be UnknownVal.
277264
class KnownSVal : public SVal {
278-
friend class SVal;
279265
KnownSVal() = default;
280266

281267
public:
@@ -299,9 +285,6 @@ class NonLoc : public DefinedSVal {
299285
}
300286

301287
static bool classof(SVal V) { return V.getBaseKind() == NonLocKind; }
302-
303-
private:
304-
friend class SVal;
305288
};
306289

307290
class Loc : public DefinedSVal {
@@ -319,9 +302,6 @@ class Loc : public DefinedSVal {
319302
}
320303

321304
static bool classof(SVal V) { return V.getBaseKind() == LocKind; }
322-
323-
private:
324-
friend class SVal;
325305
};
326306

327307
//==------------------------------------------------------------------------==//
@@ -352,9 +332,6 @@ class SymbolVal : public NonLoc {
352332
}
353333

354334
static bool classof(NonLoc V) { return V.getSubKind() == SymbolValKind; }
355-
356-
private:
357-
friend class SVal;
358335
};
359336

360337
/// Value representing integer constant.
@@ -378,7 +355,6 @@ class ConcreteInt : public NonLoc {
378355
static bool classof(NonLoc V) { return V.getSubKind() == ConcreteIntKind; }
379356

380357
private:
381-
friend class SVal;
382358
ConcreteInt() = default;
383359
};
384360

@@ -414,7 +390,6 @@ class LocAsInteger : public NonLoc {
414390
static bool classof(NonLoc V) { return V.getSubKind() == LocAsIntegerKind; }
415391

416392
private:
417-
friend class SVal;
418393
LocAsInteger() = default;
419394
};
420395

@@ -440,7 +415,6 @@ class CompoundVal : public NonLoc {
440415
static bool classof(NonLoc V) { return V.getSubKind() == CompoundValKind; }
441416

442417
private:
443-
friend class SVal;
444418
CompoundVal() = default;
445419
};
446420

@@ -468,7 +442,6 @@ class LazyCompoundVal : public NonLoc {
468442
}
469443

470444
private:
471-
friend class SVal;
472445
LazyCompoundVal() = default;
473446
};
474447

@@ -517,8 +490,6 @@ class PointerToMember : public NonLoc {
517490
}
518491

519492
private:
520-
friend class SVal;
521-
522493
PointerToMember() = default;
523494
explicit PointerToMember(const PTMDataType D)
524495
: NonLoc(PointerToMemberKind, D.getOpaqueValue()) {}
@@ -549,7 +520,6 @@ class GotoLabel : public Loc {
549520
static bool classof(Loc V) { return V.getSubKind() == GotoLabelKind; }
550521

551522
private:
552-
friend class SVal;
553523
GotoLabel() = default;
554524
};
555525

@@ -587,7 +557,6 @@ class MemRegionVal : public Loc {
587557
static bool classof(Loc V) { return V.getSubKind() == MemRegionValKind; }
588558

589559
private:
590-
friend class SVal;
591560
MemRegionVal() = default;
592561
};
593562

@@ -606,7 +575,6 @@ class ConcreteInt : public Loc {
606575
static bool classof(Loc V) { return V.getSubKind() == ConcreteIntKind; }
607576

608577
private:
609-
friend class SVal;
610578
ConcreteInt() = default;
611579
};
612580

0 commit comments

Comments
 (0)