[PATCH] D148437: [clang-format] Dont interpret variable named interface as keyword for C++
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Apr 15 13:26:53 PDT 2023
owenpan added inline comments.
================
Comment at: clang/unittests/Format/FormatTest.cpp:25432
+TEST_F(FormatTest, InterfaceAsFieldName) {
+ FormatStyle Style = getLLVMStyle();
----------------
================
Comment at: clang/unittests/Format/FormatTest.cpp:25433-25439
+ FormatStyle Style = getLLVMStyle();
+
+ constexpr StringRef Code("class Foo {\n"
+ " int interface;\n"
+ " Foo::Foo(int iface) : interface{iface} {}\n"
+ "}\n");
+ verifyFormat(Code, Style);
----------------
The default style is LLVM.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148437/new/
https://reviews.llvm.org/D148437
More information about the cfe-commits
mailing list