Home
last modified time | relevance | path

Searched +refs:clang +refs:format +refs:style (Results 1 – 25 of 56) sorted by relevance

123

/openbsd-src/gnu/llvm/clang/docs/
H A DClangFormat.rst13 :program:`clang-format` is located in `clang/tools/clang-format` and can be used
14 to format C/C++/Java/JavaScript/JSON/Objective-C/Protobuf/C# code.
20 $ clang-format --help
21 OVERVIEW: A tool to format C/C++/Java/JavaScript/JSON/Objective-C/Protobuf/C# code.
29 USAGE: clang-format [options] [@<file>] [<file> ...]
33 Clang-format options:
37 =unknown - If set, unknown format options are only warned about.
41 differing format depending on an option being
44 .clang-format file.
46 If this is not passed, the .clang-format file is searched
[all …]
H A DClangFormatStyleOptions.rst3 This file is automatically generated, in part. Do not edit the style options
4 in this file directly. Instead, modify them in include/clang/Format/Format.h
9 <style type="text/css">
11 </style>
19 :doc:`ClangFormatStyleOptions` describes configurable formatting style options
22 When using :program:`clang-format` command line utility or
23 ``clang::format::reformat(...)`` functions from code, one can either use one of
25 create a custom style by configuring specific style options.
28 Configuring Style with clang-format
31 :program:`clang-format` supports two ways to provide custom style options:
[all …]
H A DLibFormat.rst7 as some basic style discussions.
9 If you just want to use `clang-format` as a tool or integrated into an editor,
31 formatting. A list of options can be found under :ref:`style-options`.
33 The style options are described in :doc:`ClangFormatStyleOptions`.
41 The style options describe specific formatting options that can be used in
42 order to make `ClangFormat` comply with different style guides. Currently,
43 several style guides are hard-coded:
47 /// Returns a format style complying with the LLVM coding standards:
51 /// Returns a format style complying with Google's C++ style guide:
55 /// Returns a format style complying with Chromium's style guide:
[all …]
H A DClangTools.rst13 directory tree, `clang-tools-extra
14 <https://github.com/llvm/llvm-project/tree/main/clang-tools-extra>`_.
37 common refactoring and rewriting toolkit-style library is also part of
60 ``clang-check``
68 fixit-hints offered by clang. See :doc:`HowToSetupToolingForLLVM` for
69 instructions on how to setup and used `clang-check`.
71 ``clang-format``
74 Clang-format is both a :doc:`library <LibFormat>` and a :doc:`stand-alone tool
76 according to configurable style guides. To do so, clang-format uses Clang's
78 the whitespace around those tokens. The goal is for clang-format to serve both
[all …]
H A DTooling.rst7 the different ways to write clang tools, and their pros and cons.
12 `LibClang <https://clang.llvm.org/doxygen/group__CINDEX.html>`_ is a stable high
13 level C interface to clang. When in doubt LibClang is probably the interface
24 * want to interface with clang from other languages than C++
43 * special lint-style warnings or errors for your project
64 tools, as well as integrating into services that run clang tools. Canonical
92 * Syntax checking (:program:`clang-check`)
93 * Automatic fixing of compile errors (:program:`clang-fixit`)
94 * Automatic code formatting (:program:`clang-format`)
H A DClangRepl.rst7 read-evaluate-print-loop (REPL) style. It uses Clang as a library to compile the
26 clang-repl> #include <iostream>
27 clang-repl> int f() { std::cout << "Hello Interpreted World!\n"; return 0; }
28 clang-repl> auto r = f();
57 6. The LLVM IR is the input format for LLVM’s JIT compilation infrastructure.
H A DUsersManual.rst18 `Clang Web Site <https://clang.llvm.org>`_ or the `LLVM Web
25 `Clang Static Analyzer <https://clang-analyzer.llvm.org>`_, please see its web
55 Clang also provides an alternative driver, :ref:`clang-cl`, that is designed
164 output format of the diagnostics that it generates.
239 …<b><span style="color:black">test.c:28:8: <span style="color:magenta">warning</span>: extra tokens…
241 <span style="color:green">^</span>
242 <span style="color:green">//</span>
260 .. option:: -fdiagnostics-format=clang/msvc/vi
262 Changes diagnostic output format to better match IDEs and command line tools.
264 This option controls the output format of the filename, line number,
[all …]
H A DLanguageExtensions.rst50 #define __has_builtin(x) 0 // Compatibility with non-clang compilers.
81 #define __has_constexpr_builtin(x) 0 // Compatibility with non-clang compilers.
114 #define __has_feature(x) 0 // Compatibility with non-clang compilers.
157 name of a double-square-bracket-style attribute. The argument can either be a
174 #if __has_cpp_attribute(clang::fallthrough)
175 #define FALLTHROUGH [[clang::fallthrough]]
181 The attribute scope tokens ``clang`` and ``_Clang`` are interchangeable, as are
199 #define __has_c_attribute(x) 0 // Compatibility with non-clang compilers.
210 The attribute scope tokens ``clang`` and ``_Clang`` are interchangeable, as are
220 a GNU-style attribute. It evaluates to 1 if the attribute is supported by the
[all …]
H A DOpenCLSupport.rst3 <style type="text/css">
7 </style>
28 Details about usage of clang for OpenCL can be found in :doc:`UsersManual`.
33 - For general issues and bugs with OpenCL in clang refer to `the GitHub issue
78 with regular clang driver they require frontend forwarding, e.g. ``-cc1``
93 $ clang -Xclang -finclude-default-header test.cl
97 to the header location. The header can be found in the clang source tree or
102 $ clang -I<path to clang sources>/lib/Headers/opencl-c.h test.cl
103 …$ clang -I<path to clang installation>/lib/clang/<llvm version>/include/opencl-c.h/opencl-c.h test…
116 …$ clang -target spir-unknown-unknown -c -emit-llvm -Xclang -finclude-default-header -fmodules -fim…
[all …]
H A DInternalsManual.rst80 ``clang/Basic/Diagnostic*Kinds.td`` files, depending on what library will be
82 diagnostic, the severity of the diagnostic and the English translation + format
129 The format string for the diagnostic is very simple, but it has some power. It
132 some simple format strings:
137 "format string contains '\\0' within the string body"
143 These examples show some important points of format strings. You can use any
156 order as they are specified, you could have a format string with "``%1 %0``"
161 Here are some "best practices" for writing the English format string:
182 including variable names, types, labels, etc. The "``select``" format can be
195 It is really easy to add format specifiers to the Clang diagnostics system, but
[all …]
/openbsd-src/gnu/llvm/clang/include/clang/Basic/
H A DDiagnosticDocs.td12 NOTE: This file is automatically generated by running clang-tblgen
20 <style>
54 </style>
56 .. FIXME: rST doesn't support formatting this, so we format all <td> elements
61 .. Roles generated by clang-tblgen.
H A DDiagnosticGroups.td20 // Empty DiagGroups are recognized by clang but ignored.
275 def FormatInsufficientArgs : DiagGroup<"format-insufficient-args">;
276 def FormatExtraArgs : DiagGroup<"format-extra-args">;
277 def FormatZeroLength : DiagGroup<"format-zero-length">;
485 def : DiagGroup<"missing-format-attribute">;
530 def OldStyleCast : DiagGroup<"old-style-cast">;
531 def : DiagGroup<"old-style-definition">;
713 def ObjCCStringFormat : DiagGroup<"cstring-format-directive">;
738 // (#pragma clang optimize, noinline) so suggest nothing for now.
743 def PragmaClangAttribute : DiagGroup<"pragma-clang-attribute">;
[all …]
/openbsd-src/gnu/llvm/llvm/docs/
H A DCoverageMappingFormat.rst2 :format: html
14 LLVM's code coverage mapping format is used to provide code coverage
22 documentation <https://clang.llvm.org/docs/SourceBasedCodeCoverage.html>`.
24 We start by briefly describing LLVM's code coverage mapping format and the
25 way that Clang and LLVM's code coverage tool work with this format. After
26 the basics are down, more advanced features of the coverage mapping format
33 LLVM's code coverage mapping format is designed to be a self contained
34 data format that can be embedded into the LLVM IR and into object files.
35 It's described in this document as a **mapping** format because its goal is
42 1. When clang compiles a source file with ``-fcoverage-mapping``, it
[all …]
H A DXRay.rst57 enabling the ``-fxray-instrument`` flag in your clang invocation.
63 clang -fxray-instrument ...
71 clang -fxray-instrument -fxray-instruction-threshold=1 ...
76 You can do it using the GCC-style attributes or C++11-style attributes.
80 [[clang::xray_always_instrument]] void always_instrumented();
82 [[clang::xray_never_instrument]] void never_instrumented();
89 Library`_ or use ``clang`` to link it in automatically with the
92 `libclang_rt.xray-{arch}` where `{arch}` is the mnemonic supported by clang
128 logging from a file. The file's format is described below:
140 These files can be provided through the ``-fxray-attr-list=`` flag to clang.
[all …]
H A DCodingStandards.rst24 use the style that is already being used so that the source is uniform and
65 * Clang: https://clang.llvm.org/cxx_status.html
143 A few things to note about this particular format: The "``-*- C++ -*-``" string
196 In general, prefer C++-style comments (``//`` for normal comments, ``///`` for
198 useful to use C-style (``/* */``) comments however:
204 #. When writing a source file that is used by a tool that only accepts C-style
216 An in-line C-style comment makes the intent obvious:
225 than C style comments.
338 wrong style:
347 that style instead. Otherwise, this standard applies to all LLVM tools,
[all …]
/openbsd-src/gnu/llvm/clang/cmake/caches/
H A DApple-stage2.cmake1 # This file sets up a CMakeCache for Apple-style stage2 bootstrap. It is
6 set(CLANG_VENDOR_UTI com.apple.clang CACHE STRING "")
12 set(CLANG_LINKS_TO_CREATE clang++ cc c++ CACHE STRING "")
22 set(LLVM_BUILD_EXTERNAL_COMPILER_RT ON CACHE BOOL "Build Compiler-RT with just-built clang")
42 # clang without installing over existing tools.
69 clang
71 clang-format
72 clang-resource-headers
/openbsd-src/gnu/llvm/llvm/docs/CommandGuide/
H A Dllvm-objdump.rst70 Display format-specific file headers.
80 .. option:: --raw-clang-ast
82 Dump the raw binary contents of the clang AST section.
150 .. option:: --debug-vars=<format>
153 alongside disassembly. ``format`` may be ``unicode`` or ``ascii``, defaulting
199 Do not use hex format for immediate values in disassembly output.
222 Use hex format when printing immediate values in disassembly output (default).
289 .. option:: --x86-asm-syntax=<style>
292 When used with :option:`--disassemble`, choose style of code to emit from
297 AT&T-style assembly
[all …]
H A Dllvm-cov.rst16 work with ``gcov``\-style coverage or with ``clang``\'s instrumentation
205 ``clang`` use the ``-fprofile-instr-generate`` and ``-fcoverage-mapping``
206 flags. If linking with the ``clang`` driver, pass ``-fprofile-instr-generate``
213 typically called ``default.profraw``, which can be converted to a format that
282 .. option:: -format=<FORMAT>
284 Use the specified output format. The supported formats are: "text", "html".
289 only supported for the html format.
347 Set high and low watermarks for coverage in html format output. This allows you
461 format.
483 .. option:: -format=<FORMAT>
[all …]
/openbsd-src/gnu/llvm/llvm/docs/HistoricalNotes/
H A D2007-OriginalClangReadme.txt8 clang: noun
70 clang - An example driver, client of the libraries at various levels.
88 family must be correctly supported (trigraphs, preprocessor arcana, K&R-style
92 II. Usage of clang driver:
95 - Help: clang --help
127 For more information on getting Graphviz to work with clang/LLVM,
133 * Column numbers are fully tracked (no 256 col limit, no GCC-style pruning).
136 * Full diagnostic customization by client (can format diagnostics however they
/openbsd-src/gnu/llvm/llvm/docs/Proposals/
H A DVariableNames.rst74 but here we use the terminology from clang-tidy).
117 generally encouraged that new code be written in the style of the surrounding
286 1. Add or change the project's .clang-tidy to reflect the agreed rules.
290 2. Apply ``clang-tidy`` to the project's files, with only the
291 ``readability-identifier-naming`` rules enabled. ``clang-tidy`` will also
292 reformat the affected lines according to the rules in ``.clang-format``.
294 clang-tidy, and bugs should be fixed in the process, likely including:
316 * clang-tools-extra
317 * clang
354 .. [WebKit] WebKit Code Style Guidelines https://webkit.org/code-style-guidelines/#names
[all …]
/openbsd-src/gnu/llvm/llvm/tools/llvm-objdump/
H A DObjdumpOpts.td140 def raw_clang_ast : Flag<["--"], "raw-clang-ast">,
141 HelpText<"Dump the raw binary contents of the clang AST section">;
148 HelpText<"Use hex format for immediate values (default)">;
151 HelpText<"Do not use hex format for immediate values">;
155 HelpText<"Display format specific file headers">;
240 HelpText<"Emit AT&T-style disassembly">;
243 HelpText<"Emit Intel-style disassembly">;
249 HelpText<"Display only the first format specific file header">,
/openbsd-src/gnu/llvm/lldb/docs/use/
H A Dextensions.rst11 modules <https://clang.llvm.org/docs/Modules.html>`_ more efficiently.
118 files. The ``dsymutil`` debug info linker also understands this format
121 will never contain any ``-gmodules``-style references.
/openbsd-src/gnu/llvm/libcxx/docs/
H A DUsingLibcxx.rst29 $ clang++ -std=c++17 test.cpp
71 $ clang++ -stdlib=libc++ test.cpp
88 $ clang++ -nostdinc++ -nostdlib++ \
176 overriden at compile-time by defining the ``_LIBCPP_VERBOSE_ABORT(format, args...)`` variadic macro.
177 When that macro is defined, it will be called with a format string as the first argument, followed …
178 a series of arguments to format using printf-style formatting. Compile-time customization may be
191 void __libcpp_verbose_abort(char const* format, ...)
201 void std::__libcpp_verbose_abort(char const* format, ...) {
203 va_start(list, format);
204 std::vfprintf(stderr, format, list);
[all …]
/openbsd-src/gnu/llvm/lld/ELF/
H A DOptions.td157 def eb: F<"EB">, HelpText<"Select the big-endian format in OUTPUT_FORMAT">;
158 def el: F<"EL">, HelpText<"Select the little-endian format in OUTPUT_FORMAT">;
222 defm format: Eq<"format", "Change the input format of the inputs following this option">,
237 defm hash_style: Eq<"hash-style", "Specify hash style (sysv, gnu or both)">;
307 defm oformat: EEq<"oformat", "Specify the binary format for the output object file">,
317 EEq<"pack-dyn-relocs", "Pack dynamic relocations in the given format">,
450 defm rsp_quoting: EEq<"rsp-quoting", "Quoting style for response files">,
526 def: Separate<["-"], "b">, Alias<format>, HelpText<"Alias for --format">;
592 def opt_remarks_format: Separate<["--"], "opt-remarks-format">,
593 HelpText<"The format used for serializing remarks (default: YAML)">;
[all …]
/openbsd-src/usr.sbin/unbound/doc/
H A Dunbound.doxygen10 # The format is:
74 # sub-directories (in 2 levels) under the output directory of each output format
196 # first line (until the first dot) of a Javadoc-style comment as the brief
197 # description. If set to NO, the Javadoc-style will behave just like regular Qt-
198 # style comments (thus requiring an explicit @brief command for a brief
207 # as being the beginning of a Javadoc-style comment "banner". If set to NO, the
208 # Javadoc-style will behave just like regular comments and it will not be
215 # line (until the first dot) of a Qt-style comment as the brief description. If
216 # set to NO, the Qt-style will behave just like regular Qt-style comments (thus
317 # using this tag. The format is ext=language, where ext is a file extension, and
[all …]

123