diff options
author | Owen Pan <owenpiano@gmail.com> | 2024-08-12 18:27:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-12 18:27:32 -0700 |
commit | d990cc4568f45c28d1d5ac86125935628c76efc8 (patch) | |
tree | 60976fb343f2dadc6269421fb430b3e2346dea7a /clang/unittests/Format/FormatTestCSharp.cpp | |
parent | 7951673d408ee64744d0b924a49db78e8243d876 (diff) | |
download | llvm-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.cpp | 11 |
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) { |