[Mlir-commits] [mlir] 6f1cab2 - [MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in PresburgerSetTest.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Wed Dec 10 01:25:48 PST 2025
Author: Mehdi Amini
Date: 2025-12-10T01:24:05-08:00
New Revision: 6f1cab2e905f1bb9fb263de3b360753c73ee2922
URL: https://github.com/llvm/llvm-project/commit/6f1cab2e905f1bb9fb263de3b360753c73ee2922
DIFF: https://github.com/llvm/llvm-project/commit/6f1cab2e905f1bb9fb263de3b360753c73ee2922.diff
LOG: [MLIR] Apply clang-tidy fixes for misc-use-internal-linkage in PresburgerSetTest.cpp (NFC)
Added:
Modified:
mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp
Removed:
################################################################################
diff --git a/mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp b/mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp
index 8e31a8bb2030b..c89b528bc7f7b 100644
--- a/mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp
+++ b/mlir/unittests/Analysis/Presburger/PresburgerSetTest.cpp
@@ -411,15 +411,18 @@ TEST(SetTest, isEqual) {
EXPECT_FALSE(rect.complement().isEqual(square.complement()));
}
-void expectEqual(const PresburgerSet &s, const PresburgerSet &t) {
+static void expectEqual(const PresburgerSet &s, const PresburgerSet &t) {
EXPECT_TRUE(s.isEqual(t));
}
-void expectEqual(const IntegerPolyhedron &s, const IntegerPolyhedron &t) {
+static void expectEqual(const IntegerPolyhedron &s,
+ const IntegerPolyhedron &t) {
EXPECT_TRUE(s.isEqual(t));
}
-void expectEmpty(const PresburgerSet &s) { EXPECT_TRUE(s.isIntegerEmpty()); }
+static void expectEmpty(const PresburgerSet &s) {
+ EXPECT_TRUE(s.isIntegerEmpty());
+}
TEST(SetTest, divisions) {
// evens = {x : exists q, x = 2q}.
@@ -453,12 +456,13 @@ TEST(SetTest, divisions) {
EXPECT_TRUE(setA.subtract(setB).isEqual(setA));
}
-void convertSuffixDimsToLocals(IntegerPolyhedron &poly, unsigned numLocals) {
+static void convertSuffixDimsToLocals(IntegerPolyhedron &poly,
+ unsigned numLocals) {
poly.convertVarKind(VarKind::SetDim, poly.getNumDimVars() - numLocals,
poly.getNumDimVars(), VarKind::Local);
}
-inline IntegerPolyhedron
+static inline IntegerPolyhedron
parseIntegerPolyhedronAndMakeLocals(StringRef str, unsigned numLocals) {
IntegerPolyhedron poly = parseIntegerPolyhedron(str);
convertSuffixDimsToLocals(poly, numLocals);
@@ -551,7 +555,7 @@ TEST(SetTest, subtractDuplicateDivsRegression) {
/// Coalesce `set` and check that the `newSet` is equal to `set` and that
/// `expectedNumPoly` matches the number of Poly in the coalesced set.
-void expectCoalesce(size_t expectedNumPoly, const PresburgerSet &set) {
+static void expectCoalesce(size_t expectedNumPoly, const PresburgerSet &set) {
PresburgerSet newSet = set.coalesce();
EXPECT_TRUE(set.isEqual(newSet));
EXPECT_TRUE(expectedNumPoly == newSet.getNumDisjuncts());
@@ -811,9 +815,9 @@ TEST(SetTest, computeVolume) {
// The last `numToProject` dims will be projected out, i.e., converted to
// locals.
-void testComputeReprAtPoints(IntegerPolyhedron poly,
- ArrayRef<SmallVector<int64_t, 4>> points,
- unsigned numToProject) {
+static void testComputeReprAtPoints(IntegerPolyhedron poly,
+ ArrayRef<SmallVector<int64_t, 4>> points,
+ unsigned numToProject) {
poly.convertVarKind(VarKind::SetDim, poly.getNumDimVars() - numToProject,
poly.getNumDimVars(), VarKind::Local);
PresburgerRelation repr = poly.computeReprWithOnlyDivLocals();
@@ -825,8 +829,9 @@ void testComputeReprAtPoints(IntegerPolyhedron poly,
}
}
-void testComputeRepr(IntegerPolyhedron poly, const PresburgerSet &expected,
- unsigned numToProject) {
+static void testComputeRepr(IntegerPolyhedron poly,
+ const PresburgerSet &expected,
+ unsigned numToProject) {
poly.convertVarKind(VarKind::SetDim, poly.getNumDimVars() - numToProject,
poly.getNumDimVars(), VarKind::Local);
PresburgerRelation repr = poly.computeReprWithOnlyDivLocals();
More information about the Mlir-commits
mailing list