aboutsummaryrefslogtreecommitdiff
path: root/clang/unittests/Format/FormatTestCSharp.cpp
diff options
context:
space:
mode:
authorOwen Pan <owenpiano@gmail.com>2024-08-12 18:27:32 -0700
committerGitHub <noreply@github.com>2024-08-12 18:27:32 -0700
commitd990cc4568f45c28d1d5ac86125935628c76efc8 (patch)
tree60976fb343f2dadc6269421fb430b3e2346dea7a /clang/unittests/Format/FormatTestCSharp.cpp
parent7951673d408ee64744d0b924a49db78e8243d876 (diff)
downloadllvm-d990cc4568f45c28d1d5ac86125935628c76efc8.zip
llvm-d990cc4568f45c28d1d5ac86125935628c76efc8.tar.gz
llvm-d990cc4568f45c28d1d5ac86125935628c76efc8.tar.bz2
[clang-format] Correctly handle C# attribute on auto property (#102921)
Fixes #101487.
Diffstat (limited to 'clang/unittests/Format/FormatTestCSharp.cpp')
-rw-r--r--clang/unittests/Format/FormatTestCSharp.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/unittests/Format/FormatTestCSharp.cpp b/clang/unittests/Format/FormatTestCSharp.cpp
index 7166e4e..3b04238 100644
--- a/clang/unittests/Format/FormatTestCSharp.cpp
+++ b/clang/unittests/Format/FormatTestCSharp.cpp
@@ -1149,6 +1149,17 @@ public class SaleItem
public decimal Price { get; set; }
})",
MicrosoftStyle);
+
+ verifyFormat("internal class Program\n"
+ "{\n"
+ " bool AutoAllowKnownApps\n"
+ " {\n"
+ " get;\n"
+ " [Simple]\n"
+ " set;\n"
+ " }\n"
+ "}",
+ MicrosoftStyle);
}
TEST_F(FormatTestCSharp, DefaultLiteral) {