summaryrefslogtreecommitdiffstats
path: root/clang/docs
Commit message (Collapse)AuthorAgeFilesLines
* clang-format - Also reference the list of style option of clang-format in ↵Sylvestre Ledru2017-06-261-1/+3
| | | | | | Libformat llvm-svn: 306266
* Fix a typoSylvestre Ledru2017-06-261-1/+1
| | | | llvm-svn: 306261
* Add a ThinLTO cache policy for controlling the maximum cache size in bytes.Peter Collingbourne2017-06-231-0/+12
| | | | | | | | | | | | | | This is useful when an upper limit on the cache size needs to be controlled independently of the amount of the amount of free space. One use case is a machine with a large number of cache directories (e.g. a buildbot slave hosting a large number of independent build jobs). By imposing an upper size limit on each cache directory, users can more easily estimate the server's capacity. Differential Revision: https://reviews.llvm.org/D34547 llvm-svn: 306126
* docs: Add documentation for the ThinLTO cache pruning policy string.Peter Collingbourne2017-06-231-0/+32
| | | | | | Differential Revision: https://reviews.llvm.org/D34546 llvm-svn: 306125
* [clang-format] Add a SortUsingDeclaration option and enable it by defaultKrasimir Georgiev2017-06-231-0/+9
| | | | | | | | | | | | | | | | Summary: This patch adds a `SortUsingDeclaration` style option and enables it for llvm style. Reviewers: klimek Reviewed By: klimek Subscribers: klimek Differential Revision: https://reviews.llvm.org/D34453 llvm-svn: 306094
* [clang-format] Update dump_format_style.py to indent nested fieldsKrasimir Georgiev2017-06-232-107/+108
| | | | | | | | | | | | | | | | | | Summary: This updates the format options documentation script to indent the documentation of nested fields. The previous format caused some problems, as when a bulleted list ends with a multiline comment. See the buildbot failure http://lab.llvm.org:8011/builders/clang-sphinx-docs/builds/10020/steps/docs-clang-html/logs/stdio Reviewers: djasper Reviewed By: djasper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34552 llvm-svn: 306093
* [clang-format] Update style documentation, NFCKrasimir Georgiev2017-06-231-13/+96
| | | | | | | | | | | | Summary: Style documentation is generated automatically by `docs/tools/dump_format_style.py`. This hasn't been ran for a while. Reviewers: djasper Subscribers: cfe-commits, klimek Differential Revision: https://reviews.llvm.org/D34457 llvm-svn: 306089
* [docs] Coverage: Improve the wording a bitVedant Kumar2017-06-191-3/+3
| | | | llvm-svn: 305745
* [docs] Coverage: document issue with the BFD linkerVedant Kumar2017-06-191-0/+5
| | | | llvm-svn: 305743
* Typo fix: appropo -> apropos. NFC.Aaron Ballman2017-06-191-4/+4
| | | | llvm-svn: 305738
* clang-format: Add capability to format the diff on save in vim.Daniel Jasper2017-06-191-0/+12
| | | | | | | | | | | With this patch, one can configure a BufWrite hook that will make the clang-format integration compute a diff of the current buffer with the file that's on disk and format all changed lines. This should create a zero-overhead auto-format solution that doesn't require the file to already be clang-format clean to avoid spurious diffs. Review: https://reviews.llvm.org/D32429 llvm-svn: 305665
* [ubsan] docs: Add a note about pointers to volatileVedant Kumar2017-06-161-0/+6
| | | | llvm-svn: 305568
* Correct documentation about the AfterClass clang-format optionEric Fiselier2017-06-151-5/+5
| | | | llvm-svn: 305450
* [docs] Add some ubsan changes to the release notesVedant Kumar2017-06-131-0/+25
| | | | llvm-svn: 305269
* Revert "[clang] Implement -Wcast-qual for C++"Roman Lebedev2017-06-101-3/+0
| | | | | | Breaks -Werror builders. llvm-svn: 305148
* [clang] Implement -Wcast-qual for C++Roman Lebedev2017-06-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: This way, the behavior of that warning flag more closely resembles that of GCC. Do note that there is at least one false-negative (see FIXME in tests). Fixes PR4802. Testing: ``` ninja check-clang-sema check-clang-semacxx ``` Reviewers: dblaikie, majnemer, rnk Reviewed By: dblaikie, rnk Subscribers: cfe-commits, alexfh, rnk Differential Revision: https://reviews.llvm.org/D33102 llvm-svn: 305147
* [ASTMatchers] Add clang-query support for equals matcherPeter Wu2017-06-081-17/+85
| | | | | | | | | | | | | Summary: This allows the clang-query tool to use matchers like "integerLiteral(equals(32))". For this to work, an overloaded function is added for each possible parameter type. Reviewed By: aaron.ballman Differential Revision: https://reviews.llvm.org/D33094 llvm-svn: 305022
* Fix a mistake in the clang format documentation (BreakBeforeTernaryOperators)Sylvestre Ledru2017-06-061-1/+1
| | | | | | Patch sent through github by Jason Hsu llvm-svn: 304776
* Add support for #pragma clang sectionJaved Absar2017-06-051-0/+42
| | | | | | | | | | | | | | | This patch provides a means to specify section-names for global variables, functions and static variables, using #pragma directives. This feature is only defined to work sensibly for ELF targets. One can specify section names as: #pragma clang section bss="myBSS" data="myData" rodata="myRodata" text="myText" One can "unspecify" a section name with empty string e.g. #pragma clang section bss="" data="" text="" rodata="" Reviewers: Roger Ferrer, Jonathan Roelofs, Reid Kleckner Differential Revision: https://reviews.llvm.org/D33412 llvm-svn: 304705
* Support lazy stat'ing of files referenced by module maps.Richard Smith2017-06-021-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for a `header` declaration in a module map to specify certain `stat` information (currently, size and mtime) about that header file. This has two purposes: - It removes the need to eagerly `stat` every file referenced by a module map. Instead, we track a list of unresolved header files with each size / mtime (actually, for simplicity, we track submodules with such headers), and when attempting to look up a header file based on a `FileEntry`, we check if there are any unresolved header directives with that `FileEntry`'s size / mtime and perform deferred `stat`s if so. - It permits a preprocessed module to be compiled without the original files being present on disk. The only reason we used to need those files was to get the `stat` information in order to do header -> module lookups when using the module. If we're provided with the `stat` information in the preprocessed module, we can avoid requiring the files to exist. Unlike most `header` directives, if a `header` directive with `stat` information has no corresponding on-disk file the enclosing module is *not* marked unavailable (so that behavior is consistent regardless of whether we've resolved a header directive, and so that preprocessed modules don't get marked unavailable). We could actually do this for all `header` directives: the only reason we mark the module unavailable if headers are missing is to give a diagnostic slightly earlier (rather than waiting until we actually try to build the module / load and validate its .pcm file). Differential Revision: https://reviews.llvm.org/D33703 llvm-svn: 304515
* [ubsan] Add a check for pointer overflow UBVedant Kumar2017-06-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check pointer arithmetic for overflow. For some more background on this check, see: https://wdtz.org/catching-pointer-overflow-bugs.html https://reviews.llvm.org/D20322 Patch by Will Dietz and John Regehr! This version of the patch is different from the original in a few ways: - It introduces the EmitCheckedInBoundsGEP utility which inserts checks when the pointer overflow check is enabled. - It does some constant-folding to reduce instrumentation overhead. - It does not check some GEPs in CGExprCXX. I'm not sure that inserting checks here, or in CGClass, would catch many bugs. Possible future directions for this check: - Introduce CGF.EmitCheckedStructGEP, to detect overflows when accessing structures. Testing: Apart from the added lit test, I ran check-llvm and check-clang with a stage2, ubsan-instrumented clang. Will and John have also done extensive testing on numerous open source projects. Differential Revision: https://reviews.llvm.org/D33305 llvm-svn: 304459
* docs: Document LLD's cache dir argument.Peter Collingbourne2017-06-011-0/+2
| | | | llvm-svn: 304385
* [modules] Minor documentation clarification for behavior of ↵Richard Smith2017-05-301-1/+1
| | | | | | requires-declaration. llvm-svn: 304253
* [coroutines] Support "coroutines" feature in module map requires clauseEric Fiselier2017-05-281-0/+3
| | | | | | | | | | | | | | Summary: In order for libc++ to add `<experimental/coroutine>` to its module map, there has to be a feature that can be used to detect if coroutines support is enabled in Clang. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33538 llvm-svn: 304107
* Revert "[coroutines] Support "coroutines" feature in module map requires clause"Eric Fiselier2017-05-271-3/+0
| | | | | | This reverts commit r304054. llvm-svn: 304057
* [coroutines] Support "coroutines" feature in module map requires clauseEric Fiselier2017-05-271-0/+3
| | | | | | | | | | | | | | Summary: In order for libc++ to add `<experimental/coroutine>` to its module map, there has to be a feature that can be used to detect if coroutines support is enabled in Clang. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D33538 llvm-svn: 304054
* 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
OpenPOWER on IntegriCloud