summaryrefslogtreecommitdiffstats
path: root/clang/docs
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Add Indirect Thunk Support to X86 to mitigate Load Value Injection (LVI)Scott Constable2020-06-241-0/+4
| | | | | | | | | | | | | | | | | This pass replaces each indirect call/jump with a direct call to a thunk that looks like: lfence jmpq *%r11 This ensures that if the value in register %r11 was loaded from memory, then the value in %r11 is (architecturally) correct prior to the jump. Also adds a new target feature to X86: +lvi-cfi ("cfi" meaning control-flow integrity) The feature can be added via clang CLI using -mlvi-cfi. This is an alternate implementation to https://reviews.llvm.org/D75934 That merges the thunk insertion functionality with the existing X86 retpoline code. Differential Revision: https://reviews.llvm.org/D76812
* add release notes for ffp-model and ffp-exception-behaviorMelanie Blower2020-04-161-0/+7
| | | | (cherry picked from commit c8dadac228b7dd3a71d5fc25489d1b884a2b0f5e)
* clang/release notes: s/Subversion/git/Sylvestre Ledru2020-03-221-1/+1
|
* add a missing dash to the release notesHans Wennborg2020-03-131-1/+1
|
* add a few new warnings to the 10.0 clang release notesNico Weber2020-03-131-0/+22
|
* clang-format release notes: Document the improvement with the ↵Sylvestre Ledru2020-03-051-0/+2
| | | | | | AlwaysBreakAfterReturnType option See https://reviews.llvm.org/D69573
* ReleaseNotes: Formatting and typo fixes.Peter Wu2020-03-041-31/+31
|
* Add C standard upgrade in clang-11 release noteNick Desaulniers2020-03-021-0/+6
| | | | | | | | | | | | | | Summary: As per rsmith (https://reviews.llvm.org/D75383). Reviewers: hans Reviewed By: hans Subscribers: cfe-commits, rsmith Tags: #clang Differential Revision: https://reviews.llvm.org/D75469
* Minor ReleaseNotes fixesHans Wennborg2020-03-021-33/+33
|
* ReleaseNotes: remove in-progress warnings, tidy up a bitHans Wennborg2020-02-281-68/+16
|
* Re-generate docsHans Wennborg2020-02-281-55/+101
| | | | | | | | | | | | | | bin/clang-tblgen -gen-diag-docs -I../clang/include \ -I../clang/include/clang/Basic/ \ ../clang/include/clang/Basic/Diagnostic.td -o \ ../clang/docs/DiagnosticsReference.rst && \ bin/clang-tblgen -gen-attr-docs -I../clang/include \ ../clang/include/clang/Basic/Attr.td -o \ ../clang/docs/AttributeReference.rst && \ bin/clang-tblgen -gen-opt-docs -I../clang/include \ -I../clang/include/clang/Driver -I../llvm/include \ ../clang/include/clang/Driver/ClangOptionDocs.td -o \ ../clang/docs/ClangCommandLineReference.rst
* update clang-cl flag section in UsersManual.rstHans Wennborg2020-02-281-52/+101
|
* [ReleaseNotes] Add some items for clangFangrui Song2020-02-271-0/+8
|
* [ReleaseNotes] Add OpenCL release notesSven van Haastregt2020-02-271-3/+26
| | | | Differential Revision: https://reviews.llvm.org/D75125
* [ReleaseNotes] Fix typosSven van Haastregt2020-02-271-2/+2
|
* [ReleaseNotes] Mention -fmacro-prefix-map and -ffile-prefix-map.Peter Wu2020-02-271-0/+6
| | | | Differential revision: https://reviews.llvm.org/D75012
* [RISCV] Add Clang and LLVM Release NotesSam Elliott2020-02-261-0/+21
|
* [docs][WebAssembly] WebAssembly-specific release notes for 10.0.Dan Gohman2020-02-251-0/+3
|
* Add Control Flow Guard in Clang release notes.Hans Wennborg2020-02-251-0/+6
| | | | | | By Andrew Paverd! Differential revision: https://reviews.llvm.org/D75047
* Add -debug-info-kind=constructor to clang release notesAmy Huang2020-02-241-0/+4
|
* ReleaseNotes: ARM and AArch64Hans Wennborg2020-02-241-1/+1
| | | | By Kristof Beyls!
* ReleaseNotes: OpenMPHans Wennborg2020-02-241-1/+19
| | | | By Alexey Bataev!
* [docs] Add -Wmisleading-indentation to clang's release notes.Tyker2020-02-221-0/+4
|
* Add -std=c++20 flag, replace C++2a with C++20 throughout the ClangRichard Smith2020-02-191-1/+1
| | | | | | | | | | | | | user interface and documentation, and update __cplusplus for C++20. WG21 considers the C++20 standard to be finished (even though it still has some more steps to pass through in the ISO process). The old flag names are accepted for compatibility, as usual, and we still have lots of references to C++2a in comments and identifiers; those can be cleaned up separately. (cherry picked from commit 24ad121582454e625bdad125c90d9ac0dae948c8)
* [analyzer] Add 10.0.0 release notes.Hans Wennborg2020-02-101-4/+18
| | | | | | Differential revision: https://reviews.llvm.org/D73966 By Kristóf Umann!
* [clang] Add release notes for the 10.x branch for things I've doneMartin Storsjö2020-02-051-0/+6
| | | | Differential Revision: https://reviews.llvm.org/D74028
* Update for Clang 10 release notes in order to have reference to D66404.Andi-Bogdan Postelnicu2020-02-051-1/+18
| | | | | | | | | | | | Summary: Since `D66404` adds some significat modifications to the `CFG` we should include it in the release notes. Reviewers: hans Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D74031
* Add -Wrange-loop-analysis changes to ReleaseNotesMark de Wever2020-02-041-1/+3
| | | | | | This reflects the recent changes done. Differential Revision: https://reviews.llvm.org/D73834
* Generate docsHans Wennborg2020-01-303-938/+9528
| | | | | | | | | | | | | | bin/clang-tblgen -gen-diag-docs -I../clang/include \ -I../clang/include/clang/Basic/ \ ../clang/include/clang/Basic/Diagnostic.td -o \ ../clang/docs/DiagnosticsReference.rst && \ bin/clang-tblgen -gen-attr-docs -I../clang/include \ ../clang/include/clang/Basic/Attr.td -o \ ../clang/docs/AttributeReference.rst && \ bin/clang-tblgen -gen-opt-docs -I../clang/include \ -I../clang/include/clang/Driver -I../llvm/include \ ../clang/include/clang/Driver/ClangOptionDocs.td -o \ ../clang/docs/ClangCommandLineReference.rst
* [docs][mips] 10.0 Release notesSimon Atanasyan2020-01-261-0/+3
| | | | | | MIPS specific part of LLVM 10.0 Release notes for LLVM, Clang and LLD. Differential Revision: https://reviews.llvm.org/D73108
* [Concepts] Add Concepts to ReleaseNotes.rstSaar Raz2020-01-241-1/+10
| | | | | | Concepts support has been ported to the 10.x release. Add information about the feature to the release notes.
* Update documentation and release notes to match the state ofRichard Smith2020-01-232-16/+26
| | | | -flax-vector-conversions on the Clang 10 release branch.
* Revert "PR17164: Change clang's default behavior from ↵Mitch Phillips2020-01-231-10/+1
| | | | | | | | | | | | -flax-vector-conversions=all to -flax-vector-conversions=integer." This patch broke the Sanitizer buildbots. Please see the commit's differential revision for more information (https://reviews.llvm.org/D67678). This reverts commit b72a8c65e4e34779b6bc9e466203f553f5294486. (cherry picked from commit edd4398f4cd33a305afbca76ac4e6590e9337f4d)
* PR17164: Change clang's default behavior from -flax-vector-conversions=all ↵Richard Smith2020-01-172-1/+34
| | | | | | | | | | | | | | | | | | to -flax-vector-conversions=integer. Summary: See proposal on cfe-dev: http://lists.llvm.org/pipermail/cfe-dev/2019-April/062030.html Reviewers: SjoerdMeijer, eli.friedman Subscribers: kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67678 (cherry picked from commit b72a8c65e4e34779b6bc9e466203f553f5294486)
* Replace CLANG_SPAWN_CC1 env var with a driver mode flagNico Weber2020-01-161-0/+5
| | | | | | | | | | | | | | | | | | Flags are clang's default UI is flags. We can have an env var in addition to that, but in D69825 nobody has yet mentioned why this needs an env var, so omit it for now. If someone needs to set the flag via env var, the existing CCC_OVERRIDE_OPTIONS mechanism works for it (set CCC_OVERRIDE_OPTIONS=+-fno-integrated-cc1 for example). Also mention the cc1-in-process change in the release notes. Also spruce up the test a bit so it actually tests something :) Differential Revision: https://reviews.llvm.org/D72769 (cherry picked from commit 8e5018e990b701391e6c33ba85b012343df67272)
* Implement VectorType conditional operator GNU extension.Erich Keane2020-01-131-19/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GCC supports the conditional operator on VectorTypes that acts as a 'select' in C++ mode. This patch implements the support. Types are converted as closely to GCC's behavior as possible, though in a few places consistency with our existing vector type support was preferred. Note that this implementation is different from the OpenCL version in a number of ways, so it unfortunately required a different implementation. First, the SEMA rules and promotion rules are significantly different. Secondly, GCC implements COND[i] != 0 ? LHS[i] : RHS[i] (where i is in the range 0- VectorSize, for each element). In OpenCL, the condition is COND[i] < 0 ? LHS[i]: RHS[i]. In the process of implementing this, it was also required to make the expression COND ? LHS : RHS type dependent if COND is type dependent, since the type is now dependent on the condition. For example: T ? 1 : 2; Is not typically type dependent, since the result can be deduced from the operands. HOWEVER, if T is a VectorType now, it could change this to a 'select' (basically a swizzle with a non-constant mask) with the 1 and 2 being promoted to vectors themselves. While this is a change, it is NOT a standards incompatible change. Based on my (and D. Gregor's, at the time of writing the code) reading of the standard, the expression is supposed to be type dependent if ANY sub-expression is type dependent. Differential Revision: https://reviews.llvm.org/D71463
* Add -Wrange-loop-analysis changes to ReleaseNotesMark de Wever2020-01-111-0/+4
| | | | This reflects the recent changes done.
* Revert "[ASTMatchers] extract public matchers from const-analysis into own ↵Jonas Toth2020-01-111-132/+0
| | | | | | | | patch" This reverts commit 4c48ea68e491cb42f1b5d43ffba89f6a7f0dadc4. The powerpc buildbots had an internal compiler error after this patch. This requires some inspection.
* [ASTMatchers] extract public matchers from const-analysis into own patchJonas Toth2020-01-111-0/+132
| | | | | | | | | | | | | | | | | | | Summary: The analysis for const-ness of local variables required a view generally useful matchers that are extracted into its own patch. They are `decompositionDecl` and `forEachArgumentWithParamType`, that works for calls through function pointers as well. Reviewers: aaron.ballman Reviewed By: aaron.ballman Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72505
* Implement new AST matcher hasAnyCapture to match on LambdaExpr captures.Reid2020-01-101-0/+31
| | | | Accepts child matchers cxxThisExpr to match on capture of this and also on varDecl.
* [analyzer] Add PlacementNewCheckerGabor Marton2020-01-101-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This checker verifies if default placement new is provided with pointers to sufficient storage capacity. Noncompliant Code Example: #include <new> void f() { short s; long *lp = ::new (&s) long; } Based on SEI CERT rule MEM54-CPP https://wiki.sei.cmu.edu/confluence/display/cplusplus/MEM54-CPP.+Provide+placement+new+with+properly+aligned+pointe This patch does not implement checking of the alignment. Reviewers: NoQ, xazax.hun Subscribers: mgorny, whisperity, xazax.hun, baloghadamsoftware, szepet, rnkovacs, a.sidorin, mikhail.ramalho, donat Tags: #clang Differential Revision: https://reviews.llvm.org/D71612
* Add builtins for aligning and checking alignment of pointers and integersAlex Richardson2020-01-091-0/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces three new builtins (which work on both pointers and integers) that can be used instead of common bitwise arithmetic: __builtin_align_up(x, alignment), __builtin_align_down(x, alignment) and __builtin_is_aligned(x, alignment). I originally added these builtins to the CHERI fork of LLVM a few years ago to handle the slightly different C semantics that we use for CHERI [1]. Until recently these builtins (or sequences of other builtins) were required to generate correct code. I have since made changes to the default C semantics so that they are no longer strictly necessary (but using them does generate slightly more efficient code). However, based on our experience using them in various projects over the past few years, I believe that adding these builtins to clang would be useful. These builtins have the following benefit over bit-manipulation and casts via uintptr_t: - The named builtins clearly convey the semantics of the operation. While checking alignment using __builtin_is_aligned(x, 16) versus ((x & 15) == 0) is probably not a huge win in readably, I personally find __builtin_align_up(x, N) a lot easier to read than (x+(N-1))&~(N-1). - They preserve the type of the argument (including const qualifiers). When using casts via uintptr_t, it is easy to cast to the wrong type or strip qualifiers such as const. - If the alignment argument is a constant value, clang can check that it is a power-of-two and within the range of the type. Since the semantics of these builtins is well defined compared to arbitrary bit-manipulation, it is possible to add a UBSAN checker that the run-time value is a valid power-of-two. I intend to add this as a follow-up to this change. - The builtins avoids int-to-pointer casts both in C and LLVM IR. In the future (i.e. once most optimizations handle it), we could use the new llvm.ptrmask intrinsic to avoid the ptrtoint instruction that would normally be generated. - They can be used to round up/down to the next aligned value for both integers and pointers without requiring two separate macros. - In many projects the alignment operations are already wrapped in macros (e.g. roundup2 and rounddown2 in FreeBSD), so by replacing the macro implementation with a builtin call, we get improved diagnostics for many call-sites while only having to change a few lines. - Finally, the builtins also emit assume_aligned metadata when used on pointers. This can improve code generation compared to the uintptr_t casts. [1] In our CHERI compiler we have compilation mode where all pointers are implemented as capabilities (essentially unforgeable 128-bit fat pointers). In our original model, casts from uintptr_t (which is a 128-bit capability) to an integer value returned the "offset" of the capability (i.e. the difference between the virtual address and the base of the allocation). This causes problems for cases such as checking the alignment: for example, the expression `if ((uintptr_t)ptr & 63) == 0` is generally used to check if the pointer is aligned to a multiple of 64 bytes. The problem with offsets is that any pointer to the beginning of an allocation will have an offset of zero, so this check always succeeds in that case (even if the address is not correctly aligned). The same issues also exist when aligning up or down. Using the alignment builtins ensures that the address is used instead of the offset. While I have since changed the default C semantics to return the address instead of the offset when casting, this offset compilation mode can still be used by passing a command-line flag. Reviewers: rsmith, aaron.ballman, theraven, fhahn, lebedev.ri, nlopes, aqjune Reviewed By: aaron.ballman, lebedev.ri Differential Revision: https://reviews.llvm.org/D71499
* [OpenCL][Docs] Rename C++ for OpenCL labelSven van Haastregt2020-01-091-2/+3
| | | | To avoid potential confusion with OpenCL C++.
* LTOVisibility.rst: fix up syntax in exampleTeresa Johnson2020-01-081-1/+1
| | | | | | | | | | | | | | | | Summary: Pretty self-evident. This example was missing an lparen. Added it, and fixed up the ASCII art. Patch by Nick Black <dankamongmen@gmail.com> Reviewers: pcc Reviewed By: pcc Subscribers: tejohnson, mehdi_amini, inglorion, hiraditya, steven_wu, dexonsmith, cfe-commits Tags: #llvm, #clang Differential Revision: https://reviews.llvm.org/D70765
* Add a new AST matcher 'optionally'.Rihan Yang2020-01-081-12/+38
| | | | | | | | This matcher matches any node and at the same time executes all its inner matchers to produce any possbile result bindings. This is useful when a user wants certain supplementary information that's not always present along with the main match result.
* [OpenCL] Add link to C++ for OpenCL documentationAnastasia Stulova2020-01-032-281/+36
| | | | | | | | | Remove description of language mode from the language extensions and add a link to pdf document. Tags: #clang Differential Revision: https://reviews.llvm.org/D72076
* Handle init statements in readability-else-after-returnNathan James2020-01-021-17/+114
| | | | | | | | | | Adds a new ASTMatcher condition called 'hasInitStatement()' that matches if, switch and range-for statements with an initializer. Reworked clang-tidy readability-else-after-return to handle variables in the if condition or init statements in c++17 ifs. Also checks if removing the else would affect object lifetimes in the else branch. Fixes PR44364.
* [OPENMP][DOCS]Update status of OpenMP 5.0 features, NFC.Alexey Bataev2019-12-241-2/+2
|
* fix a doc typo to cycle botsNico Weber2019-12-201-1/+1
|
* [analyzer] Add Fuchsia Handle checkerGabor Horvath2019-12-201-0/+25
| | | | | | | The checker can diagnose handle use after releases, double releases, and handle leaks. Differential Revision: https://reviews.llvm.org/D70470
OpenPOWER on IntegriCloud