summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/docs
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-tidy] Extend misc-use-after-move to support unique_ptr and shared_ptr.Martin Bohme2016-11-021-4/+10
| | | | | | | | | | | | | | Summary: As a unique_ptr or shared_ptr that has been moved from is guaranteed to be null, we only warn if the pointer is dereferenced. Reviewers: hokein, alexfh, aaron.ballman Subscribers: Prazek, cfe-commits Differential Revision: https://reviews.llvm.org/D26041 llvm-svn: 285842
* Add a new clang-tidy check for cert-msc50-cpp (and cert-msc30-c) that ↵Aaron Ballman2016-11-023-0/+15
| | | | | | | | corresponds to the CERT C++ secure coding rule: https://www.securecoding.cert.org/confluence/display/cplusplus/MSC50-CPP.+Do+not+use+std%3A%3Arand%28%29+for+generating+pseudorandom+numbers Patch by Benedek Kiss llvm-svn: 285809
* [Documentation] Clang-tidy readability-redundant-declaration consistency.Eugene Zelenko2016-11-022-9/+11
| | | | | | Release notes checks order and consistent Clang-tidy readability-redundant-declaration description. llvm-svn: 285778
* [clang-tidy] Add check readability-redundant-declarationDaniel Marjamaki2016-11-013-0/+33
| | | | | | | | | | | Finds redundant variable and function declarations. extern int X; extern int X; // <- redundant Differential Revision: https://reviews.llvm.org/D24656 llvm-svn: 285689
* [clang-tidy] Update cert-err58-cpp to match its new generalised form.Malcolm Parsons2016-10-311-3/+3
| | | | | | | | | | | | | | Summary: Aaron modified cert-err58-cpp to include all exceptions thrown before main() Update the check to match. Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25925 llvm-svn: 285653
* [Release notes] Highlight reset() as language/library artifact.Eugene Zelenko2016-10-311-1/+1
| | | | llvm-svn: 285645
* [clang-tidy] Enhance modernize-make-unique to handle unique_ptr.reset()Malcolm Parsons2016-10-313-0/+28
| | | | | | | | | | | | | | | Summary: Avoid naked new in unique_ptr.reset() by using make_unique Fixes http://llvm.org/PR27383 Reviewers: alexfh, aaron.ballman Subscribers: Prazek, cfe-commits Differential Revision: https://reviews.llvm.org/D25898 llvm-svn: 285589
* Fix link to checkMalcolm Parsons2016-10-311-1/+1
| | | | llvm-svn: 285581
* [clang-tidy] Enhance modernize-use-auto to castsMalcolm Parsons2016-10-312-1/+27
| | | | | | | | | | | | | | | | | | | | Summary: Extend modernize-use-auto to cases when a variable is assigned with a cast. e.g. Type *Ptr1 = dynamic_cast<Type*>(Ptr2); http://llvm.org/PR25499 Reviewers: angelgarcia, aaron.ballman, klimek, Prazek, alexfh Subscribers: Prazek, Eugene.Zelenko, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D25316 llvm-svn: 285579
* [Release notes] Mention removed Clang-tidy ↵Eugene Zelenko2016-10-211-0/+2
| | | | | | misc-pointer-and-integral-operation check llvm-svn: 284894
* Remove 'misc-pointer-and-integral-operation' clang-tidy check. The only casesRichard Smith2016-10-212-25/+0
| | | | | | | it detects are ill-formed (some per C++ core issue 1512, others always have been). llvm-svn: 284888
* [clang-tidy] Add check 'readability-redundant-member-init'Malcolm Parsons2016-10-203-0/+27
| | | | | | | | | | | | Summary: The check emits a warning if a member-initializer calls the member's default constructor with no arguments. Reviewers: sbenza, alexfh, aaron.ballman Subscribers: modocache, mgorny, Eugene.Zelenko, etienneb, Prazek, hokein, cfe-commits, beanz Differential Revision: https://reviews.llvm.org/D24339 llvm-svn: 284742
* [clang-tidy] Add cert-err09-cpp check alias.Marek Kurdej2016-10-193-0/+12
| | | | | | | | | | | | Summary: This adds cert-err09-cpp alias for completeness, similar to cert-err61-cpp. Reviewers: alexfh, hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25770 llvm-svn: 284596
* Fix typo in documentationMalcolm Parsons2016-10-111-1/+1
| | | | llvm-svn: 283865
* [clang-tidy] Add a whitelist option in google-runtime-references.Haojian Wu2016-10-101-0/+8
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D25244 llvm-svn: 283777
* Overhaul clang-include-fixer.elHaojian Wu2016-10-051-17/+10
| | | | | | | | | | | | | | | | | | | | | | | | General overhaul to fix many coding bugs, simplify the code, and improve readability. * Clarify documentation strings of user options. * Say that clang-include-fixer-executable is a file to have auto completion. * Allow user to select available options for clang-include-fixer-input-format. Turn it into a symbol as it's not a free-form string. * Remove clang-include-fixer-query-mode. This option was apparently used to select between two different operation modes, which is not a typical use case for user options. Provide two separate commands instead. * Add a face for the overlay highlighting so that users can customize it. Move user commands to the front so that readers of the code aren't buried in internal functions. * Make process calls asynchronous. This is possible here because clang-include-fixer doesn't change files in place. This means input is no longer blocked while clang-include-fixer is running. * Factor out logic in helper functions to keep functions short. * Add comments where appropriate. * Provide an alternative buffer replacement strategy for the case that a single line was inserted (the normal case in the case of clang-include-fixer). This keeps point, markers, and other buffer information intact. * Use let-alist and association lists instead of property lists to shorten the code. * Instead of highlighting only the first occurrence of a symbol, highlight all occurrences and move point to the closest one. * Detect qualified names at point. * Use filepos-to-bufferpos if available. * Formatting. Patch by Philipp Stephani! llvm-svn: 283306
* [include-fixer] Add customized editor settings documents.Haojian Wu2016-09-271-2/+42
| | | | | | | | | | Reviewers: bkramer Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D24719 llvm-svn: 282480
* [clang-tidy] Add doc for `explain-config` option.Haojian Wu2016-09-221-0/+4
| | | | llvm-svn: 282158
* [clang-rename] Merge rename-{at|all} & optimise.Kirill Bobyrev2016-09-161-67/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | Having both rename-at and rename-all both seems confusing and introduces unneeded difficulties. After merging rename-at and rename-all maintaining main function wrappers and custom help becomes redundant while CLI becomes less confusing. D24224 (which was the original patch causing buildbot failures) wasn't aware of bugs caused by passing both -offset and -qualified-name. After D24224 was landed it caused buildbot failures and therefor I just reverted it. Two things that make this patch different from D24224 are: * unittests/clang-rename was deleted, because it is unmaintained and doesn't do much. * Passing both `-offset` and `-qualified-name` isn't allowed anymore for the sake of preventing bugs. This patch is a trivial enhancement of accepted D24224 revision. Tested with `ninja check-all`. Differential Revision: https://reviews.llvm.org/D24567 llvm-svn: 281710
* [Release notes] Mention readability-container-size-empty improvements.Eugene Zelenko2016-09-141-0/+5
| | | | | | Differential revision: https://reviews.llvm.org/D24526 llvm-svn: 281510
* reverting r281456Kirill Bobyrev2016-09-141-23/+71
| | | | llvm-svn: 281459
* [clang-rename] Merge rename-{at|all} & optimize.Kirill Bobyrev2016-09-141-71/+23
| | | | | | | | | | | | | | Having both rename-at and rename-all both seems confusing and introduces unneeded difficulties. Allowing to use both -qualified-name and -offset at once while performing efficient renamings seems like a feature, too. Maintaining main function wrappers and custom help becomes redundant while CLI becomes less confusing. Reviewers: alexfh Differential Revision: https://reviews.llvm.org/D24224 llvm-svn: 281456
* [clang-tidy] Add check 'misc-use-after-move'Martin Bohme2016-09-143-0/+204
| | | | | | | | | | | | | | | | Summary: The check warns if an object is used after it has been moved, without an intervening reinitialization. See user-facing documentation for details. Reviewers: sbenza, Prazek, alexfh Subscribers: beanz, mgorny, shadeware, omtcyfz, Eugene.Zelenko, Prazek, fowles, ioeric, cfe-commits Differential Revision: https://reviews.llvm.org/D23353 llvm-svn: 281453
* [clang-tidy] Extend readability-container-size-empty to arbitrary class with ↵Kirill Bobyrev2016-09-131-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | size() and empty() This patch extends readability-container-size-empty check allowing it to produce warnings not only for STL containers, but also for containers, which provide two functions matching following signatures: * `size_type size() const;` * `bool empty() const;` Where `size_type` can be any kind of integer type. This functionality was proposed in https://llvm.org/bugs/show_bug.cgi?id=26823 by Eugene Zelenko. Approval: alexfh Reviewers: alexfh, aaron.ballman, Eugene.Zelenko Subscribers: etienneb, Prazek, hokein, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D24349 llvm-svn: 281307
* [clang-tidy] readability-misplaced-array-index: add new check that warns ↵Daniel Marjamaki2016-09-123-0/+33
| | | | | | | | | | when array index is misplaced. Reviewers: alexfh Differential Revision: https://reviews.llvm.org/D21134 llvm-svn: 281206
* [Release notes] Fix links.Eugene Zelenko2016-09-061-6/+6
| | | | | | Differential revision: https://reviews.llvm.org/D24201 llvm-svn: 280725
* Remove link to clang's release notes; keeping it up-to-date is hardHans Wennborg2016-09-021-3/+1
| | | | llvm-svn: 280539
* [clang-tidy docs] Add missing option docs.Haojian Wu2016-08-3119-12/+217
| | | | | | | | | | Reviewers: alexfh, Eugene.Zelenko, aaron.ballman Subscribers: aaron.ballman, cfe-commits Differential Revision: https://reviews.llvm.org/D23918 llvm-svn: 280236
* [docs] Fix docs build error.Haojian Wu2016-08-311-0/+1
| | | | llvm-svn: 280235
* [clang-tidy] modernize-make-{smart_ptr} private ctor bugfixPiotr Padlewski2016-08-311-0/+8
| | | | | | | | | | | | | | | Summary: Bugfix for 27321. When the constructor of stored pointer type is private then it is invalid to change it to make_shared or make_unique. Reviewers: alexfh, aaron.ballman, hokein Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D23343 llvm-svn: 280180
* [Release notes] Fix highlighting.Eugene Zelenko2016-08-301-2/+2
| | | | llvm-svn: 280119
* [clang-tidy docs] Fix build errors on Sphinx 1.4.6Haojian Wu2016-08-302-4/+4
| | | | llvm-svn: 280095
* [clang-tidy] Add check 'misc-move-forwarding-reference'Martin Bohme2016-08-303-0/+67
| | | | | | | | | | | | | | | | | | | | | | | Summary: The check emits a warning if std::move() is applied to a forwarding reference, i.e. an rvalue reference of a function template argument type. If a developer is unaware of the special rules for template argument deduction on forwarding references, it will seem reasonable to apply std::move() to the forwarding reference, in the same way that this would be done for a "normal" rvalue reference. This has a consequence that is usually unwanted and possibly surprising: If the function that takes the forwarding reference as its parameter is called with an lvalue, that lvalue will be moved from (and hence placed into an indeterminate state) even though no std::move() was applied to the lvalue at the callsite. As a fix, the check will suggest replacing the std::move() with a std::forward(). This patch requires D23004 to be submitted before it. Reviewers: sbenza, aaron.ballman Subscribers: klimek, etienneb, alexfh, aaron.ballman, Prazek, Eugene.Zelenko, mgehre, cfe-commits Projects: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D22220 llvm-svn: 280077
* Fix some typos in the docSylvestre Ledru2016-08-283-5/+5
| | | | llvm-svn: 279944
* [Clang-tidy] Fix some checks documentation style.Eugene Zelenko2016-08-2630-179/+193
| | | | | | Differential revision: https://reviews.llvm.org/D23894 llvm-svn: 279846
* [clang-tidy] Some tweaks on header guard checks.Haojian Wu2016-08-261-1/+4
| | | | | | | | * Implement missing storeOption interfaces. * Remove unnecessary parameter copy in isHeaderFileExtension. * Fix doc style. llvm-svn: 279814
* [clang-tidy] Added hh, hxx and hpp to header guard checks.Mads Ravn2016-08-261-1/+8
| | | | | | | | Changed the extension check to include the option of ",h,hh,hpp,hxx" instead of just returning whether the file ended with ".h". Differential revision: https://reviews.llvm.org/D20512 llvm-svn: 279803
* Clang-tidy documentation style. Two Google checks are aliases.Eugene Zelenko2016-08-248-36/+29
| | | | | | Differential revision: https://reviews.llvm.org/D23815 llvm-svn: 279659
* [Documentation] Fix style of Clang-tidy readability-non-const-parameter.Eugene Zelenko2016-08-231-7/+9
| | | | llvm-svn: 279541
* [clang-tidy] readability-non-const-parameter: add new check that warns when ↵Daniel Marjamaki2016-08-233-0/+51
| | | | | | | | | | | | | | function parameters should be const The check will warn when the constness will make the function interface safer. Reviewers: alexfh Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D15332 llvm-svn: 279507
* Fix style in some Clang-tidy checks documentation.Eugene Zelenko2016-08-237-42/+70
| | | | | | Differential revision: https://reviews.llvm.org/D23728 llvm-svn: 279494
* [clang-tidy docs] Further cleanup of optionsAlexander Kornienko2016-08-225-28/+41
| | | | llvm-svn: 279442
* [Documentation] Fixed style in modernize-use-emplace.rst.Eugene Zelenko2016-08-181-4/+3
| | | | llvm-svn: 279170
* [clang-tidy docs] Move option descriptions to the Options sectionAlexander Kornienko2016-08-183-22/+37
| | | | | | + random fixes llvm-svn: 279115
* [clang-tidy docs] Minor fixAlexander Kornienko2016-08-181-1/+1
| | | | llvm-svn: 279051
* [clang-tidy docs] Fix formatting.Alexander Kornienko2016-08-181-0/+1
| | | | llvm-svn: 279050
* [clang-tidy docs] Fix build errors on Sphinx 1.4.5Alexander Kornienko2016-08-188-48/+86
| | | | llvm-svn: 279049
* [Release notes] Mention Emacs integration in Include-fixer.Eugene Zelenko2016-08-171-1/+1
| | | | llvm-svn: 279009
* [Documentation] Remove duplicated checks groups descriptions from ↵Eugene Zelenko2016-08-171-23/+9
| | | | | | | | clang-tidy/index.rst. Differential revision: https://reviews.llvm.org/D23596 llvm-svn: 279006
* [Documentation] Improve checks groups descriptions in clang-tidy/index.rstEugene Zelenko2016-08-151-18/+17
| | | | | | | | Use table to avoid tautology. List all existing checks groups. Use alphabetical order. Differential revision: https://reviews.llvm.org/D23471 llvm-svn: 278686
OpenPOWER on IntegriCloud