diff --git a/.gitignore b/.gitignore index 52ef58c5d36..551fb12a088 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ build/windows/launch4j-*.zip build/windows/launcher/launch4j build/windows/WinAVR-*.zip build/macosx/arduino-*.zip +build/macosx/clang*.zip build/macosx/dist/*.tar.gz build/macosx/dist/*.tar.bz2 build/macosx/*.tar.bz2 diff --git a/app/src/cc/arduino/packages/formatter/AStyle.java b/app/src/cc/arduino/packages/formatter/AStyle.java deleted file mode 100644 index 70b6717ff66..00000000000 --- a/app/src/cc/arduino/packages/formatter/AStyle.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * This file is part of Arduino. - * - * Arduino is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * As a special exception, you may use this file as part of a free software - * library without restriction. Specifically, if other files instantiate - * templates or use macros or inline functions from this file, or you compile - * this file and link it with other files to produce an executable, this - * file does not by itself cause the resulting executable to be covered by - * the GNU General Public License. This exception does not however - * invalidate any other reasons why the executable file might be covered by - * the GNU General Public License. - * - * Copyright 2015 Arduino LLC (http://www.arduino.cc/) - */ - -package cc.arduino.packages.formatter; - -import processing.app.Base; -import processing.app.BaseNoGui; -import processing.app.Editor; -import processing.app.helpers.FileUtils; -import processing.app.tools.Tool; - -import java.io.File; -import java.io.IOException; - -import static processing.app.I18n.tr; - -public class AStyle implements Tool { - - private static final String FORMATTER_CONF = "formatter.conf"; - - private final AStyleInterface aStyleInterface; - private final String formatterConfiguration; - private Editor editor; - - public AStyle() { - this.aStyleInterface = new AStyleInterface(); - File customFormatterConf = BaseNoGui.getSettingsFile(FORMATTER_CONF); - File defaultFormatterConf = new File(Base.getContentFile("lib"), FORMATTER_CONF); - - File formatterConf; - if (customFormatterConf.exists()) { - formatterConf = customFormatterConf; - } else { - formatterConf = defaultFormatterConf; - } - String formatterConfiguration = ""; - - try { - formatterConfiguration = FileUtils.readFileToString(formatterConf); - } catch (IOException e) { - // ignored - } - this.formatterConfiguration = formatterConfiguration; - } - - @Override - public void init(Editor editor) { - this.editor = editor; - } - - @Override - public void run() { - String originalText = editor.getCurrentTab().getText(); - String formattedText = aStyleInterface.AStyleMain(originalText, formatterConfiguration); - - if (formattedText.equals(originalText)) { - editor.statusNotice(tr("No changes necessary for Auto Format.")); - return; - } - - editor.getCurrentTab().setText(formattedText); - - // mark as finished - editor.statusNotice(tr("Auto Format finished.")); - } - - @Override - public String getMenuTitle() { - return tr("Auto Format"); - } - -} diff --git a/app/src/cc/arduino/packages/formatter/AStyleInterface.java b/app/src/cc/arduino/packages/formatter/AStyleInterface.java deleted file mode 100644 index 4224bf164e7..00000000000 --- a/app/src/cc/arduino/packages/formatter/AStyleInterface.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * This file is part of Arduino. - * - * Arduino is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * As a special exception, you may use this file as part of a free software - * library without restriction. Specifically, if other files instantiate - * templates or use macros or inline functions from this file, or you compile - * this file and link it with other files to produce an executable, this - * file does not by itself cause the resulting executable to be covered by - * the GNU General Public License. This exception does not however - * invalidate any other reasons why the executable file might be covered by - * the GNU General Public License. - * - * Copyright 2015 Arduino LLC (http://www.arduino.cc/) - */ - -package cc.arduino.packages.formatter; - -import processing.app.Base; -import processing.app.helpers.OSUtils; - -import java.io.File; - -public class AStyleInterface { - - static { - if (OSUtils.isWindows()) { - loadLib(Base.getContentFile(System.mapLibraryName("msvcp100"))); - loadLib(Base.getContentFile(System.mapLibraryName("msvcr100"))); - } - loadLib(new File(Base.getContentFile("lib"), System.mapLibraryName("astylej"))); - } - - private static void loadLib(File lib) { - try { - System.load(lib.getAbsolutePath()); - } catch (UnsatisfiedLinkError e) { - e.printStackTrace(); - System.out.println(e.getMessage()); - System.out.println("Cannot load native library " + lib.getAbsolutePath()); - System.out.println("The program has terminated!"); - System.exit(1); - } - } - - /** - * Calls the AStyleMain function in Artistic Style. - * - * @param textIn A string containing the source code to be formatted. - * @param options A string of options to Artistic Style. - * @return A String containing the formatted source from Artistic Style. - */ - public native String AStyleMain(String textIn, String options); - - /** - * Calls the AStyleGetVersion function in Artistic Style. - * - * @return A String containing the version number of Artistic Style. - */ - public native String AStyleGetVersion(); - - /** - * Error handler for messages from Artistic Style. - * This method is called only if there are errors when AStyleMain is called. - * This is for debugging and there should be no errors when the calling - * parameters are correct. - * Changing the method name requires changing Artistic Style. - * Signature: (ILjava/lang/String;)V. - * - * @param errorNumber The error number from Artistic Style. - * @param errorMessage The error message from Artistic Style. - */ - private void ErrorHandler(int errorNumber, String errorMessage) { - System.out.println("AStyle error " + String.valueOf(errorNumber) + " - " + errorMessage); - } - -} diff --git a/app/src/cc/arduino/packages/formatter/clangformat/ClangFormat.java b/app/src/cc/arduino/packages/formatter/clangformat/ClangFormat.java new file mode 100644 index 00000000000..d4a69b6480b --- /dev/null +++ b/app/src/cc/arduino/packages/formatter/clangformat/ClangFormat.java @@ -0,0 +1,186 @@ +/* + * This file is part of Arduino. + * + * Arduino is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + * As a special exception, you may use this file as part of a free software + * library without restriction. Specifically, if other files instantiate + * templates or use macros or inline functions from this file, or you compile + * this file and link it with other files to produce an executable, this + * file does not by itself cause the resulting executable to be covered by + * the GNU General Public License. This exception does not however + * invalidate any other reasons why the executable file might be covered by + * the GNU General Public License. + * + * Copyright 2021 Arduino LLC (http://www.arduino.cc/) + */ + +package cc.arduino.packages.formatter.clangformat; + +import static processing.app.I18n.tr; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import org.apache.commons.compress.utils.IOUtils; + +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; + +import processing.app.Base; +import processing.app.BaseNoGui; +import processing.app.Editor; +import processing.app.syntax.SketchTextArea; + +public class ClangFormat implements Runnable { + + private final String clangExecutable = Base.getContentFile("clang-format") + .getAbsolutePath(); + private Editor editor; + + public ClangFormat(Editor editor) { + this.editor = editor; + } + + @Override + public void run() { + SketchTextArea tab = editor.getCurrentTab().getTextArea(); + String originalText = tab.getText(); + int cursorOffset = tab.getCaretPosition(); + try { + FormatResult result = runClangFormatOn(originalText, cursorOffset); + if (result.FormattedText.equals(originalText)) { + editor.statusNotice(tr("No changes necessary for Auto Format.")); + return; + } + + // To keep cursor position after UNDO we produce a bogus edit (insertion + // and removal of a " " at cursor position) and we compound this change + // with the full auto-format update. + tab.beginAtomicEdit(); + tab.insert(" ", cursorOffset); + tab.replaceRange("", cursorOffset, cursorOffset + 1); + tab.setText(result.FormattedText); + tab.endAtomicEdit(); + + tab.setCaretPosition(result.Cursor); + + editor.statusNotice(tr("Auto Format finished.")); + } catch (IOException | InterruptedException e) { + editor.statusError("Auto format error: " + e.getMessage()); + e.printStackTrace(); + } catch (ClangException e) { + editor.statusError("Auto format error: " + e.getMessage()); + } + } + + private Thread copyAndClose(InputStream input, OutputStream output) { + Thread t = new Thread(() -> { + try { + IOUtils.copy(input, output); + } catch (IOException e) { + e.printStackTrace(); + } + try { + input.close(); + } catch (IOException e) { + e.printStackTrace(); + } + try { + output.close(); + } catch (IOException e) { + e.printStackTrace(); + } + }); + t.start(); + return t; + } + + private File findConfigFile() { + // check if sketch has a config file + File sketchDir = editor.getSketch().getFolder(); + if (new File(sketchDir, ".clang-format").isFile()) { + return sketchDir; + } + + // check if a global config file exists + if (BaseNoGui.getSettingsFile(".clang-format").isFile()) { + return BaseNoGui.getSettingsFolder(); + } + + // otherwise: no custom configs, return Arduino IDE app dir. + return new File(clangExecutable).getParentFile(); + } + + FormatResult runClangFormatOn(String source, int cursorOffset) + throws IOException, InterruptedException, ClangException { + String cmd[] = new String[] { clangExecutable, "--cursor=" + cursorOffset }; + + Process process = Runtime.getRuntime().exec(cmd, null, findConfigFile()); + ByteArrayOutputStream clangOutput = new ByteArrayOutputStream(); + ByteArrayOutputStream clangError = new ByteArrayOutputStream(); + ByteArrayInputStream dataOut = new ByteArrayInputStream(source.getBytes()); + + Thread in = copyAndClose(dataOut, process.getOutputStream()); + Thread err = copyAndClose(process.getErrorStream(), clangError); + Thread out = copyAndClose(process.getInputStream(), clangOutput); + + int r = process.waitFor(); + in.join(); + out.join(); + err.join(); + + if (r != 0) { + throw new ClangException(clangError.toString()); + } + + // clang-format will output first a JSON object with: + // - the resulting cursor position and + // - a flag teling if the conversion was successful + // for example: + // + // { "Cursor": 34, "IncompleteFormat": false } + ObjectMapper mapper = new ObjectMapper(); + mapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true); + mapper.configure(DeserializationFeature.EAGER_DESERIALIZER_FETCH, true); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + FormatResult res = mapper.readValue(clangOutput.toByteArray(), + FormatResult.class); + + // After the JSON object above clang-format will output the formatted source + // code in plain text + String formattedText = clangOutput.toString(); + formattedText = formattedText.substring(formattedText.indexOf('}') + 1); + // handle different line endings + res.FormattedText = formattedText.replaceFirst("\\R", ""); + return res; + } +} + +class ClangException extends Exception { + public ClangException(String string) { + super(string); + } +} + +class FormatResult { + public String FormattedText; + public int Cursor; + public boolean IncompleteFormat; +} diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index c1be9b5efa2..5d590b8c7bd 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -89,6 +89,7 @@ import cc.arduino.packages.BoardPort; import cc.arduino.packages.MonitorFactory; import cc.arduino.packages.Uploader; +import cc.arduino.packages.formatter.clangformat.ClangFormat; import cc.arduino.packages.uploaders.SerialUploader; import cc.arduino.view.GoToLineNumber; import cc.arduino.view.StubMenuListener; @@ -234,13 +235,15 @@ public boolean test(SketchController controller) { private UploadHandler uploadUsingProgrammerHandler; private Runnable timeoutUploadHandler; - private Map internalToolCache = new HashMap(); + private Map internalToolCache = new HashMap<>(); + + final ClangFormat formatter; public Editor(Base ibase, File file, int[] storedLocation, int[] defaultLocation, Platform platform) throws Exception { super("Arduino"); this.base = ibase; this.platform = platform; - + this.formatter = new ClangFormat(this); Base.setIcon(this); // Install default actions for Run, Present, etc. @@ -981,24 +984,19 @@ private Tool getOrCreateToolInstance(String className) { } private void addInternalTools(JMenu menu) { - JMenuItem item; - - item = createToolMenuItem("cc.arduino.packages.formatter.AStyle"); - if (item == null) { - throw new NullPointerException("Tool cc.arduino.packages.formatter.AStyle unavailable"); - } - item.setName("menuToolsAutoFormat"); + JMenuItem autoFormat = new JMenuItem(tr("Auto Format")); + autoFormat.setName("menuToolsAutoFormat"); + autoFormat.addActionListener(event -> SwingUtilities.invokeLater(formatter)); int modifiers = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(); - item.setAccelerator(KeyStroke.getKeyStroke('T', modifiers)); - menu.add(item); + autoFormat.setAccelerator(KeyStroke.getKeyStroke('T', modifiers)); + menu.add(autoFormat); - //menu.add(createToolMenuItem("processing.app.tools.CreateFont")); - //menu.add(createToolMenuItem("processing.app.tools.ColorSelector")); + // menu.add(createToolMenuItem("processing.app.tools.CreateFont")); + // menu.add(createToolMenuItem("processing.app.tools.ColorSelector")); menu.add(createToolMenuItem("processing.app.tools.Archiver")); menu.add(createToolMenuItem("processing.app.tools.FixEncoding")); } - private void selectSerialPort(String name) { if(portMenu == null) { System.out.println(tr("serialMenu is null")); @@ -1837,7 +1835,7 @@ public void updateTitle() { SketchFile current = getCurrentTab().getSketchFile(); String customFormat = PreferencesData.get("editor.custom_title_format"); if (customFormat != null && !customFormat.trim().isEmpty()) { - Map titleMap = new HashMap(); + Map titleMap = new HashMap<>(); titleMap.put("file", current.getFileName()); String path = sketch.getFolder().getAbsolutePath(); titleMap.put("folder", path); @@ -1896,8 +1894,7 @@ private boolean handleSave2() { boolean saved = false; try { if (PreferencesData.getBoolean("editor.autoformat_currentfile_before_saving")) { - Tool formatTool = getOrCreateToolInstance("cc.arduino.packages.formatter.AStyle"); - formatTool.run(); + formatter.run(); } boolean wasReadOnly = sketchController.isReadOnly(); diff --git a/app/src/processing/app/EditorTab.java b/app/src/processing/app/EditorTab.java index 5e8f3e4bfcf..e77b7a65fd6 100644 --- a/app/src/processing/app/EditorTab.java +++ b/app/src/processing/app/EditorTab.java @@ -39,6 +39,7 @@ import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JPopupMenu; +import javax.swing.SwingUtilities; import javax.swing.ToolTipManager; import javax.swing.border.MatteBorder; import javax.swing.event.PopupMenuEvent; @@ -197,15 +198,12 @@ private void configurePopupMenu(final SketchTextArea textarea){ menu.addSeparator(); - JMenuItem item = editor.createToolMenuItem("cc.arduino.packages.formatter.AStyle"); - if (item == null) { - throw new NullPointerException("Tool cc.arduino.packages.formatter.AStyle unavailable"); - } - item.setName("menuToolsAutoFormat"); - - menu.add(item); + JMenuItem autoFormat = new JMenuItem(tr("Auto Format")); + autoFormat.addActionListener(event -> SwingUtilities.invokeLater(editor.formatter)); + autoFormat.setName("menuToolsAutoFormat"); + menu.add(autoFormat); - item = new JMenuItem(tr("Comment/Uncomment"), '/'); + JMenuItem item = new JMenuItem(tr("Comment/Uncomment"), '/'); item.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { handleCommentUncomment(); diff --git a/app/test/processing/app/AutoformatProducesOneUndoActionTest.java b/app/test/processing/app/AutoformatProducesOneUndoActionTest.java index 33314b4a197..f24ec92eaff 100644 --- a/app/test/processing/app/AutoformatProducesOneUndoActionTest.java +++ b/app/test/processing/app/AutoformatProducesOneUndoActionTest.java @@ -48,12 +48,10 @@ public class AutoformatProducesOneUndoActionTest extends AbstractGUITest { "}"; public static final String SOURCE_AFTER = "void setup() {\n" + " // put your setup code here, to run once:\n" + - "\n" + "}\n" + "\n" + "void loop() {\n" + " // put your main code here, to run repeatedly:\n" + - "\n" + "}"; @Test @@ -74,7 +72,8 @@ public void shouldSaveCaretPositionAfterAutoformat() { String formattedText = editor.getText(); assertEquals(SOURCE_AFTER, formattedText); - assertEquals(29, editor.getCaretPosition()); + // Autoformat with clang-format keeps cursor relative to source code + assertEquals(17, editor.getCaretPosition()); menuEditUndo.requireEnabled(); menuEditUndo.click(); diff --git a/app/test/processing/app/AutoformatSavesCaretPositionTest.java b/app/test/processing/app/AutoformatSavesCaretPositionTest.java index fb311707d53..15dc977ce07 100644 --- a/app/test/processing/app/AutoformatSavesCaretPositionTest.java +++ b/app/test/processing/app/AutoformatSavesCaretPositionTest.java @@ -60,15 +60,14 @@ public void shouldSaveCaretPositionAfterAutoformat() { String formattedText = editor.getText(); assertEquals("void setup() {\n" + " // put your setup code here, to run once:\n" + - "\n" + "}\n" + "\n" + "void loop() {\n" + " // put your main code here, to run repeatedly:\n" + - "\n" + "}", formattedText); - assertEquals(29, editor.getCaretPosition()); + // Autoformat with clang-format keeps cursor relative to source code + assertEquals(17, editor.getCaretPosition()); } diff --git a/app/test/processing/app/AutoformatTest.java b/app/test/processing/app/AutoformatTest.java index 2b87b17571c..c8f0edc066f 100644 --- a/app/test/processing/app/AutoformatTest.java +++ b/app/test/processing/app/AutoformatTest.java @@ -58,8 +58,8 @@ public void shouldProduceNicelyFormattedCode() throws Exception { String formattedText = editor.getText(); assertEquals("void setup() {\n" + " // put your setup code here, to run once:\n" + - " int foo[] = { 1, 2, 3, 4, 5};\n" + - " int foo[2][5] = {{1, 2, 3, 4, 5}, {6, 7, 8, 9, 10}};\n" + + " int foo[] = { 1, 2, 3, 4, 5 };\n" + + " int foo[2][5] = { { 1, 2, 3, 4, 5 }, { 6, 7, 8, 9, 10 } };\n" + "}\n" + "\n" + "void loop() {\n" + diff --git a/build/build.xml b/build/build.xml index b4e0ef8ea1d..71810ed8b1f 100644 --- a/build/build.xml +++ b/build/build.xml @@ -50,6 +50,16 @@ + + + + + + + + + + @@ -108,6 +118,7 @@ + @@ -223,6 +234,8 @@ + + @@ -316,6 +329,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -492,17 +525,6 @@ - - - - - - - - - - - @@ -680,16 +702,7 @@ - - - - - - - - - - + @@ -702,19 +715,9 @@ - - - - - - - - - - - + @@ -727,10 +730,9 @@ - - + @@ -748,16 +750,7 @@ - - - - - - - - - - + @@ -772,7 +765,7 @@ - + @@ -790,7 +783,7 @@ - + @@ -808,7 +801,7 @@ - + @@ -1069,13 +1062,6 @@ - - - - - - - diff --git a/build/libastylej-2.05.1-5.zip.sha b/build/libastylej-2.05.1-5.zip.sha deleted file mode 100644 index 7ae7b7a6233..00000000000 --- a/build/libastylej-2.05.1-5.zip.sha +++ /dev/null @@ -1 +0,0 @@ -06032c6429c8cdd74e5b94cceaa2785987e442e0 diff --git a/build/linux/clang_12.0.0_Linux_32bit.zip.sha b/build/linux/clang_12.0.0_Linux_32bit.zip.sha new file mode 100644 index 00000000000..c0a4366e62c --- /dev/null +++ b/build/linux/clang_12.0.0_Linux_32bit.zip.sha @@ -0,0 +1 @@ +b10e77fb79a41880766439dc65cd8aaa328af5bc diff --git a/build/linux/clang_12.0.0_Linux_64bit.zip.sha b/build/linux/clang_12.0.0_Linux_64bit.zip.sha new file mode 100644 index 00000000000..344724de285 --- /dev/null +++ b/build/linux/clang_12.0.0_Linux_64bit.zip.sha @@ -0,0 +1 @@ +e3fe347cdb2e4b7b1c92b8e21b4aae49eeaaad55 diff --git a/build/linux/clang_12.0.0_Linux_ARM64.zip.sha b/build/linux/clang_12.0.0_Linux_ARM64.zip.sha new file mode 100644 index 00000000000..fdaa6199491 --- /dev/null +++ b/build/linux/clang_12.0.0_Linux_ARM64.zip.sha @@ -0,0 +1 @@ +a81b7e8c6c5922fbcd423228f13a1148a91a3932 diff --git a/build/linux/clang_12.0.0_Linux_ARMv6.zip.sha b/build/linux/clang_12.0.0_Linux_ARMv6.zip.sha new file mode 100644 index 00000000000..c6dc14dad63 --- /dev/null +++ b/build/linux/clang_12.0.0_Linux_ARMv6.zip.sha @@ -0,0 +1 @@ +d10ae0b04eadf9fd0fa52d16549a2c6bec482738 diff --git a/build/macosx/clang_12.0.0_macOS_64bit.zip.sha b/build/macosx/clang_12.0.0_macOS_64bit.zip.sha new file mode 100644 index 00000000000..c231be1880f --- /dev/null +++ b/build/macosx/clang_12.0.0_macOS_64bit.zip.sha @@ -0,0 +1 @@ +154b62e3062b5040594155702c7c7508d18c6b3a diff --git a/build/shared/clang-format-arduino b/build/shared/clang-format-arduino new file mode 100644 index 00000000000..f95490cfdf4 --- /dev/null +++ b/build/shared/clang-format-arduino @@ -0,0 +1,145 @@ +# See: https://releases.llvm.org/11.0.1/tools/clang/docs/ClangFormatStyleOptions.html +--- +Language: Cpp +# LLVM is the default style setting, used when a configuration option is not set here +BasedOnStyle: LLVM +AccessModifierOffset: -2 +AlignAfterOpenBracket: Align +AlignConsecutiveAssignments: false +AlignConsecutiveBitFields: false +AlignConsecutiveDeclarations: false +AlignConsecutiveMacros: false +AlignEscapedNewlines: DontAlign +AlignOperands: Align +AlignTrailingComments: true +AllowAllArgumentsOnNextLine: true +AllowAllConstructorInitializersOnNextLine: true +AllowAllParametersOfDeclarationOnNextLine: true +AllowShortBlocksOnASingleLine: Always +AllowShortCaseLabelsOnASingleLine: true +AllowShortEnumsOnASingleLine: true +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: Always +AllowShortLambdasOnASingleLine: Empty +AllowShortLoopsOnASingleLine: true +AlwaysBreakAfterDefinitionReturnType: None +AlwaysBreakAfterReturnType: None +AlwaysBreakBeforeMultilineStrings: false +AlwaysBreakTemplateDeclarations: No +BinPackArguments: true +BinPackParameters: true +# Only used when "BreakBeforeBraces" set to "Custom" +BraceWrapping: + AfterCaseLabel: false + AfterClass: false + AfterControlStatement: Never + AfterEnum: false + AfterFunction: false + AfterNamespace: false + #AfterObjCDeclaration: + AfterStruct: false + AfterUnion: false + AfterExternBlock: false + BeforeCatch: false + BeforeElse: false + BeforeLambdaBody: false + BeforeWhile: false + IndentBraces: false + SplitEmptyFunction: false + SplitEmptyRecord: false + SplitEmptyNamespace: false +# Java-specific +#BreakAfterJavaFieldAnnotations: +BreakBeforeBinaryOperators: NonAssignment +BreakBeforeBraces: Attach +BreakBeforeTernaryOperators: true +BreakConstructorInitializers: BeforeColon +BreakInheritanceList: BeforeColon +BreakStringLiterals: false +ColumnLimit: 0 +# "" matches none +CommentPragmas: "" +CompactNamespaces: false +ConstructorInitializerAllOnOneLineOrOnePerLine: true +ConstructorInitializerIndentWidth: 2 +ContinuationIndentWidth: 2 +Cpp11BracedListStyle: false +DeriveLineEnding: true +DerivePointerAlignment: true +DisableFormat: false +# Docs say "Do not use this in config files". The default (LLVM 11.0.1) is "false". +#ExperimentalAutoDetectBinPacking: +FixNamespaceComments: false +ForEachMacros: [] +IncludeBlocks: Preserve +IncludeCategories: [] +# "" matches none +IncludeIsMainRegex: "" +IncludeIsMainSourceRegex: "" +IndentCaseBlocks: true +IndentCaseLabels: true +IndentExternBlock: Indent +IndentGotoLabels: false +IndentPPDirectives: None +IndentWidth: 2 +IndentWrappedFunctionNames: false +InsertTrailingCommas: None +# Java-specific +#JavaImportGroups: +# JavaScript-specific +#JavaScriptQuotes: +#JavaScriptWrapImports +KeepEmptyLinesAtTheStartOfBlocks: true +MacroBlockBegin: "" +MacroBlockEnd: "" +# Set to a large number to effectively disable +MaxEmptyLinesToKeep: 100000 +NamespaceIndentation: None +NamespaceMacros: [] +# Objective C-specific +#ObjCBinPackProtocolList: +#ObjCBlockIndentWidth: +#ObjCBreakBeforeNestedBlockParam: +#ObjCSpaceAfterProperty: +#ObjCSpaceBeforeProtocolList +PenaltyBreakAssignment: 1 +PenaltyBreakBeforeFirstCallParameter: 1 +PenaltyBreakComment: 1 +PenaltyBreakFirstLessLess: 1 +PenaltyBreakString: 1 +PenaltyBreakTemplateDeclaration: 1 +PenaltyExcessCharacter: 1 +PenaltyReturnTypeOnItsOwnLine: 1 +# Used as a fallback if alignment style can't be detected from code (DerivePointerAlignment: true) +PointerAlignment: Right +RawStringFormats: [] +ReflowComments: false +SortIncludes: false +SortUsingDeclarations: false +SpaceAfterCStyleCast: false +SpaceAfterLogicalNot: false +SpaceAfterTemplateKeyword: false +SpaceBeforeAssignmentOperators: true +SpaceBeforeCpp11BracedList: false +SpaceBeforeCtorInitializerColon: true +SpaceBeforeInheritanceColon: true +SpaceBeforeParens: ControlStatements +SpaceBeforeRangeBasedForLoopColon: true +SpaceBeforeSquareBrackets: false +SpaceInEmptyBlock: false +SpaceInEmptyParentheses: false +SpacesBeforeTrailingComments: 2 +SpacesInAngles: false +SpacesInCStyleCastParentheses: false +SpacesInConditionalStatement: false +SpacesInContainerLiterals: false +SpacesInParentheses: false +SpacesInSquareBrackets: false +Standard: Auto +StatementMacros: [] +TabWidth: 2 +TypenameMacros: [] +# Default to LF if line endings can't be detected from the content (DeriveLineEnding). +UseCRLF: false +UseTab: Never +WhitespaceSensitiveMacros: [] diff --git a/build/windows/clang_12.0.0_Windows_32bit.zip.sha b/build/windows/clang_12.0.0_Windows_32bit.zip.sha new file mode 100644 index 00000000000..938fb3a7d2f --- /dev/null +++ b/build/windows/clang_12.0.0_Windows_32bit.zip.sha @@ -0,0 +1 @@ +d2a5246fed18b61d96de49887e16520be5dad944 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy