[PATCH] D125707: [analyzer][NFC] Remove unused friend SVal declarations

2022-05-27 Thread Balázs Benics via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd8def22f7be1: [analyzer][NFC] Remove unused friend SVal 
declarations (authored by steakhal).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125707/new/

https://reviews.llvm.org/D125707

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

Index: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
===
--- clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
+++ clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
@@ -218,11 +218,7 @@
 class UndefinedVal : public SVal {
 public:
   UndefinedVal() : SVal(UndefinedValKind) {}
-
   static bool classof(SVal V) { return V.getBaseKind() == UndefinedValKind; }
-
-private:
-  friend class SVal;
 };
 
 class DefinedOrUnknownSVal : public SVal {
@@ -239,9 +235,6 @@
   explicit DefinedOrUnknownSVal(const void *d, bool isLoc, unsigned ValKind)
   : SVal(d, isLoc, ValKind) {}
   explicit DefinedOrUnknownSVal(BaseKind k, void *D = nullptr) : SVal(k, D) {}
-
-private:
-  friend class SVal;
 };
 
 class UnknownVal : public DefinedOrUnknownSVal {
@@ -249,9 +242,6 @@
   explicit UnknownVal() : DefinedOrUnknownSVal(UnknownValKind) {}
 
   static bool classof(SVal V) { return V.getBaseKind() == UnknownValKind; }
-
-private:
-  friend class SVal;
 };
 
 class DefinedSVal : public DefinedOrUnknownSVal {
@@ -268,14 +258,10 @@
   DefinedSVal() = default;
   explicit DefinedSVal(const void *d, bool isLoc, unsigned ValKind)
   : DefinedOrUnknownSVal(d, isLoc, ValKind) {}
-
-private:
-  friend class SVal;
 };
 
 /// Represents an SVal that is guaranteed to not be UnknownVal.
 class KnownSVal : public SVal {
-  friend class SVal;
   KnownSVal() = default;
 
 public:
@@ -299,9 +285,6 @@
   }
 
   static bool classof(SVal V) { return V.getBaseKind() == NonLocKind; }
-
-private:
-  friend class SVal;
 };
 
 class Loc : public DefinedSVal {
@@ -319,9 +302,6 @@
   }
 
   static bool classof(SVal V) { return V.getBaseKind() == LocKind; }
-
-private:
-  friend class SVal;
 };
 
 //====//
@@ -352,9 +332,6 @@
   }
 
   static bool classof(NonLoc V) { return V.getSubKind() == SymbolValKind; }
-
-private:
-  friend class SVal;
 };
 
 /// Value representing integer constant.
@@ -378,7 +355,6 @@
   static bool classof(NonLoc V) { return V.getSubKind() == ConcreteIntKind; }
 
 private:
-  friend class SVal;
   ConcreteInt() = default;
 };
 
@@ -414,7 +390,6 @@
   static bool classof(NonLoc V) { return V.getSubKind() == LocAsIntegerKind; }
 
 private:
-  friend class SVal;
   LocAsInteger() = default;
 };
 
@@ -440,7 +415,6 @@
   static bool classof(NonLoc V) { return V.getSubKind() == CompoundValKind; }
 
 private:
-  friend class SVal;
   CompoundVal() = default;
 };
 
@@ -468,7 +442,6 @@
   }
 
 private:
-  friend class SVal;
   LazyCompoundVal() = default;
 };
 
@@ -517,8 +490,6 @@
   }
 
 private:
-  friend class SVal;
-
   PointerToMember() = default;
   explicit PointerToMember(const PTMDataType D)
   : NonLoc(PointerToMemberKind, D.getOpaqueValue()) {}
@@ -549,7 +520,6 @@
   static bool classof(Loc V) { return V.getSubKind() == GotoLabelKind; }
 
 private:
-  friend class SVal;
   GotoLabel() = default;
 };
 
@@ -587,7 +557,6 @@
   static bool classof(Loc V) { return V.getSubKind() == MemRegionValKind; }
 
 private:
-  friend class SVal;
   MemRegionVal() = default;
 };
 
@@ -606,7 +575,6 @@
   static bool classof(Loc V) { return V.getSubKind() == ConcreteIntKind; }
 
 private:
-  friend class SVal;
   ConcreteInt() = default;
 };
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D125707: [analyzer][NFC] Remove unused friend SVal declarations

2022-05-17 Thread Gabor Marton via Phabricator via cfe-commits
martong accepted this revision.
martong added a comment.
This revision is now accepted and ready to land.

LGTM


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125707/new/

https://reviews.llvm.org/D125707

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D125707: [analyzer][NFC] Remove unused friend SVal declarations

2022-05-16 Thread Balázs Benics via Phabricator via cfe-commits
steakhal created this revision.
steakhal added reviewers: NoQ, martong, Szelethus, balazske, ASDenysPetrov, 
bzcheeseman.
Herald added subscribers: manas, dkrupp, donat.nagy, mikhail.ramalho, 
a.sidorin, rnkovacs, szepet, baloghadamsoftware, xazax.hun.
Herald added a project: All.
steakhal requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D125707

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

Index: clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
===
--- clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
+++ clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
@@ -221,11 +221,7 @@
 class UndefinedVal : public SVal {
 public:
   UndefinedVal() : SVal(UndefinedValKind) {}
-
   static bool classof(SVal V) { return V.getBaseKind() == UndefinedValKind; }
-
-private:
-  friend class SVal;
 };
 
 class DefinedOrUnknownSVal : public SVal {
@@ -242,9 +238,6 @@
   explicit DefinedOrUnknownSVal(const void *d, bool isLoc, unsigned ValKind)
   : SVal(d, isLoc, ValKind) {}
   explicit DefinedOrUnknownSVal(BaseKind k, void *D = nullptr) : SVal(k, D) {}
-
-private:
-  friend class SVal;
 };
 
 class UnknownVal : public DefinedOrUnknownSVal {
@@ -252,9 +245,6 @@
   explicit UnknownVal() : DefinedOrUnknownSVal(UnknownValKind) {}
 
   static bool classof(SVal V) { return V.getBaseKind() == UnknownValKind; }
-
-private:
-  friend class SVal;
 };
 
 class DefinedSVal : public DefinedOrUnknownSVal {
@@ -271,14 +261,10 @@
   DefinedSVal() = default;
   explicit DefinedSVal(const void *d, bool isLoc, unsigned ValKind)
   : DefinedOrUnknownSVal(d, isLoc, ValKind) {}
-
-private:
-  friend class SVal;
 };
 
 /// Represents an SVal that is guaranteed to not be UnknownVal.
 class KnownSVal : public SVal {
-  friend class SVal;
   KnownSVal() = default;
 
 public:
@@ -302,9 +288,6 @@
   }
 
   static bool classof(SVal V) { return V.getBaseKind() == NonLocKind; }
-
-private:
-  friend class SVal;
 };
 
 class Loc : public DefinedSVal {
@@ -322,9 +305,6 @@
   }
 
   static bool classof(SVal V) { return V.getBaseKind() == LocKind; }
-
-private:
-  friend class SVal;
 };
 
 //====//
@@ -355,9 +335,6 @@
   }
 
   static bool classof(NonLoc V) { return V.getSubKind() == SymbolValKind; }
-
-private:
-  friend class SVal;
 };
 
 /// Value representing integer constant.
@@ -384,7 +361,6 @@
   static bool classof(NonLoc V) { return V.getSubKind() == ConcreteIntKind; }
 
 private:
-  friend class SVal;
   ConcreteInt() = default;
 };
 
@@ -427,7 +403,6 @@
   static bool classof(NonLoc V) { return V.getSubKind() == LocAsIntegerKind; }
 
 private:
-  friend class SVal;
   LocAsInteger() = default;
 };
 
@@ -453,7 +428,6 @@
   static bool classof(NonLoc V) { return V.getSubKind() == CompoundValKind; }
 
 private:
-  friend class SVal;
   CompoundVal() = default;
 };
 
@@ -481,7 +455,6 @@
   }
 
 private:
-  friend class SVal;
   LazyCompoundVal() = default;
 };
 
@@ -530,8 +503,6 @@
   }
 
 private:
-  friend class SVal;
-
   PointerToMember() = default;
   explicit PointerToMember(const PTMDataType D)
   : NonLoc(PointerToMemberKind, D.getOpaqueValue()) {}
@@ -562,7 +533,6 @@
   static bool classof(Loc V) { return V.getSubKind() == GotoLabelKind; }
 
 private:
-  friend class SVal;
   GotoLabel() = default;
 };
 
@@ -600,7 +570,6 @@
   static bool classof(Loc V) { return V.getSubKind() == MemRegionValKind; }
 
 private:
-  friend class SVal;
   MemRegionVal() = default;
 };
 
@@ -623,7 +592,6 @@
   static bool classof(Loc V) { return V.getSubKind() == ConcreteIntKind; }
 
 private:
-  friend class SVal;
   ConcreteInt() = default;
 };
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits