summaryrefslogtreecommitdiffstats
path: root/clang/docs
Commit message (Collapse)AuthorAgeFilesLines
* docs: Fix Sphinx detection with out-of-tree buildsTom Stellard2017-05-091-1/+1
| | | | | | Adapt to changes made in r302499. llvm-svn: 302500
* [clang-format] Convert AlignEscapedNewlinesLeft to an enum, addingDaniel Jasper2017-05-081-15/+37
| | | | | | | | | | | | | | | | | | | | DontAlign This converts the clang-format option AlignEscapedNewlinesLeft from a boolean to an enum, named AlignEscapedNewlines, with options Left (prev. true), Right (prev. false), and a new option DontAlign. When set to DontAlign, the backslashes are placed just after the last token in each line: #define EXAMPLE \ do { \ int x = aaaaa; \ int b; \ int dddddddddd; \ } while (0) Patch by jtbandes. Thank you! llvm-svn: 302428
* Correct the attribute spelling for guarded_var and pt_guarded_var.Aaron Ballman2017-05-081-2/+2
| | | | | | Patch by Roman Lebedev. llvm-svn: 302419
* Update LanguageExtensions doc to refer to C++14 instead of C++1yEric Fiselier2017-05-061-16/+16
| | | | llvm-svn: 302364
* [sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a ↵Kostya Serebryany2017-05-051-2/+3
| | | | | | hidden -mllvm flag. clang part. llvm-svn: 302320
* Add cxxStdInitializerListExpr AST matcherJakub Kuderski2017-05-051-2/+15
| | | | | | | | | | | | | | | | | Summary: This adds a new ASTMatcher for CXXStdInitializerListExprs that matches C++ initializer list expressions. The primary motivation is to use it to fix [[ https://bugs.llvm.org/show_bug.cgi?id=32896 | PR32896 ]] (review here [[ https://reviews.llvm.org/D32767 | D32767 ]]). Reviewers: alexfh, Prazek, aaron.ballman Reviewed By: alexfh, aaron.ballman Subscribers: malcolm.parsons, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D32810 llvm-svn: 302287
* Do not redefine the THREAD_ANNOTATION_ATTRIBUTE__ macro in the documentation.Aaron Ballman2017-05-051-2/+0
| | | | | | Patch by Roman Lebedev. llvm-svn: 302275
* Revert "[docs] UBSan: Mention that print_stacktrace=1 is unsupported on Darwin"Vedant Kumar2017-05-021-2/+0
| | | | | | | | | This reverts commit r300295. It's no longer true, print_stacktrace=1 is supported on Darwin/Windows as of r301839. llvm-svn: 301960
* [sanitizer-coverage] update the SanitizerCoverage docs to reflect the ↵Kostya Serebryany2017-05-021-233/+167
| | | | | | current state llvm-svn: 301888
* [sanitizer-coverage] add a deprecation note to coverage_direct=1Kostya Serebryany2017-05-011-0/+2
| | | | llvm-svn: 301824
* [Docs] Correct the path to the clang-format-diff.py script to include the ↵Craig Topper2017-04-241-2/+3
| | | | | | clang-format directory. llvm-svn: 301202
* PR19260: Teach doxygen to spell correctly the include paths.Vassil Vassilev2017-04-201-4/+4
| | | | | | | | | | Currently we have #include <Sema.h> in the doxygen page documenting Sema. The patch changes it ot #include "clang/Sema/Sema.h" which is what we would spell if we need to include it in a real codebase. Patch by Yuka Takahashi (D32113)! llvm-svn: 300825
* [sanitizer-coverage] trim down the docsKostya Serebryany2017-04-191-170/+0
| | | | llvm-svn: 300776
* [sanitizer-coverage] deprecate some of the stale coverage variantsKostya Serebryany2017-04-191-23/+1
| | | | llvm-svn: 300738
* Add #pragma clang attributeAlex Lorenz2017-04-181-0/+175
| | | | | | | | | | | | | | | | | This is a recommit of r300539 that was reverted in r300543 due to test failures. The original commit message is displayed below: The new '#pragma clang attribute' directive can be used to apply attributes to multiple declarations. An attribute must satisfy the following conditions to be supported by the pragma: - It must have a subject list that's defined in the TableGen file. - It must be documented. - It must not be late parsed. - It must have a GNU/C++11 spelling. Differential Revision: https://reviews.llvm.org/D30009 llvm-svn: 300556
* Revert r300539 - Add #pragma clang attributeAlex Lorenz2017-04-181-175/+0
| | | | | | | Some tests fail on the Windows buildbots. I will have to investigate more. This commit reverts r300539, r300540 and r300542. llvm-svn: 300543
* Add #pragma clang attributeAlex Lorenz2017-04-181-0/+175
| | | | | | | | | | | | | | The new '#pragma clang attribute' directive can be used to apply attributes to multiple declarations. An attribute must satisfy the following conditions to be supported by the pragma: - It must have a subject list that's defined in the TableGen file. - It must be documented. - It must not be late parsed. - It must have a GNU/C++11 spelling. Differential Revision: https://reviews.llvm.org/D30009 llvm-svn: 300539
* [docs] UBSan: Mention that print_stacktrace=1 is unsupported on DarwinVedant Kumar2017-04-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Printing out stack traces along with UBSan diagnostics is unsupported on Darwin. That's because it isn't possible to use the fast unwinder or the slow unwinder. Apparently, it's inappropriate to use the fast unwinder for UBSan issues. I'm not exactly sure why (see the comment in ubsan_diag.cc). Forcing use of the fast unwinder produces decent results, AFAICT. Darwin also does not appear to have a slow unwinder suitable for use with the sanitizers. Apparently that's because of PR20800 [1][2]. But that bug has been fixed. I'm not sure if there is anything preventing use of the slow unwinder now. Currently, passing UBSAN_OPTIONS=print_stacktrace=1 does nothing on Darwin. This isn't good, but it might be a while before we can fix the situation, so we should at least document it. [1] https://github.com/google/sanitizers/issues/137 "We can't use the slow unwinder on OSX now, because Clang produces incorrect unwind info for the ASan runtime functions on OSX (http://llvm.org/PR20800)." [2] https://bugs.llvm.org/show_bug.cgi?id=20800 Bug 20800 - Invalid compact unwind info generated for a function without frame pointers on OSX llvm-svn: 300295
* [docs] Regenerate diagnostics reference.Richard Smith2017-04-131-2/+119
| | | | llvm-svn: 300271
* [docs] Fix a couple of typos in command line flag help text and regenerate ↵Richard Smith2017-04-131-11/+57
| | | | | | documentation. llvm-svn: 300270
* [Sema] Add __is_aggregate type-traitEric Fiselier2017-04-121-0/+1
| | | | | | | | | | | | | | | | Summary: [LWG 2911](http://cplusplus.github.io/LWG/lwg-defects.html#2911) adds `std::is_aggregate` to the library, which requires a new builtin trait. This patch implements `__is_aggregate`. Reviewers: rsmith, majnemer, aaron.ballman Reviewed By: aaron.ballman Subscribers: STL_MSFT, cfe-commits Differential Revision: https://reviews.llvm.org/D31513 llvm-svn: 300116
* [Driver] Add compiler option to generate a reproducerBruno Cardoso Lopes2017-04-121-0/+10
| | | | | | | | | | | | | | | | | | | | | One way to currently test the reproducers is to setup "FORCE_CLANG_DIAGNOSTICS_CRASH=1" before invoking clang. This simulates a crash and produces the same contents needed by the reproducers. The reproducers are specially useful when triaging Modules issues, not only on crashes, but also for reproducing misleading warnings, errors, etc. Add a '-gen-reproducer' driver option to clang (or any similar name) and give users a flag option. Note that clang already has a -fno-crash-diagnostics, which disables the crash reproducers. I've decided not to propose "-fcrash-diagnostics" since it doesn't convey the ideia of reproduction despite a crash. rdar://problem/24114619 Differential Revision: https://reviews.llvm.org/D27604 llvm-svn: 300109
* Add more examples to clang-format configurationSylvestre Ledru2017-04-111-3/+66
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: Eugene.Zelenko, klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D31408 llvm-svn: 299919
* docs: Use the term "whole-program devirtualization" instead of "virtual ↵Peter Collingbourne2017-04-101-8/+9
| | | | | | | | | function call optimization". The former term is probably more familiar to users. Also add references to the command line flags used to enable the features described in the doc. llvm-svn: 299902
* clang-format: Support formatting utf-8 character literals in C++11+ mode.Nico Weber2017-04-051-1/+2
| | | | | | | | | | | | | | | | | | | clang-format <<END auto c1 = u8'a'; auto c2 = u'a'; END Before: auto c1 = u8 'a'; auto c2 = u'a'; Now: auto c1 = u8'a'; auto c2 = u'a'; Patch from Denis Gladkikh <llvm@denis.gladkikh.email>! llvm-svn: 299574
* Another attempt to fix the sphinx warning from r299470Adam Nemet2017-04-041-1/+1
| | | | llvm-svn: 299488
* Fix sphinx warning from r299470Adam Nemet2017-04-041-1/+1
| | | | llvm-svn: 299481
* Add #pragma clang fpAdam Nemet2017-04-041-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | This adds the new pragma and the first variant, contract(on/off/fast). The pragma has the same block scope rules as STDC FP_CONTRACT, i.e. it can be placed at the beginning of a compound statement or at file scope. Similarly to STDC FP_CONTRACT there is no need to use attributes. First an annotate token is inserted with the parsed details of the pragma. Then the annotate token is parsed in the proper contexts and the Sema is updated with the corresponding FPOptions using the shared ActOn function with STDC FP_CONTRACT. After this the FPOptions from the Sema is propagated into the AST expression nodes. There is no change here. I was going to add a 'default' option besides 'on/off/fast' similar to STDC FP_CONTRACT but then decided against it. I think that we'd have to make option uppercase then to avoid using 'default' the keyword. Also because of the scoped activation of pragma I am not sure there is really a need a for this. Differential Revision: https://reviews.llvm.org/D31276 llvm-svn: 299470
* [ASTMatchers] add typeAliasTemplateDecl matcher.Eric Liu2017-03-281-0/+9
| | | | | | | | | | | | Reviewers: hokein, aaron.ballman Reviewed By: aaron.ballman Subscribers: aaron.ballman, cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D28671 llvm-svn: 298912
* Add LibreOffice Clang plugin to ExternalClangExamples.rstStephan Bergmann2017-03-221-0/+8
| | | | | | | | | | Reviewers: rsmith, rizsotto.mailinglist Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D31133 llvm-svn: 298490
* Remove the -faltivec alias option and replace it with -maltivec everywhere.Eric Christopher2017-03-212-2/+2
| | | | | | | | | | | The alias was only ever used on darwin and had some issues there, and isn't used in practice much. Also fixes a problem with -mno-altivec not turning off -maltivec. Also add a diagnostic for faltivec/fno-altivec that directs users to use maltivec options and include the altivec.h file explicitly. llvm-svn: 298449
* [docs] Clarify sanitizer flag behaviorVedant Kumar2017-03-201-3/+3
| | | | | | | | PR32346 suggests that UBSan's docs about the -fsanitize, -fno-sanitize-recover, and -fsanitize-trap options are not explicit enough. Try to improve the wording. llvm-svn: 298310
* Proposal: Backward-edge CFI for return statements (RCFI)Kostya Serebryany2017-03-201-1/+89
| | | | | | | | | | | | | | Summary: Proposal: Backward-edge CFI for return statements (RCFI) Reviewers: pcc, eugenis, krasin Reviewed By: eugenis Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D31112 llvm-svn: 298303
* Fix some sphinx -Werror'sJonathan Roelofs2017-03-202-21/+32
| | | | | | ... mostly having to do with code blocks which the syntax highlighter chokes on llvm-svn: 298275
* Add more examples to clang-format configurationSylvestre Ledru2017-03-201-2/+228
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D30990 llvm-svn: 298245
* [Modules] Add documentation on private frameworksBruno Cardoso Lopes2017-03-161-0/+11
| | | | | | | | | Expand a bit on private modules with some guidance on how to write them in the context of frameworks. rdar://problem/24758771 llvm-svn: 298012
* Add AST matchers for ObjCProtocolDecl, ObjCCategoryDecl, ObjCMethodDecl, ↵Aaron Ballman2017-03-151-0/+53
| | | | | | | | ObjCIvarDecl, and ObjCPropertyDecl. Patch by Dave Lee. llvm-svn: 297882
* Add more clang-format changes to the 5.0 release notesKrasimir Georgiev2017-03-141-5/+17
| | | | llvm-svn: 297730
* describe the recent changes in clang-format in the 5.0 release notesSylvestre Ledru2017-03-141-0/+25
| | | | llvm-svn: 297721
* [ubsan] Add a nullability sanitizerVedant Kumar2017-03-141-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach UBSan to detect when a value with the _Nonnull type annotation assumes a null value. Call expressions, initializers, assignments, and return statements are all checked. Because _Nonnull does not affect IRGen, the new checks are disabled by default. The new driver flags are: -fsanitize=nullability-arg (_Nonnull violation in call) -fsanitize=nullability-assign (_Nonnull violation in assignment) -fsanitize=nullability-return (_Nonnull violation in return stmt) -fsanitize=nullability (all of the above) This patch builds on top of UBSan's existing support for detecting violations of the nonnull attributes ('nonnull' and 'returns_nonnull'), and relies on the compiler-rt support for those checks. Eventually we will need to update the diagnostic messages in compiler-rt (there are FIXME's for this, which will be addressed in a follow-up). One point of note is that the nullability-return check is only allowed to kick in if all arguments to the function satisfy their nullability preconditions. This makes it necessary to emit some null checks in the function body itself. Testing: check-clang and check-ubsan. I also built some Apple ObjC frameworks with an asserts-enabled compiler, and verified that we get valid reports. Differential Revision: https://reviews.llvm.org/D30762 llvm-svn: 297700
* [clang-format] Add more examples and fix a bug in the py generation scriptSylvestre Ledru2017-03-132-1/+292
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30860 llvm-svn: 297623
* [clang-format] Add option to break before inheritance separation operator in ↵Andi-Bogdan Postelnicu2017-03-101-0/+4
| | | | | | | | class declaration. Differential Revision: https://reviews.llvm.org/D30487 llvm-svn: 297467
* Remove a useless subsitution in doxygen2rst which was incorrectly replacing ↵Sylvestre Ledru2017-03-092-6/+5
| | | | | | | | | | | | | | | | * by \* Summary: For example, "int\* a;" is displayed instead of "int* a;" Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D30740 llvm-svn: 297363
* [analyzer] Improve usability of ExprInspectionCheckerAnna Zaks2017-03-091-1/+7
| | | | | | | | | | | | | | | | Some of the magic functions take arguments of arbitrary type. However, for semantic correctness, the compiler still requires a declaration of these functions with the correct type. Since C does not have argument-type-overloaded function, this made those functions hard to use in C code. Improve this situation by allowing arbitrary suffixes in the affected magic functions' names, thus allowing the user to create different declarations for different types. A patch by Keno Fischer! Differential Revision: https://reviews.llvm.org/D30589 llvm-svn: 297325
* Add more examples to clang-format configurationSylvestre Ledru2017-03-081-1/+104
| | | | | | | | | | | | Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30734 llvm-svn: 297275
* Add examples to clang-format configurationSylvestre Ledru2017-03-061-0/+93
| | | | | | | | | | | | Reviewers: klimek, djasper Reviewed By: djasper Subscribers: krasimir, kimgr, cfe-commits Differential Revision: https://reviews.llvm.org/D30532 llvm-svn: 297025
* [clang-format] Add a new flag FixNamespaceComments to FormatStyleKrasimir Georgiev2017-03-011-1/+14
| | | | | | | | | | | | | | | | Summary: This patch enables namespace end comments under a new flag FixNamespaceComments, which is enabled for the LLVM and Google styles. Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D30405 llvm-svn: 296632
* UBSan docs: Explicitly mention that `-fsanitize=unsigned-integer-overflow` ↵Nico Weber2017-02-271-1/+3
| | | | | | | | does not catch UB. https://reviews.llvm.org/D27455 llvm-svn: 296387
* Add clazy to external Clang examples pageKevin Funk2017-02-241-0/+5
| | | | | | | | | | Reviewers: silvas, rizsotto.mailinglist, sergio.martins Reviewed By: rizsotto.mailinglist Differential Revision: https://reviews.llvm.org/D30252 llvm-svn: 296098
* Update Bugzilla URLs in docsIsmail Donmez2017-02-171-3/+3
| | | | llvm-svn: 295433
OpenPOWER on IntegriCloud