summaryrefslogtreecommitdiffstats
path: root/clang/docs
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-format] Add SpaceBeforeCpp11BracedList option.Hans Wennborg2018-06-141-0/+12
| | | | | | | | | | | | | | | | | | | | WebKit C++ style for object initialization is as follows: Foo foo { bar }; Yet using clang-format -style=webkit changes this to: Foo foo{ bar }; As there is no existing combination of rules that will ensure a space before a braced list in this fashion, this patch adds a new SpaceBeforeCpp11BracedList rule. Patch by Ross Kirsling! Differential Revision: https://reviews.llvm.org/D46024 llvm-svn: 334692
* docs: Add a missing LTO visibility reference.Peter Collingbourne2018-06-131-4/+5
| | | | llvm-svn: 334671
* docs: Correct some misstatements in the control flow integrity docs.Peter Collingbourne2018-06-131-9/+10
| | | | | | These were true at one point but haven't been true for a long time. llvm-svn: 334669
* Add -fforce-emit-vtablesPiotr Padlewski2018-06-133-0/+18
| | | | | | | | | | | | | | | | | | | Summary: In many cases we can't devirtualize because definition of vtable is not present. Most of the time it is caused by inline virtual function not beeing emitted. Forcing emitting of vtable adds a reference of these inline virtual functions. Note that GCC was always doing it. Reviewers: rjmccall, rsmith, amharc, kuhar Subscribers: llvm-commits, cfe-commits Differential Revision: https://reviews.llvm.org/D47108 Co-authored-by: Krzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com> llvm-svn: 334600
* [AArch64] Support reserving x20 registerPetr Hosek2018-06-121-0/+4
| | | | | | | | | | | | Register x20 is a callee-saved register which may be used for other purposes in certain contexts, for example to hold special variables within the kernel. This change adds support for reserving this register both to frontend and backend to make this register usable for these purposes. Differential Revision: https://reviews.llvm.org/D46552 llvm-svn: 334531
* clang-format: Introduce BreakInheritanceList optionFrancois Ferrand2018-06-111-13/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This option replaces the BreakBeforeInheritanceComma option with an enum, thus introducing a mode where the colon stays on the same line as constructor declaration: // When it fits on line: class A : public B, public C { ... }; // When it does not fit: class A : public B, public C { ... }; This matches the behavior of the `BreakConstructorInitializers` option, introduced in https://reviews.llvm.org/D32479. Reviewers: djasper, klimek Reviewed By: djasper Subscribers: mzeren-vmw, cfe-commits Differential Revision: https://reviews.llvm.org/D43015 llvm-svn: 334408
* [Clang Tablegen][RFC] Allow Early Textual Substitutions in `Diagnostic` ↵Eric Fiselier2018-05-191-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | messages. Summary: There are cases where the same string or select is repeated verbatim in a lot of diagnostics. This can be a pain to maintain and update. Tablegen provides no way stash the common text somewhere and reuse it in the diagnostics, until now! This patch allows diagnostic texts to contain `%sub{<definition-name>}`, where `<definition-name>` names a Tablegen record of type `TextSubstitution`. These substitutions are done early, before the diagnostic string is otherwise processed. All `%sub` modifiers will be replaced before the diagnostic definitions are emitted. The substitution must specify all arguments used by the substitution, and modifier indexes in the substitution are re-numbered accordingly. For example: ``` def select_ovl_candidate : TextSubstitution<"%select{function|constructor}0%select{| template| %2}1">; ``` when used as ``` "candidate `%sub{select_ovl_candidate}3,2,1 not viable" ``` will act as if we wrote: ``` "candidate %select{function|constructor}3%select{| template| %1}2 not viable" ``` Reviewers: rsmith, rjmccall, aaron.ballman, a.sidorin Reviewed By: rjmccall Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46740 llvm-svn: 332799
* This patch aims to match the changes introducedAlexander Ivchenko2018-05-181-2/+0
| | | | | | | | | | | | | | | | | in gcc by https://gcc.gnu.org/ml/gcc-cvs/2018-04/msg00534.html. The -mibt feature flag is being removed, and the -fcf-protection option now also defines a CET macro and causes errors when used on non-X86 targets, while X86 targets no longer check for -mibt and -mshstk to determine if -fcf-protection is supported. -mshstk is now used only to determine availability of shadow stack intrinsics. Comes with an LLVM patch (D46882). Patch by mike.dvoretsky Differential Revision: https://reviews.llvm.org/D46881 llvm-svn: 332704
* [ASTMatchers] Introduce a blockDecl matcher for matching block declarationsGeorge Karpenkov2018-05-161-4/+81
| | | | | | | | Blocks can be matched just as well as functions or Objective-C methods. Differential Revision: https://reviews.llvm.org/D46980 llvm-svn: 332545
* [diagtool] Add diagtool to install target.Jonas Devlieghere2018-05-163-0/+58
| | | | | | | | | | | | | | | | | | | | | | Although not very well known, diagtool is an incredibly convenient utility for dealing with diagnostics. Particularly useful are the "tree" and "show-enabled" commands: - The former prints the hierarchy of diagnostic (warning) flags and which of them are enabled by default. - The latter can be used to replace an invocation to clang and will print which diagnostics are disabled, warnings or errors. For instance: `diagtool show-enabled -Wall -Werror /tmp/test.c` will print that -Wunused-variable (warn_unused_variable) will be treated as an error. This patch adds them to the install target so it gets shipped with the LLVM release. It also adds a very basic man page and mentions this change in the release notes. Differential revision: https://reviews.llvm.org/D46694 llvm-svn: 332448
* clang-format: Allow optimizer to break template declaration.Francois Ferrand2018-05-161-7/+45
| | | | | | | | | | | | | | | | | | | Summary: Introduce `PenaltyBreakTemplateDeclaration` to control the penalty, and change `AlwaysBreakTemplateDeclarations` to an enum with 3 modes: * `No` for regular, penalty based, wrapping of template declaration * `MultiLine` for always wrapping before multi-line declarations (e.g. same as legacy behavior when `AlwaysBreakTemplateDeclarations=false`) * `Yes` for always wrapping (e.g. same as legacy behavior when `AlwaysBreakTemplateDeclarations=true`) Reviewers: krasimir, djasper, klimek Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42684 llvm-svn: 332436
* [Documentation] Fix Release Notes format issues.Eugene Zelenko2018-05-151-7/+8
| | | | llvm-svn: 332405
* Added atomic_fetch_min, max, umin, umax intrinsics to clang.Elena Demikhovsky2018-05-131-1/+26
| | | | | | | | | These intrinsics work exactly as all other atomic_fetch_* intrinsics and allow to create *atomicrmw* with ordering. Updated the clang-extensions document. Differential Revision: https://reviews.llvm.org/D46386 llvm-svn: 332193
* Remove \brief commands from doxygen comments.Adrian Prantl2018-05-092-3/+3
| | | | | | | | | | | | | | | | | | | This is similar to the LLVM change https://reviews.llvm.org/D46290. We've been running doxygen with the autobrief option for a couple of years now. This makes the \brief markers into our comments redundant. Since they are a visual distraction and we don't want to encourage more \brief markers in new code either, this patch removes them all. Patch produced by for i in $(git grep -l '\@brief'); do perl -pi -e 's/\@brief //g' $i & done for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done Differential Revision: https://reviews.llvm.org/D46320 llvm-svn: 331834
* Add missing newlines to cl::extrahelp usesStephane Sezer2018-05-082-2/+2
| | | | llvm-svn: 331802
* [ASTMatchers] Overload isConstexpr for ifStmtsGabor Horvath2018-05-081-2/+27
| | | | | | Differential Revision: https://reviews.llvm.org/D46233 llvm-svn: 331759
* [clang-format] Add raw string formatting to release notesKrasimir Georgiev2018-05-081-0/+4
| | | | | | | | | | | | Reviewers: hans Reviewed By: hans Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46572 llvm-svn: 331750
* [docs] Fix typos in the Clang User's Manual.Joel Galenson2018-05-071-2/+2
| | | | llvm-svn: 331644
* Non-zero-length bit-fields make a class non-empty.Richard Smith2018-05-071-0/+9
| | | | | | | | | | | | | | | | | | | | This implements the rule intended by the standard (see LWG 2358) and the rule intended by the Itanium C++ ABI (see https://github.com/itanium-cxx-abi/cxx-abi/pull/51), and makes Clang match the behavior of GCC, ICC, and MSVC. A pedantic reading of both the standard and the ABI indicate that Clang is currently technically correct, but that's not worth much when it's clear that the wording is wrong in both those places. This is an ABI break for classes that derive from a class that is empty other than one or more unnamed non-zero-length bit-fields. Such cases are expected to be rare, but -fclang-abi-compat=6 restores the old behavior just in case. Differential Revision: https://reviews.llvm.org/D45174 llvm-svn: 331620
* [X86] directstore and movdir64b intrinsicsGabor Buella2018-05-011-0/+4
| | | | | | | | | | Reviewers: spatel, craig.topper, RKSimon Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D45984 llvm-svn: 331249
* [ShadowCallStack] fix the docsKostya Serebryany2018-05-011-2/+2
| | | | llvm-svn: 331238
* [docs] Fix docs/InternalsManual.rst heading.Fangrui Song2018-04-301-1/+1
| | | | llvm-svn: 331225
* [Driver, CodeGen] rename options to disable an FP cast optimizationSanjay Patel2018-04-302-17/+14
| | | | | | | | | | | | | | As suggested in the post-commit thread for rL331056, we should match these clang options with the established vocabulary of the corresponding sanitizer option. Also, the use of 'strict' is well-known for these kinds of knobs, and we can improve the descriptive text in the docs. So this intends to match the logic of D46135 but only change the words. Matching LLVM commit to match this spelling of the attribute to follow shortly. Differential Revision: https://reviews.llvm.org/D46236 llvm-svn: 331209
* Regenerated AST Matchers doc.Alexander Kornienko2018-04-301-6/+8
| | | | | | Backported a minor fix to the comment in the header. llvm-svn: 331207
* Rename DiagnosticClient to DiagnosticConsumer as per issue 5397.Fangrui Song2018-04-301-8/+8
| | | | llvm-svn: 331152
* PR37275 packed attribute should not apply to base classesRichard Smith2018-04-291-0/+6
| | | | | | | | | | | | | Clang incorrectly applied the packed attribute to base classes. Per GCC's documentation and as can be observed from its behavior, packed only applies to members, not base classes. This change is conditioned behind -fclang-abi-compat so that an ABI break can be avoided by users if desired. Differential Revision: https://reviews.llvm.org/D46218 llvm-svn: 331136
* [docs] more dashesSanjay Patel2018-04-271-1/+1
| | | | llvm-svn: 331057
* [docs] add -ffp-cast-overflow-workaround to the release notesSanjay Patel2018-04-271-0/+9
| | | | | | | | | This option was added with: D46135 rL331041 ...copying the text from UsersManual.rst for more exposure. llvm-svn: 331056
* [Driver, CodeGen] add options to enable/disable an FP cast optimizationSanjay Patel2018-04-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | As discussed in the post-commit thread for: rL330437 ( http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20180423/545906.html ) We need a way to opt-out of a float-to-int-to-float cast optimization because too much existing code relies on the platform-specific undefined result of those casts when the float-to-int overflows. The LLVM changes associated with adding this function attribute are here: rL330947 rL330950 rL330951 Also as suggested, I changed the LLVM doc to mention the specific sanitizer flag that catches this problem: rL330958 Differential Revision: https://reviews.llvm.org/D46135 llvm-svn: 331041
* [HWASan] Update HWASan assembly snippet in the docsAlex Shlyapnikov2018-04-241-9/+10
| | | | | | | | | | | | Summary: To complement https://reviews.llvm.org/D45840 Reviewers: eugenis Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D45996 llvm-svn: 330745
* [Docs] Regenerate command line documentation.Craig Topper2018-04-231-0/+14
| | | | llvm-svn: 330654
* [Sema] Add -Wno-self-assign-overloadedRoman Lebedev2018-04-231-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: It seems there isn't much enthusiasm for `-wtest` D45685. This is more conservative version, which i had in the very first revision of D44883, but that 'erroneously' got removed because of the review. **Based on some [irc] discussions, it must really be documented that we want all the new diagnostics to have their own flags, to ease rollouts, transitions, etc.** Please do note that i'm only adding `-Wno-self-assign-overloaded`, but not `-Wno-self-assign-field-overloaded`, because i'm honestly not aware of any false-positives from the `-field` variant, but i can just as easily add it if wanted. https://reviews.llvm.org/D44883#1068561 Reviewers: dblaikie, aaron.ballman, thakis, rjmccall, rsmith Reviewed By: dblaikie Subscribers: Quuxplusone, chandlerc, cfe-commits Differential Revision: https://reviews.llvm.org/D45766 llvm-svn: 330651
* [docs] Regenerate command line referenceJonas Hahnfeld2018-04-201-19/+77
| | | | | | | This will correctly sort some manually added entries which should generally be avoided! llvm-svn: 330430
* [CUDA] Document recent changesJonas Hahnfeld2018-04-201-0/+12
| | | | | | | | | * Finding installations via ptxas binary * Relocatable device code Differential Revision: https://reviews.llvm.org/D45449 llvm-svn: 330426
* Fix malformed table introduced by r330174Duncan P. N. Exon Smith2018-04-171-2/+2
| | | | | | http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/23573 llvm-svn: 330177
* Remove GC-related warning terminologyDuncan P. N. Exon Smith2018-04-171-1/+1
| | | | | | | | ObjC-GC isn't used any more; clean up this warning text. rdar://problem/39049693 llvm-svn: 330174
* Fix doc typoVlad Tsyrklevich2018-04-121-2/+2
| | | | llvm-svn: 329942
* [x86] wbnoinvd intrinsicGabor Buella2018-04-111-0/+2
| | | | | | | | | | | | | | The WBNOINVD instruction writes back all modified cache lines in the processor’s internal cache to main memory but does not invalidate (flush) the internal caches. Reviewers: craig.topper, zvi, ashlykov Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D43817 llvm-svn: 329848
* Document -std= values for different languagesDimitry Andric2018-04-111-1/+120
| | | | | | | | | | | | | | | | | | | | Summary: After a remark on a FreeBSD mailing list that the clang man page did not have any list of possible values for the `-std=` flag, I have now attempted to exhaustively list those, for each available language. I also documented the default standard for each language, if there was more than one choice. Reviewers: rsmith, dexonsmith, sylvestre.ledru, mgorny Reviewed By: rsmith Subscribers: fhahn, emaste, cfe-commits, krytarowski Differential Revision: https://reviews.llvm.org/D45406 llvm-svn: 329827
* [CUDA] Added --[no-]cuda-include-ptx=sm_XX|all option.Artem Belevich2018-04-101-0/+4
| | | | | | | | | | | | | | Currently we always include PTX into the fatbin along with the GPU code.It about doubles the size of the GPU binary we need to carry in the executable. These options allow control inclusion of PTX into GPU binary. This patch does not change the defaults, though we may consider making no-PTX the default in the future. Differential Revision: https://reviews.llvm.org/D45495 llvm-svn: 329737
* [Sema] Extend -Wself-assign and -Wself-assign-field to warn on overloaded ↵Roman Lebedev2018-04-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | self-assignment (classes) Summary: This has just bit me, so i though it would be nice to avoid that next time :) Motivational case: https://godbolt.org/g/cq9UNk Basically, it's likely to happen if you don't like shadowing issues, and use `-Wshadow` and friends. And it won't be diagnosed by clang. The reason is, these self-assign diagnostics only work for builtin assignment operators. Which makes sense, one could have a very special operator=, that does something unusual in case of self-assignment, so it may make sense to not warn on that. But while it may be intentional in some cases, it may be a bug in other cases, so it would be really great to have some diagnostic about it... Reviewers: aaron.ballman, rsmith, rtrieu, nikola, rjmccall, dblaikie Reviewed By: rjmccall Subscribers: EricWF, lebedev.ri, thakis, Quuxplusone, cfe-commits Differential Revision: https://reviews.llvm.org/D44883 llvm-svn: 329493
* Fix typos in clangAlexander Kornienko2018-04-063-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via codespell -q 3 -I ../clang-whitelist.txt Where whitelist consists of: archtype cas classs checkk compres definit frome iff inteval ith lod methode nd optin ot pres statics te thru Patch by luzpaz! (This is a subset of D44188 that applies cleanly with a few files that have dubious fixes reverted.) Differential revision: https://reviews.llvm.org/D44188 llvm-svn: 329399
* Allow the creation of human-friendly ASTDumper to arbitrary output streamAlexander Kornienko2018-04-061-1/+2
| | | | | | | | | | | | | | | | | | | | | Summary: `ASTPrinter` allows setting the ouput to any O-Stream, but that printer creates source-code-like syntax (and is also marked with a `FIXME`). The nice, colourful, mostly human-readable `ASTDumper` only works on the standard output, which is not feasible in case a user wants to see the AST of a file through a code navigation/comprehension tool. This small addition of an overload solves generating a nice colourful AST block for the users of a tool I'm working on, [[ http://github.com/Ericsson/CodeCompass | CodeCompass ]], as opposed to having to duplicate the behaviour of definitions that only exist in the anonymous namespace of implementation TUs related to this module. Reviewers: alexfh, klimek, rsmith Reviewed By: alexfh Subscribers: rnkovacs, dkrupp, gsd, xazax.hun, cfe-commits, #clang Tags: #clang Patch by Whisperity! Differential Revision: https://reviews.llvm.org/D45096 llvm-svn: 329391
* DR1672, DR1813, DR1881, DR2120: Implement recent fixes to "standardRichard Smith2018-04-051-0/+5
| | | | | | | | | | | | | | | | | layout" rules. The new rules say that a standard-layout struct has its first non-static data member and all base classes at offset 0, and consider a class to not be standard-layout if that would result in multiple subobjects of a single type having the same address. We track "is C++11 standard-layout class" separately from "is standard-layout class" so that the ABIs that need this information can still use it. Differential Revision: https://reviews.llvm.org/D45176 llvm-svn: 329332
* AArch64: Implement support for the shadowcallstack attribute.Peter Collingbourne2018-04-041-21/+64
| | | | | | | | | | | | The implementation of shadow call stack on aarch64 is quite different to the implementation on x86_64. Instead of reserving a segment register for the shadow call stack, we reserve the platform register, x18. Any function that spills lr to sp also spills it to the shadow call stack, a pointer to which is stored in x18. Differential Revision: https://reviews.llvm.org/D45239 llvm-svn: 329236
* As we don't use minor version anymore, let's remove it from the release ↵Sylvestre Ledru2018-04-041-2/+2
| | | | | | notes too llvm-svn: 329161
* Add the -fsanitize=shadow-call-stack flagVlad Tsyrklevich2018-04-032-0/+151
| | | | | | | | | | | | | | | | | Summary: Add support for the -fsanitize=shadow-call-stack flag which causes clang to add ShadowCallStack attribute to functions compiled with that flag enabled. Reviewers: pcc, kcc Reviewed By: pcc, kcc Subscribers: cryptoad, cfe-commits, kcc Differential Revision: https://reviews.llvm.org/D44801 llvm-svn: 329122
* Use Clang when referring to the project and clang when referring to the binary.Richard Smith2018-04-031-2/+3
| | | | llvm-svn: 329098
* [Hexagon] Remove -mhvx-double and the corresponding subtarget featureKrzysztof Parzyszek2018-04-031-4/+0
| | | | | | | Specifying the HVX vector length should be done via the -mhvx-length option. llvm-svn: 329077
* UsersManual.rst: update text for /GX- to match r328708Hans Wennborg2018-04-031-1/+1
| | | | llvm-svn: 329052
OpenPOWER on IntegriCloud