-
Brian Gesiak authored
Summary: The Clang option was previously not included in the User's Manual. Reviewers: anemet, davidxl, hfinkel Reviewed By: hfinkel Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34928 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307193 91177308-0d34-0410-b5e6-96231b3b80d8
Brian Gesiak authoredSummary: The Clang option was previously not included in the User's Manual. Reviewers: anemet, davidxl, hfinkel Reviewed By: hfinkel Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34928 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@307193 91177308-0d34-0410-b5e6-96231b3b80d8
Clang Compiler User's Manual
- Introduction
- Command Line Options
- Language and Target-Independent Features
- C Language Features
- C++ Language Features
- Objective-C Language Features
- Objective-C++ Language Features
- OpenMP Features
- OpenCL Features
- Target-Specific Features and Limitations
- clang-cl
Introduction
The Clang Compiler is an open-source compiler for the C family of programming languages, aiming to be the best in class implementation of these languages. Clang builds on the LLVM optimizer and code generator, allowing it to provide high-quality optimization and code generation support for many targets. For more general information, please see the Clang Web Site or the LLVM Web Site.
This document describes important notes about using Clang as a compiler for an end-user, documenting the supported features, command line options, etc. If you are interested in using Clang to build a tool that processes code, please see :doc:`InternalsManual`. If you are interested in the Clang Static Analyzer, please see its web page.
Clang is one component in a complete toolchain for C family languages. A separate document describes the other pieces necessary to :doc:`assemble a complete toolchain <Toolchain>`.
Clang is designed to support the C family of programming languages, which includes :ref:`C <c>`, :ref:`Objective-C <objc>`, :ref:`C++ <cxx>`, and :ref:`Objective-C++ <objcxx>` as well as many dialects of those. For language-specific information, please see the corresponding language specific section:
- :ref:`C Language <c>`: K&R C, ANSI C89, ISO C90, ISO C94 (C89+AMD1), ISO C99 (+TC1, TC2, TC3).
- :ref:`Objective-C Language <objc>`: ObjC 1, ObjC 2, ObjC 2.1, plus variants depending on base language.
- :ref:`C++ Language <cxx>`
- :ref:`Objective C++ Language <objcxx>`
- :ref:`OpenCL C Language <opencl>`: v1.0, v1.1, v1.2, v2.0.
In addition to these base languages and their dialects, Clang supports a broad variety of language extensions, which are documented in the corresponding language section. These extensions are provided to be compatible with the GCC, Microsoft, and other popular compilers as well as to improve functionality through Clang-specific features. The Clang driver and language features are intentionally designed to be as compatible with the GNU GCC compiler as reasonably possible, easing migration from GCC to Clang. In most cases, code "just works". Clang also provides an alternative driver, :ref:`clang-cl`, that is designed to be compatible with the Visual C++ compiler, cl.exe.