[clang] d8def22 - [analyzer][NFC] Remove unused friend SVal declarations
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Fri May 27 01:57:16 PDT 2022
Author: Balazs Benics
Date: 2022-05-27T10:54:25+02:00
New Revision: d8def22f7be120ab159220a9e6d450b26bf50bca
URL: https://github.com/llvm/llvm-project/commit/d8def22f7be120ab159220a9e6d450b26bf50bca
DIFF: https://github.com/llvm/llvm-project/commit/d8def22f7be120ab159220a9e6d450b26bf50bca.diff
LOG: [analyzer][NFC] Remove unused friend SVal declarations
Reviewed By: martong, xazax.hun
Differential Revision: https://reviews.llvm.org/D125707
Added:
Modified:
clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
Removed:
################################################################################
diff --git a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
index 16d7d54bf815..7086b889e6d1 100644
--- a/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
+++ b/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h
@@ -218,11 +218,7 @@ inline raw_ostream &operator<<(raw_ostream &os, clang::ento::SVal V) {
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 @@ class DefinedOrUnknownSVal : public SVal {
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 @@ class UnknownVal : public DefinedOrUnknownSVal {
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 @@ class DefinedSVal : public DefinedOrUnknownSVal {
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 @@ class NonLoc : public DefinedSVal {
}
static bool classof(SVal V) { return V.getBaseKind() == NonLocKind; }
-
-private:
- friend class SVal;
};
class Loc : public DefinedSVal {
@@ -319,9 +302,6 @@ class Loc : public DefinedSVal {
}
static bool classof(SVal V) { return V.getBaseKind() == LocKind; }
-
-private:
- friend class SVal;
};
//==------------------------------------------------------------------------==//
@@ -352,9 +332,6 @@ class SymbolVal : public NonLoc {
}
static bool classof(NonLoc V) { return V.getSubKind() == SymbolValKind; }
-
-private:
- friend class SVal;
};
/// Value representing integer constant.
@@ -378,7 +355,6 @@ class ConcreteInt : public NonLoc {
static bool classof(NonLoc V) { return V.getSubKind() == ConcreteIntKind; }
private:
- friend class SVal;
ConcreteInt() = default;
};
@@ -414,7 +390,6 @@ class LocAsInteger : public NonLoc {
static bool classof(NonLoc V) { return V.getSubKind() == LocAsIntegerKind; }
private:
- friend class SVal;
LocAsInteger() = default;
};
@@ -440,7 +415,6 @@ class CompoundVal : public NonLoc {
static bool classof(NonLoc V) { return V.getSubKind() == CompoundValKind; }
private:
- friend class SVal;
CompoundVal() = default;
};
@@ -468,7 +442,6 @@ class LazyCompoundVal : public NonLoc {
}
private:
- friend class SVal;
LazyCompoundVal() = default;
};
@@ -517,8 +490,6 @@ class PointerToMember : public NonLoc {
}
private:
- friend class SVal;
-
PointerToMember() = default;
explicit PointerToMember(const PTMDataType D)
: NonLoc(PointerToMemberKind, D.getOpaqueValue()) {}
@@ -549,7 +520,6 @@ class GotoLabel : public Loc {
static bool classof(Loc V) { return V.getSubKind() == GotoLabelKind; }
private:
- friend class SVal;
GotoLabel() = default;
};
@@ -587,7 +557,6 @@ class MemRegionVal : public Loc {
static bool classof(Loc V) { return V.getSubKind() == MemRegionValKind; }
private:
- friend class SVal;
MemRegionVal() = default;
};
@@ -606,7 +575,6 @@ class ConcreteInt : public Loc {
static bool classof(Loc V) { return V.getSubKind() == ConcreteIntKind; }
private:
- friend class SVal;
ConcreteInt() = default;
};
More information about the cfe-commits
mailing list