@@ -218,11 +218,7 @@ inline raw_ostream &operator<<(raw_ostream &os, clang::ento::SVal V) {
218
218
class UndefinedVal : public SVal {
219
219
public:
220
220
UndefinedVal () : SVal(UndefinedValKind) {}
221
-
222
221
static bool classof (SVal V) { return V.getBaseKind () == UndefinedValKind; }
223
-
224
- private:
225
- friend class SVal ;
226
222
};
227
223
228
224
class DefinedOrUnknownSVal : public SVal {
@@ -239,19 +235,13 @@ class DefinedOrUnknownSVal : public SVal {
239
235
explicit DefinedOrUnknownSVal (const void *d, bool isLoc, unsigned ValKind)
240
236
: SVal(d, isLoc, ValKind) {}
241
237
explicit DefinedOrUnknownSVal (BaseKind k, void *D = nullptr ) : SVal(k, D) {}
242
-
243
- private:
244
- friend class SVal ;
245
238
};
246
239
247
240
class UnknownVal : public DefinedOrUnknownSVal {
248
241
public:
249
242
explicit UnknownVal () : DefinedOrUnknownSVal(UnknownValKind) {}
250
243
251
244
static bool classof (SVal V) { return V.getBaseKind () == UnknownValKind; }
252
-
253
- private:
254
- friend class SVal ;
255
245
};
256
246
257
247
class DefinedSVal : public DefinedOrUnknownSVal {
@@ -268,14 +258,10 @@ class DefinedSVal : public DefinedOrUnknownSVal {
268
258
DefinedSVal () = default ;
269
259
explicit DefinedSVal (const void *d, bool isLoc, unsigned ValKind)
270
260
: DefinedOrUnknownSVal(d, isLoc, ValKind) {}
271
-
272
- private:
273
- friend class SVal ;
274
261
};
275
262
276
263
// / Represents an SVal that is guaranteed to not be UnknownVal.
277
264
class KnownSVal : public SVal {
278
- friend class SVal ;
279
265
KnownSVal () = default ;
280
266
281
267
public:
@@ -299,9 +285,6 @@ class NonLoc : public DefinedSVal {
299
285
}
300
286
301
287
static bool classof (SVal V) { return V.getBaseKind () == NonLocKind; }
302
-
303
- private:
304
- friend class SVal ;
305
288
};
306
289
307
290
class Loc : public DefinedSVal {
@@ -319,9 +302,6 @@ class Loc : public DefinedSVal {
319
302
}
320
303
321
304
static bool classof (SVal V) { return V.getBaseKind () == LocKind; }
322
-
323
- private:
324
- friend class SVal ;
325
305
};
326
306
327
307
// ==------------------------------------------------------------------------==//
@@ -352,9 +332,6 @@ class SymbolVal : public NonLoc {
352
332
}
353
333
354
334
static bool classof (NonLoc V) { return V.getSubKind () == SymbolValKind; }
355
-
356
- private:
357
- friend class SVal ;
358
335
};
359
336
360
337
// / Value representing integer constant.
@@ -378,7 +355,6 @@ class ConcreteInt : public NonLoc {
378
355
static bool classof (NonLoc V) { return V.getSubKind () == ConcreteIntKind; }
379
356
380
357
private:
381
- friend class SVal ;
382
358
ConcreteInt () = default ;
383
359
};
384
360
@@ -414,7 +390,6 @@ class LocAsInteger : public NonLoc {
414
390
static bool classof (NonLoc V) { return V.getSubKind () == LocAsIntegerKind; }
415
391
416
392
private:
417
- friend class SVal ;
418
393
LocAsInteger () = default ;
419
394
};
420
395
@@ -440,7 +415,6 @@ class CompoundVal : public NonLoc {
440
415
static bool classof (NonLoc V) { return V.getSubKind () == CompoundValKind; }
441
416
442
417
private:
443
- friend class SVal ;
444
418
CompoundVal () = default ;
445
419
};
446
420
@@ -468,7 +442,6 @@ class LazyCompoundVal : public NonLoc {
468
442
}
469
443
470
444
private:
471
- friend class SVal ;
472
445
LazyCompoundVal () = default ;
473
446
};
474
447
@@ -517,8 +490,6 @@ class PointerToMember : public NonLoc {
517
490
}
518
491
519
492
private:
520
- friend class SVal ;
521
-
522
493
PointerToMember () = default ;
523
494
explicit PointerToMember (const PTMDataType D)
524
495
: NonLoc(PointerToMemberKind, D.getOpaqueValue()) {}
@@ -549,7 +520,6 @@ class GotoLabel : public Loc {
549
520
static bool classof (Loc V) { return V.getSubKind () == GotoLabelKind; }
550
521
551
522
private:
552
- friend class SVal ;
553
523
GotoLabel () = default ;
554
524
};
555
525
@@ -587,7 +557,6 @@ class MemRegionVal : public Loc {
587
557
static bool classof (Loc V) { return V.getSubKind () == MemRegionValKind; }
588
558
589
559
private:
590
- friend class SVal ;
591
560
MemRegionVal () = default ;
592
561
};
593
562
@@ -606,7 +575,6 @@ class ConcreteInt : public Loc {
606
575
static bool classof (Loc V) { return V.getSubKind () == ConcreteIntKind; }
607
576
608
577
private:
609
- friend class SVal ;
610
578
ConcreteInt () = default ;
611
579
};
612
580
0 commit comments