summaryrefslogtreecommitdiffstats
path: root/clang/docs
Commit message (Collapse)AuthorAgeFilesLines
* print-supported-cpus quality of life patch.Ziang Wan2019-06-252-0/+8
| | | | | | | Claim all input files so that clang does not give a warning. Add two short-cut aliases: -mcpu=? and -mtune=?. llvm-svn: 364362
* [clang] Adapt ASTMatcher to explicit(bool) specifierGauthier Harnisch2019-06-191-6/+79
| | | | | | | | | | | | | | | | | | | | Summary: Changes: - add an ast matcher for deductiong guide. - allow isExplicit matcher for deductiong guide. - add hasExplicitSpecifier matcher which give access to the expression of the explicit specifier if present. Reviewers: klimek, rsmith, aaron.ballman Reviewed By: aaron.ballman Subscribers: aaron.ballman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61552 llvm-svn: 363855
* [Remarks][Driver] Use the specified format in the remarks file extensionFrancis Visoiu Mistrih2019-06-171-1/+3
| | | | | | | By default, use `.opt.yaml`, but when a format is specified with `-fsave-optimization-record=<format>`, use `.opt.<format>`. llvm-svn: 363627
* [Remarks] Extend -fsave-optimization-record to specify the formatFrancis Visoiu Mistrih2019-06-171-5/+13
| | | | | | | | | Use -fsave-optimization-record=<format> to specify a different format than the default, which is YAML. For now, only YAML is supported. llvm-svn: 363573
* [docs] Fix another bot error by setting highlight language of objc ↵Don Hinton2019-06-161-1/+1
| | | | | | code-block to objc instead of c++. llvm-svn: 363521
* Fixed the --print-supported-cpus testZiang Wan2019-06-141-2/+2
| | | | | | | | | | | Add constraints for the test that require specific backend targets to be registered. Remove trailing whitespace in the doc. Differential Revision: https://reviews.llvm.org/D63105 llvm-svn: 363475
* Add --print-supported-cpus flag for clang.Ziang Wan2019-06-142-0/+10
| | | | | | | | | | | | This patch allows clang users to print out a list of supported CPU models using clang [--target=<target triple>] --print-supported-cpus Then, users can select the CPU model to compile to using clang --target=<triple> -mcpu=<model> a.c It is a handy feature to help cross compilation. llvm-svn: 363464
* [Remarks][NFC] Improve testing and documentation of -foptimization-record-passesFrancis Visoiu Mistrih2019-06-141-0/+12
| | | | | | | | | | | This adds: * documentation to the user manual * nicer error message * test for the error case * test for the gold plugin llvm-svn: 363463
* add a missing parenthese in the clang docSylvestre Ledru2019-06-141-1/+1
| | | | llvm-svn: 363369
* [AMDGPU] gfx1010 wave32 clang supportStanislav Mekhanoshin2019-06-131-0/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D63209 llvm-svn: 363341
* Added AST matcher for ignoring elidable constructorsDmitri Gribenko2019-06-131-0/+26
| | | | | | | | | | | | | | | | | | Summary: Added AST matcher for ignoring elidable move constructors Reviewers: hokein, gribozavr Reviewed By: hokein, gribozavr Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D63149 Patch by Johan Vikström. llvm-svn: 363262
* AST Matchers tutorial requests to enable clang-tools-extra. NFCIlya Biryukov2019-06-071-1/+1
| | | | | | Otherwise the examples do not build. llvm-svn: 362812
* clang-format: better handle namespace macrosFrancois Ferrand2019-06-061-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Other macros are used to declare namespaces, and should thus be handled similarly. This is the case for crpcut's TESTSUITE macro, or for unittest-cpp's SUITE macro: TESTSUITE(Foo) { TEST(MyFirstTest) { assert(0); } } // TESTSUITE(Foo) This patch deals with this cases by introducing a new option to specify lists of namespace macros. Internally, it re-uses the system already in place for foreach and statement macros, to ensure there is no impact on performance. Reviewers: krasimir, djasper, klimek Reviewed By: klimek Subscribers: acoomans, cfe-commits, klimek Tags: #clang Differential Revision: https://reviews.llvm.org/D37813 llvm-svn: 362740
* [X86] Add ENQCMD instructionsPengfei Wang2019-06-061-0/+2
| | | | | | | | | | | | For more details about these instructions, please refer to the latest ISE document: https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference. Patch by Tianqing Wang (tianqing) Differential Revision: https://reviews.llvm.org/D62282 llvm-svn: 362685
* Update AST matchers tutorial to use monorepo layoutIlya Biryukov2019-06-061-6/+6
| | | | | | | | | | The docs were inconsistent: requesting the user to clone the monorepo, and then continuing with the `llvm/tools/clang` layout. Follow-up to a question on cfe-dev: http://lists.llvm.org/pipermail/cfe-dev/2019-June/062518.html llvm-svn: 362683
* [clang-format][NFC] Fix BS_Allman style example in the header docs are ↵Jan Korous2019-06-051-6/+15
| | | | | | | | generated from Differential Revision: https://reviews.llvm.org/D61729 llvm-svn: 362646
* Add __FILE_NAME__ to ReleaseNotes. NFCKristina Brooks2019-06-051-2/+4
| | | | | | | Added it under C language changes as a nonstandard extension for the time being. llvm-svn: 362581
* Add a release note entry for the change made in r362034.Akira Hatanaka2019-06-031-1/+8
| | | | llvm-svn: 362464
* Clarify when fix-it hints on warnings are appropriateAaron Puchert2019-05-311-0/+3
| | | | | | | | | | | | | | | | | | | | | Summary: This is not a change in the rules, it's meant as a clarification about warnings. Since the recovery from warnings is a no-op, the fix-it hints on warnings shouldn't change anything. Anything that doesn't just suppress the warning and changes the meaning of the code (even if it's for the better) should be on an additional note. Reviewers: rsmith, aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits, thakis Tags: #clang Differential Revision: https://reviews.llvm.org/D62470 llvm-svn: 362266
* [X86] Add VP2INTERSECT instructionsPengfei Wang2019-05-311-0/+2
| | | | | | | | | | Support intel AVX512 VP2INTERSECT instructions in clang Patch by Xiang Zhang (xiangzhangllvm) Differential Revision: https://reviews.llvm.org/D62367 llvm-svn: 362196
* [Docs] Modernize references to macOSJ. Ryan Stinnett2019-05-3011-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This updates all places in documentation that refer to "Mac OS X", "OS X", etc. to instead use the modern name "macOS" when no specific version number is mentioned. If a specific version is mentioned, this attempts to use the OS name at the time of that version: * Mac OS X for 10.0 - 10.7 * OS X for 10.8 - 10.11 * macOS for 10.12 - present Reviewers: JDevlieghere Subscribers: mgorny, christof, arphaman, cfe-commits, lldb-commits, libcxx-commits, llvm-commits Tags: #clang, #lldb, #libc, #llvm Differential Revision: https://reviews.llvm.org/D62654 llvm-svn: 362113
* [clang-format] Allow configuring list of function-like macros that resolve ↵Francois Ferrand2019-05-291-0/+18
| | | | | | | | | | | | | | | | | | | | | | | to a type Summary: Adds a `TypenameMacros` configuration option that causes certain identifiers to be handled in a way similar to `typeof()`. This is enough to: - Prevent misinterpreting declarations of pointers to such types as expressions (`STACK_OF(int) * foo` -> `STACK_OF(int) *foo`), - Avoid surprising line breaks in variable/struct field declarations (`STACK_OF(int)\nfoo;` -> `STACK_OF(int) foo;`, see https://bugs.llvm.org/show_bug.cgi?id=30353). Reviewers: Typz, krasimir, djasper Reviewed By: Typz Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57184 llvm-svn: 361986
* Driver: support `/Zc:char8_t` and `/Zc:char8_t-`Saleem Abdulrasool2019-05-281-0/+2
| | | | | | | Update the `cl` emulation to support the `/Zc:char8_t[-]?` options as per the MSVC 2019.1 toolset. These are aliases for `-fchar8_t` and `-fno-char8_t`. llvm-svn: 361859
* Add release note entries for recent typo correction changesNico Weber2019-05-281-2/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D62523 llvm-svn: 361824
* [Analyzer] Checker for non-determinism caused by iteration of unordered ↵Mandeep Singh Grang2019-05-241-2/+16
| | | | | | | | | | | | | | | | | | container of pointers Summary: Added a checker for non-determinism caused by iterating unordered containers like std::unordered_set containing pointer elements. Reviewers: NoQ, george.karpenkov, whisperity, Szelethus, baloghadamsoftware Reviewed By: Szelethus Subscribers: mgorny, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, jdoerfert, Charusso, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D59279 llvm-svn: 361664
* Add some notes on immutability and faithfulness to the internals manual.Richard Smith2019-05-221-1/+92
| | | | llvm-svn: 361433
* [Docs] Increase Doxygen cache sizeDon Hinton2019-05-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | Summary: When building Doxygen docs for llvm and clang, it helpfully prints a warning at the end noting that the `LOOKUP_CACHE_SIZE` value was too small to keep all symbols in memory. By increasing to the size it recommends, Doxygen builds have greatly improved performance. On my machine, time to run `doxygen-llvm` changes from 34 minutes to 22 minutes, which is a decent amount of time saved by changing a single number. Reviewed By: hintonda Patch by J. Ryan Stinnett! Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D62138 llvm-svn: 361343
* [PragmaHandler] Expose `#pragma` locationJoel E. Denny2019-05-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Currently, a pragma AST node's recorded location starts at the namespace token (such as `omp` in the case of OpenMP) after the `#pragma` token, and the `#pragma` location isn't available. However, the `#pragma` location can be useful when, for example, rewriting a directive using Clang's Rewrite facility. This patch makes `#pragma` locations available in any `PragmaHandler` but it doesn't yet make use of them. This patch also uses the new `struct PragmaIntroducer` to simplify `Preprocessor::HandlePragmaDirective`. It doesn't do the same for `PPCallbacks::PragmaDirective` because that changes the API documented in `clang-tools-extra/docs/pp-trace.rst`, and I'm not sure about backward compatibility guarantees there. Reviewed By: ABataev, lebedev.ri, aaron.ballman Differential Revision: https://reviews.llvm.org/D61643 llvm-svn: 361335
* [Clang][Docs] Document __FILE_NAME__. NFCKristina Brooks2019-05-171-0/+5
| | | | | | Document the `__FILE_NAME__` preprocessor extension. llvm-svn: 360994
* Implement __builtin_LINE() et. al. to support source location capture.Eric Fiselier2019-05-161-0/+55
| | | | | | | | | | | | | | | | | Summary: This patch implements the source location builtins `__builtin_LINE(), `__builtin_FUNCTION()`, `__builtin_FILE()` and `__builtin_COLUMN()`. These builtins are needed to implement [`std::experimental::source_location`](https://rawgit.com/cplusplus/fundamentals-ts/v2/main.html#reflection.src_loc.creation). With the exception of `__builtin_COLUMN`, GCC also implements these builtins, and Clangs behavior is intended to match as closely as possible. Reviewers: rsmith, joerg, aaron.ballman, bogner, majnemer, shafik, martong Reviewed By: rsmith Subscribers: rnkovacs, loskutov, riccibruno, mgorny, kunitoki, alexr, majnemer, hfinkel, cfe-commits Differential Revision: https://reviews.llvm.org/D37035 llvm-svn: 360937
* Temporarily revert "Change -gz and -Wa,--compress-debug-sections to use gABI ↵Eric Christopher2019-05-141-4/+1
| | | | | | | | | | | | | compression (SHF_COMPRESSED)" This affects users of older (pre 2.26) binutils in such a way that they can't necessarily work around it as it doesn't support the compress option on the command line. Reverting to unblock them and we can revisit whether to make this change now or fix how we want to express the option. This reverts commit bdb21337e6e1732c9895966449c33c408336d295/r360403. llvm-svn: 360703
* [AMDGPU] gfx1010 clang targetStanislav Mekhanoshin2019-05-131-0/+5
| | | | | | Differential Revision: https://reviews.llvm.org/D61875 llvm-svn: 360634
* [clang] Regenerate AST matcher docs 📖Stephane Moore2019-05-121-24/+24
| | | | | | | | | | | | | | | | | | | Summary: The documentation seems to have been manually edited in https://reviews.llvm.org/rGa282bde69e375985edd4c371b79864f617380ad5. This commit regenerates the documentation and commits the resulting diff. Reviewers: benhamilton, mwyman Reviewed By: mwyman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61769 llvm-svn: 360545
* Change -gz and -Wa,--compress-debug-sections to use gABI compression ↵Fangrui Song2019-05-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | (SHF_COMPRESSED) Since July 15, 2015 (binutils-gdb commit 19a7fe52ae3d0971e67a134bcb1648899e21ae1c, included in 2.26), gas --compress-debug-sections=zlib (gcc -gz) means zlib-gabi: SHF_COMPRESSED. Before that it meant zlib-gnu (.zdebug). clang's -gz was introduced in rC306115 (Jun 2017) to indicate zlib-gnu. It is 2019 now and it is not unreasonable to assume users of the new feature to have new linkers (ld.bfd/gold >= 2.26, lld >= rLLD273661). Change clang's default accordingly to improve standard conformance. zlib-gnu becomes out of fashion and gets poorer toolchain support. Its mangled names confuse tools and are more likely to cause problems. Reviewed By: compnerd Differential Revision: https://reviews.llvm.org/D61689 llvm-svn: 360403
* Enable intrinsics of AVX512_BF16, which are supported for BFLOAT16 in Cooper ↵Luo, Yuanke2019-05-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Lake Summary: 1. Enable infrastructure of AVX512_BF16, which is supported for BFLOAT16 in Cooper Lake; 2. Enable intrinsics for VCVTNE2PS2BF16, VCVTNEPS2BF16 and DPBF16PS instructions, which are Vector Neural Network Instructions supporting BFLOAT16 inputs and conversion instructions from IEEE single precision. For more details about BF16 intrinsic, please refer to the latest ISE document: https://software.intel.com/en-us/download/intel-architecture-instruction-set-extensions-programming-reference Patch by LiuTianle Reviewers: craig.topper, smaslov, LuoYuanke, wxiao3, annita.zhang, spatel, RKSimon Reviewed By: craig.topper Subscribers: mgorny, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60552 llvm-svn: 360018
* Attempt to fix the clang-sphinx-docs bot after r358797Nico Weber2019-05-031-1/+1
| | | | llvm-svn: 359916
* Added an AST matcher for declarations that are in the `std` namespaceDmitri Gribenko2019-05-031-0/+23
| | | | | | | | | | | | Reviewers: alexfh Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D61480 llvm-svn: 359876
* Add __builtin_dcbf support for PPCAhsan Saghir2019-04-291-0/+25
| | | | | | | | | | | | Summary: This patch adds support for __builtin_dcbf for PPC. __builtin_dcbf copies the contents of a modified block from the data cache to main memory and flushes the copy from the data cache. Differential revision: https://reviews.llvm.org/D59843 llvm-svn: 359517
* Add to the release notes the fact that UninitializedObject checker is nowSylvestre Ledru2019-04-261-1/+2
| | | | | | considered as stable llvm-svn: 359350
* [clang-format] Fix documentation for FixNamespaceCommentsOwen Pan2019-04-261-1/+1
| | | | | | | | Fixes PR40409 Differential Revision: https://reviews.llvm.org/D61174 llvm-svn: 359280
* [ASTMatchers] Introduce Objective-C matchers `isClassMessage`, ↵Ben Hamilton2019-04-221-1/+38
| | | | | | | | | | | | | | | | | | | | | | | `isClassMethod`, and `isInstanceMethod` Summary: isClassMessage is an equivalent to isInstanceMessage for ObjCMessageExpr, but matches message expressions to classes. isClassMethod and isInstanceMethod check whether a method declaration (or definition) is for a class method or instance method (respectively). Contributed by @mywman! Reviewers: benhamilton, klimek, mwyman Reviewed By: benhamilton, mwyman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60920 llvm-svn: 358904
* [analyzer] Move UninitializedObjectChecker out of alphaKristof Umann2019-04-191-96/+104
| | | | | | | | | Moved UninitializedObjectChecker from the 'alpha.cplusplus' to the 'optin.cplusplus' package. Differential Revision: https://reviews.llvm.org/D58573 llvm-svn: 358797
* [clang-format] Add AfterCaseLabel to BraceWrappingOwen Pan2019-04-081-38/+60
| | | | | | | | Fixes PR38686 > llvm-svn: 52527 llvm-svn: 357957
* [clang-format] Optionally insert a space after unary ! operatorReuben Thomas2019-04-081-0/+7
| | | | llvm-svn: 357908
* [docs] Fix rst title in clang langext docs. NFCI Kristina Brooks2019-04-051-1/+1
| | | | | | | | Fix an odd line in LanguageExtensions.rst which rendered incorrectly due to an underscore being mixed in with dashes. llvm-svn: 357793
* Fixing a typo; NFC.Aaron Ballman2019-04-031-1/+1
| | | | llvm-svn: 357579
* Adding 'CLion integration' to clang-format docSylvestre Ledru2019-04-031-0/+13
| | | | | | | | | | | | | | | | | | | | Summary: This commit adds a chapter 'CLion integration' to ClangFormat.rst. The official announcement of clang-format support in CLion 2019.1: https://blog.jetbrains.com/clion/2019/03/clion-2019-1-embedded-dev-clangformat-memory-view/ Patch by Marina Kalashina Reviewers: djasper, sylvestre.ledru, krasimir Reviewed By: sylvestre.ledru Subscribers: jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D60115 llvm-svn: 357566
* [PowerPC] Add the support for __builtin_setrnd() in clangKang Zhang2019-03-291-0/+72
| | | | | | | | | | | | | | | | | | Summary: PowerPC64/PowerPC64le supports the builtin function __builtin_setrnd to set the floating point rounding mode. This function will use the least significant two bits of integer argument to set the floating point rounding mode. double __builtin_setrnd(int mode); The effective values for mode are: 0 - round to nearest 1 - round to zero 2 - round to +infinity 3 - round to -infinity Note that the mode argument will modulo 4, so if the int argument is greater than 3, it will only use the least significant two bits of the mode. Namely, builtin_setrnd(102)) is equal to builtin_setrnd(2). Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D59403 llvm-svn: 357242
* [clang-format] Add style option AllowShortLambdasOnASingleLineRonald Wampler2019-03-261-0/+39
| | | | | | | | | | | | | | | | | Summary: This option `AllowShortLambdasOnASingleLine` similar to the other `AllowShort*` options, but applied to C++ lambdas. Reviewers: djasper, klimek Reviewed By: klimek Subscribers: MyDeveloperDay, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57687 llvm-svn: 357027
* update the release notes after the change of 'clang -dumpversion'Sylvestre Ledru2019-03-261-0/+2
| | | | llvm-svn: 356983
OpenPOWER on IntegriCloud