Skip to content

Commit c6a7471

Browse files
committed
Use LLVM as a base for loading a custom style to mimic CLI clang-format's behavior
1 parent 69bbcba commit c6a7471

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

clang-format/ClangFormatCommand.mm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ - (void)performCommandWithInvocation:(XCSourceEditorCommandInvocation*)invocatio
142142
// parse style
143143
llvm::StringRef configString(reinterpret_cast<const char*>(config.bytes),
144144
config.length);
145+
clang::format::getPredefinedStyle("LLVM", language, &format);
145146
auto error = clang::format::parseConfiguration(configString, &format);
146147
if (error) {
147148
completionHandler([NSError

0 commit comments

Comments
 (0)