From 846b6422c7f78250304a8e7afe581d3001fcbc22 Mon Sep 17 00:00:00 2001 From: Spicyyboi <34308782+spicyyboi@users.noreply.github.com> Date: Tue, 21 Feb 2023 07:56:04 +0100 Subject: [PATCH] clang, clang++, clang-format, clang-tidy: add German translation (#9427) * clang, clang++, clang-format, clang-tidy: add German translation * Update pages.de/common/clang-format.md Co-authored-by: pixel * Update pages.de/common/clang-tidy.md Co-authored-by: pixel * Update pages.de/common/clang-tidy.md Co-authored-by: pixel --------- Co-authored-by: pixel --- pages.de/common/clang++.md | 25 +++++++++++++++++++++++++ pages.de/common/clang-format.md | 24 ++++++++++++++++++++++++ pages.de/common/clang-tidy.md | 20 ++++++++++++++++++++ pages.de/common/clang.md | 24 ++++++++++++++++++++++++ 4 files changed, 93 insertions(+) create mode 100755 pages.de/common/clang++.md create mode 100755 pages.de/common/clang-format.md create mode 100755 pages.de/common/clang-tidy.md create mode 100755 pages.de/common/clang.md diff --git a/pages.de/common/clang++.md b/pages.de/common/clang++.md new file mode 100755 index 000000000..83357ca89 --- /dev/null +++ b/pages.de/common/clang++.md @@ -0,0 +1,25 @@ +# clang++ + +> Kompiliert C++ Quelldateien. +> Teil von LLVM. +> Weitere Informationen: . + +- Kompiliere eine Quelldatei in eine ausführbare Binärdatei: + +`clang++ {{pfad/zu/quelldatei.cpp}} -o {{pfad/zu/binärdatei}}` + +- Zeige geläufige Fehler und Warnungen an: + +`clang++ {{pfad/zu/quelldatei.cpp}} -Wall -o {{pfad/zu/binärdatei}}` + +- Wähle einen Sprachstandard für die Kompilation aus: + +`clang++ {{pfad/zu/quelldatei.cpp}} -std={{c++20}} -o {{pfad/zu/binärdatei}}` + +- Binde Bibliotheken, die sich an einem anderen Pfad als die Quelldatei befinden, ein: + +`clang++ {{pfad/zu/qelldatei.cpp}} -o {{pfad/zu/binärdatei}} -I{{pfad/zu/headerdatei}} -L{{pfad/zu/bibliothek}} -l{{bibliotheksname}}` + +- Kompiliere eine Quelldatei zu LLVM Intermediate Representation (IR): + +`clang++ -S -emit-llvm {{pfad/zu/quelldatei.cpp}} -o {{pfad/zu/ir_datei.ll}}` diff --git a/pages.de/common/clang-format.md b/pages.de/common/clang-format.md new file mode 100755 index 000000000..005adfb40 --- /dev/null +++ b/pages.de/common/clang-format.md @@ -0,0 +1,24 @@ +# clang-format + +> Programm zum Auto-Formatieren von C/C++/Java/JavaScript/Objective-C/Protobuf/C#-Code. +> Weitere Informationen: . + +- Formatiere eine Datei und schreibe das Ergebnis nach stdout: + +`clang-format {{pfad/zu/quelldatei.cpp}}` + +- Überschreibe eine Datei mit ihrem formatierten Inhalt: + +`clang-format -i {{pfad/zu/quelldatei.cpp}}` + +- Formatiere eine Datei mit einem bestimmten Code-Stil: + +`clang-format --style={{LLVM|GNU|Google|Chromium|Microsoft|Mozilla|WebKit}} {{pfad/zu/quelldatei.cpp}}` + +- Formatiere eine Datei mit der `.clang-format`-Datei aus einem der Überverzeichnisse der Quelldatei: + +`clang-format --style=file {{pfad/zu/quelldatei.cpp}}` + +- Generiere eine eigene `.clang-format`-Datei: + +`clang-format --style={{LLVM|GNU|Google|Chromium|Microsoft|Mozilla|WebKit}} --dump-config > {{.clang-format}}` diff --git a/pages.de/common/clang-tidy.md b/pages.de/common/clang-tidy.md new file mode 100755 index 000000000..331fdf37d --- /dev/null +++ b/pages.de/common/clang-tidy.md @@ -0,0 +1,20 @@ +# clang-tidy + +> Ein LLVM-basierter C/C++ Linter zum Finden von Stilverletzungen, Bugs und Sicherheitsmängeln durch statische Codeanalyse. +> Weitere Information: . + +- Führe die Standard-Checks für eine Quelldatei aus: + +`clang-tidy {{pfad/zu/quelldatei.cpp}}` + +- Prüfe nur ob eine Datei den `cppcoreguidelines` Checks entspricht: + +`clang-tidy {{pfad/zu/quelldatei.cpp}} -checks={{-*,cppcoreguidelines-*}}` + +- Liste alle verfügbaren Checks auf: + +`clang-tidy -checks={{*}} -list-checks` + +- Lege defines und includes als Kompilierungsoptionen fest (nach `--`): + +`clang-tidy {{pfad/zu/quelldatei.cpp}} -- -I{{mein_projekt/include}} -D{{definitions}}` diff --git a/pages.de/common/clang.md b/pages.de/common/clang.md new file mode 100755 index 000000000..6e002eed5 --- /dev/null +++ b/pages.de/common/clang.md @@ -0,0 +1,24 @@ +# clang + +> Compiler für C, C++ und Objective-C Quelldateien. Kann als Ersatz für GCC genutzt werden. +> Weitere Informationen: . + +- Kompiliere eine Quelldatei in eine ausführbare Binärdatei: + +`clang {{pfad/zu/quelldatei.c}} -o {{pfad/zu/binärdatei}}` + +- Zeige geläufige Fehler und Warnungen an: + +`clang {{pfad/zu/quelldatei.c}} -Wall -o {{pfad/zu/binärdatei}}` + +- Binde Bibliotheken, die sich an einem anderen Pfad als die Quelldatei befinden, ein: + +`clang {{pfad/zu/quelldatei.c}} -o {{pfad/zu/binärdatei}} -I{{pfad/zu/headerdatei}} -L{{pfad/zu/bibliothek}} -l{{bibliotheks_name}}` + +- Kompiliere eine Quelldatei zu LLVM Intermediate Representation (IR): + +`clang -S -emit-llvm {{pfad/zu/quelldatei.c}} -o {{pfad/zu/ir_datei.ll}}` + +- Kompiliere eine Quelldatei, ohne zu Linken: + +`clang -c {{pfad/zu/quelldatei.c}}`