aboutsummaryrefslogtreecommitdiff
path: root/clang/docs
AgeCommit message (Collapse)AuthorFilesLines
2017-07-07Update Cross-DSO CFI documentation.Evgeniy Stepanov1-14/+28
Reviewers: pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35094 llvm-svn: 307341
2017-07-05Add docs for -foptimization-record-file=Brian Gesiak1-0/+13
Summary: The Clang option was previously not included in the User's Manual. Reviewers: anemet, davidxl, hfinkel Reviewed By: hfinkel Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D34928 llvm-svn: 307193
2017-07-03[clang] Implement -Wcast-qual for C++Roman Lebedev1-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: mclow.lists, cfe-commits, alexfh, rnk Differential Revision: https://reviews.llvm.org/D33102 llvm-svn: 307045
2017-07-01Add an option group for deprecated warnings. Add the removedJoerg Sonnenberger1-0/+10
-fslp-vectorize-aggressive and -fno-slp-vectorize-aggressive flags back under this group and test for the warning. Document the future removal in the ReleaseNotes. Differential Revision: https://reviews.llvm.org/D34926 llvm-svn: 306965
2017-07-01Un-revert "[Driver] Add -fdiagnostics-hotness-threshold"Brian Gesiak1-7/+33
Summary: Un-revert https://reviews.llvm.org/D34868, but with a slight tweak to the documentation to fix an error -- I had used the wrong syntax for a link. llvm-svn: 306948
2017-07-01Revert "[Driver] Add -fdiagnostics-hotness-threshold"Brian Gesiak1-33/+7
Summary: The commit caused a documentation breakage. llvm-svn: 306946
2017-07-01[Driver] Add -fdiagnostics-hotness-thresholdBrian Gesiak1-7/+33
Summary: Depends on https://reviews.llvm.org/D34867. Add a Clang frontend option to enable optimization remark hotness thresholds, which were added to LLVM in https://reviews.llvm.org/D34867. This prevents diagnostics that do not meet a minimum hotness threshold from being output. When generating optimization remarks for large codebases with a ton of cold code paths, this option can be used to limit the optimization remark output at a reasonable size. Discussion of this change can be read here: http://lists.llvm.org/pipermail/llvm-dev/2017-June/114377.html Reviewers: anemet, davidxl, hfinkel Reviewed By: anemet Subscribers: fhahn, cfe-commits Differential Revision: https://reviews.llvm.org/D34868 llvm-svn: 306945
2017-06-26clang-format - Also reference the list of style option of clang-format in ↵Sylvestre Ledru1-1/+3
Libformat llvm-svn: 306266
2017-06-26Fix a typoSylvestre Ledru1-1/+1
llvm-svn: 306261
2017-06-23Add a ThinLTO cache policy for controlling the maximum cache size in bytes.Peter Collingbourne1-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
2017-06-23docs: Add documentation for the ThinLTO cache pruning policy string.Peter Collingbourne1-0/+32
Differential Revision: https://reviews.llvm.org/D34546 llvm-svn: 306125
2017-06-23[clang-format] Add a SortUsingDeclaration option and enable it by defaultKrasimir Georgiev1-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
2017-06-23[clang-format] Update dump_format_style.py to indent nested fieldsKrasimir Georgiev2-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
2017-06-23[clang-format] Update style documentation, NFCKrasimir Georgiev1-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
2017-06-19[docs] Coverage: Improve the wording a bitVedant Kumar1-3/+3
llvm-svn: 305745
2017-06-19[docs] Coverage: document issue with the BFD linkerVedant Kumar1-0/+5
llvm-svn: 305743
2017-06-19Typo fix: appropo -> apropos. NFC.Aaron Ballman1-4/+4
llvm-svn: 305738
2017-06-19clang-format: Add capability to format the diff on save in vim.Daniel Jasper1-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
2017-06-16[ubsan] docs: Add a note about pointers to volatileVedant Kumar1-0/+6
llvm-svn: 305568
2017-06-15Correct documentation about the AfterClass clang-format optionEric Fiselier1-5/+5
llvm-svn: 305450
2017-06-13[docs] Add some ubsan changes to the release notesVedant Kumar1-0/+25
llvm-svn: 305269
2017-06-10Revert "[clang] Implement -Wcast-qual for C++"Roman Lebedev1-3/+0
Breaks -Werror builders. llvm-svn: 305148
2017-06-10[clang] Implement -Wcast-qual for C++Roman Lebedev1-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
2017-06-08[ASTMatchers] Add clang-query support for equals matcherPeter Wu1-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
2017-06-06Fix a mistake in the clang format documentation (BreakBeforeTernaryOperators)Sylvestre Ledru1-1/+1
Patch sent through github by Jason Hsu llvm-svn: 304776
2017-06-05Add support for #pragma clang sectionJaved Absar1-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
2017-06-02Support lazy stat'ing of files referenced by module maps.Richard Smith1-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
2017-06-01[ubsan] Add a check for pointer overflow UBVedant Kumar1-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
2017-06-01docs: Document LLD's cache dir argument.Peter Collingbourne1-0/+2
llvm-svn: 304385
2017-05-30[modules] Minor documentation clarification for behavior of ↵Richard Smith1-1/+1
requires-declaration. llvm-svn: 304253
2017-05-28[coroutines] Support "coroutines" feature in module map requires clauseEric Fiselier1-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
2017-05-27Revert "[coroutines] Support "coroutines" feature in module map requires clause"Eric Fiselier1-3/+0
This reverts commit r304054. llvm-svn: 304057
2017-05-27[coroutines] Support "coroutines" feature in module map requires clauseEric Fiselier1-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
2017-05-09docs: Fix Sphinx detection with out-of-tree buildsTom Stellard1-1/+1
Adapt to changes made in r302499. llvm-svn: 302500
2017-05-08[clang-format] Convert AlignEscapedNewlinesLeft to an enum, addingDaniel Jasper1-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
2017-05-08Correct the attribute spelling for guarded_var and pt_guarded_var.Aaron Ballman1-2/+2
Patch by Roman Lebedev. llvm-svn: 302419
2017-05-06Update LanguageExtensions doc to refer to C++14 instead of C++1yEric Fiselier1-16/+16
llvm-svn: 302364
2017-05-05[sanitizer-coverage] implement -fsanitize-coverage=no-prune,... instead of a ↵Kostya Serebryany1-2/+3
hidden -mllvm flag. clang part. llvm-svn: 302320
2017-05-05Add cxxStdInitializerListExpr AST matcherJakub Kuderski1-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
2017-05-05Do not redefine the THREAD_ANNOTATION_ATTRIBUTE__ macro in the documentation.Aaron Ballman1-2/+0
Patch by Roman Lebedev. llvm-svn: 302275
2017-05-02Revert "[docs] UBSan: Mention that print_stacktrace=1 is unsupported on Darwin"Vedant Kumar1-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
2017-05-02[sanitizer-coverage] update the SanitizerCoverage docs to reflect the ↵Kostya Serebryany1-233/+167
current state llvm-svn: 301888
2017-05-01[sanitizer-coverage] add a deprecation note to coverage_direct=1Kostya Serebryany1-0/+2
llvm-svn: 301824
2017-04-24[Docs] Correct the path to the clang-format-diff.py script to include the ↵Craig Topper1-2/+3
clang-format directory. llvm-svn: 301202
2017-04-20PR19260: Teach doxygen to spell correctly the include paths.Vassil Vassilev1-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
2017-04-19[sanitizer-coverage] trim down the docsKostya Serebryany1-170/+0
llvm-svn: 300776
2017-04-19[sanitizer-coverage] deprecate some of the stale coverage variantsKostya Serebryany1-23/+1
llvm-svn: 300738
2017-04-18Add #pragma clang attributeAlex Lorenz1-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
2017-04-18Revert r300539 - Add #pragma clang attributeAlex Lorenz1-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
2017-04-18Add #pragma clang attributeAlex Lorenz1-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