[clang] [clang-format] Remove duplicates in @property using std::set (PR #74235)

Jared Grubb via cfe-commits cfe-commits at lists.llvm.org
Sun Dec 3 15:15:58 PST 2023


================
@@ -171,18 +171,18 @@ TEST_F(ObjCPropertyAttributeOrderFixerTest, HandlesDuplicatedAttributes) {
   Style.ObjCPropertyAttributeOrder = {"a", "b", "c"};
 
   // Just a dup and nothing else.
-  verifyFormat("@property(a, a) int p;", Style);
+  verifyFormat("@property(a) int p;", "@property(a, a) int p;", Style);
 
   // A dup and something else.
-  verifyFormat("@property(a, a, b) int p;", "@property(a, b, a) int p;", Style);
+  verifyFormat("@property(a, b) int p;", "@property(a, b, a) int p;", Style);
 
   // Duplicates using `=`: stable-sort irrespective of their value.
----------------
jaredgrubb wrote:

Nit: the comment about stable-sort isn't really applicable now.

https://github.com/llvm/llvm-project/pull/74235


More information about the cfe-commits mailing list