mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 10:42:07 +02:00
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 <pixel+github@chrissx.de> * Update pages.de/common/clang-tidy.md Co-authored-by: pixel <pixel+github@chrissx.de> * Update pages.de/common/clang-tidy.md Co-authored-by: pixel <pixel+github@chrissx.de> --------- Co-authored-by: pixel <pixel+github@chrissx.de>
This commit is contained in:
parent
3d77e1a35c
commit
846b6422c7
4 changed files with 93 additions and 0 deletions
25
pages.de/common/clang++.md
Executable file
25
pages.de/common/clang++.md
Executable file
|
@ -0,0 +1,25 @@
|
||||||
|
# clang++
|
||||||
|
|
||||||
|
> Kompiliert C++ Quelldateien.
|
||||||
|
> Teil von LLVM.
|
||||||
|
> Weitere Informationen: <https://clang.llvm.org>.
|
||||||
|
|
||||||
|
- 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}}`
|
24
pages.de/common/clang-format.md
Executable file
24
pages.de/common/clang-format.md
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
# clang-format
|
||||||
|
|
||||||
|
> Programm zum Auto-Formatieren von C/C++/Java/JavaScript/Objective-C/Protobuf/C#-Code.
|
||||||
|
> Weitere Informationen: <https://clang.llvm.org/docs/ClangFormat.html>.
|
||||||
|
|
||||||
|
- 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}}`
|
20
pages.de/common/clang-tidy.md
Executable file
20
pages.de/common/clang-tidy.md
Executable file
|
@ -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: <https://clang.llvm.org/extra/clang-tidy/>.
|
||||||
|
|
||||||
|
- 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}}`
|
24
pages.de/common/clang.md
Executable file
24
pages.de/common/clang.md
Executable file
|
@ -0,0 +1,24 @@
|
||||||
|
# clang
|
||||||
|
|
||||||
|
> Compiler für C, C++ und Objective-C Quelldateien. Kann als Ersatz für GCC genutzt werden.
|
||||||
|
> Weitere Informationen: <https://clang.llvm.org/docs/ClangCommandLineReference.html>.
|
||||||
|
|
||||||
|
- 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}}`
|
Loading…
Add table
Reference in a new issue