diff options
Diffstat (limited to 'docs/CommandGuide')
-rw-r--r-- | docs/CommandGuide/clang.rst | 121 | ||||
-rw-r--r-- | docs/CommandGuide/diagtool.rst | 52 | ||||
-rw-r--r-- | docs/CommandGuide/index.rst | 1 |
3 files changed, 173 insertions, 1 deletions
diff --git a/docs/CommandGuide/clang.rst b/docs/CommandGuide/clang.rst index 16bb09f3c740b..d440d915d686d 100644 --- a/docs/CommandGuide/clang.rst +++ b/docs/CommandGuide/clang.rst @@ -98,10 +98,129 @@ Language Selection and Mode Options Treat subsequent input files as having type language. -.. option:: -std=<language> +.. option:: -std=<standard> Specify the language standard to compile for. + Supported values for the C language are: + + | ``c89`` + | ``c90`` + | ``iso9899:1990`` + + ISO C 1990 + + | ``iso9899:199409`` + + ISO C 1990 with amendment 1 + + | ``gnu89`` + | ``gnu90`` + + ISO C 1990 with GNU extensions + + | ``c99`` + | ``iso9899:1999`` + + ISO C 1999 + + | ``gnu99`` + + ISO C 1999 with GNU extensions + + | ``c11`` + | ``iso9899:2011`` + + ISO C 2011 + + | ``gnu11`` + + ISO C 2011 with GNU extensions + + | ``c17`` + | ``iso9899:2017`` + + ISO C 2017 + + | ``gnu17`` + + ISO C 2017 with GNU extensions + + The default C language standard is ``gnu11``, except on PS4, where it is + ``gnu99``. + + Supported values for the C++ language are: + + | ``c++98`` + | ``c++03`` + + ISO C++ 1998 with amendments + + | ``gnu++98`` + | ``gnu++03`` + + ISO C++ 1998 with amendments and GNU extensions + + | ``c++11`` + + ISO C++ 2011 with amendments + + | ``gnu++11`` + + ISO C++ 2011 with amendments and GNU extensions + + | ``c++14`` + + ISO C++ 2014 with amendments + + | ``gnu++14`` + + ISO C++ 2014 with amendments and GNU extensions + + | ``c++17`` + + ISO C++ 2017 with amendments + + | ``gnu++17`` + + ISO C++ 2017 with amendments and GNU extensions + + | ``c++2a`` + + Working draft for ISO C++ 2020 + + | ``gnu++2a`` + + Working draft for ISO C++ 2020 with GNU extensions + + The default C++ language standard is ``gnu++14``. + + Supported values for the OpenCL language are: + + | ``cl1.0`` + + OpenCL 1.0 + + | ``cl1.1`` + + OpenCL 1.1 + + | ``cl1.2`` + + OpenCL 1.2 + + | ``cl2.0`` + + OpenCL 2.0 + + The default OpenCL language standard is ``cl1.0``. + + Supported values for the CUDA language are: + + | ``cuda`` + + NVIDIA CUDA(tm) + .. option:: -stdlib=<library> Specify the C++ standard library to use; supported options are libstdc++ and diff --git a/docs/CommandGuide/diagtool.rst b/docs/CommandGuide/diagtool.rst new file mode 100644 index 0000000000000..59417f71f69d7 --- /dev/null +++ b/docs/CommandGuide/diagtool.rst @@ -0,0 +1,52 @@ +diagtool - clang diagnostics tool +================================= + +SYNOPSIS +-------- + +:program:`diagtool` *command* [*args*] + +DESCRIPTION +----------- + +:program:`diagtool` is a combination of four tool for dealing with diagnostics in :program:`clang`. + +SUBCOMMANDS +----------- + +:program:`diagtool` is separated into several subcommands each tailored to a +different purpose. A brief summary of each command follows, with more detail in +the sections that follow. + + * :ref:`find_diagnostic_id` - Print the id of the given diagnostic. + * :ref:`list_warnings` - List warnings and their corresponding flags. + * :ref:`show_enabled` - Show which warnings are enabled for a given command line. + * :ref:`tree` - Show warning flags in a tree view. + +.. _find_diagnostic_id: + +find-diagnostic-id +~~~~~~~~~~~~~~~~~~ + +:program:`diagtool` find-diagnostic-id *diagnostic-name* + +.. _list_warnings: + +list-warnings +~~~~~~~~~~~~~ + +:program:`diagtool` list-warnings + +.. _show_enabled: + +show-enabled +~~~~~~~~~~~~ + +:program:`diagtool` show-enabled [*options*] *filename ...* + +.. _tree: + +tree +~~~~ + +:program:`diagtool` tree [*diagnostic-group*] diff --git a/docs/CommandGuide/index.rst b/docs/CommandGuide/index.rst index 826ed97119805..83a91182e9ca6 100644 --- a/docs/CommandGuide/index.rst +++ b/docs/CommandGuide/index.rst @@ -15,3 +15,4 @@ Basic Commands :maxdepth: 1 clang + diagtool |