summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/docs/clang-tidy
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-tidy] Check for forwarding reference overload in constructors.Gabor Horvath2017-04-062-0/+50
| | | | | | | | Patch by András Leitereg! Differential Revision: https://reviews.llvm.org/D30547 llvm-svn: 299638
* [clang-tidy] Correct code-block in the doc.Haojian Wu2017-03-311-1/+1
| | | | llvm-svn: 299190
* [clang-tidy] fix docs in hicpp checksJonathan Coe2017-03-302-1/+13
| | | | | | Fix for sphinx-doc warnings in r299068. llvm-svn: 299071
* [clang-tidy] add aliases for hicpp moduleJonathan Coe2017-03-3012-0/+119
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Add some hicpp checks that can be implmented as alises for existing clang-tidy checks: hicpp-explicit-conversions hicpp-function-size hicpp-named-parameter hicpp-invalid-access-moved hicpp-member-init hicpp-new-delete-operators hicpp-noexcept-move hicpp-special-member-functions hicpp-undelegated-constructor hicpp-use-equals-default hicpp-use-equals-delete hicpp-use-override Reviewers: dberlin, jbcoe, aaron.ballman, alexfh Reviewed By: aaron.ballman Subscribers: JDevlieghere Differential Revision: https://reviews.llvm.org/D30383 Patch By: Jonas Toth llvm-svn: 299068
* Rename the clang-tidy safety module to be hicpp, for the High-Integrity C++ ↵Aaron Ballman2017-03-193-11/+11
| | | | | | | | coding standard from PRQA. This commit renames all of the safety functionality to be hicpp, adds an appropriate LICENSE.TXT, and updates the documentation accordingly. llvm-svn: 298229
* Add the 'AllowSoleDefaultDtor' and 'AllowMissingMoveFunctions' options to ↵Aaron Ballman2017-03-131-0/+28
| | | | | | | | the cppcoreguidelines-special-member-functions check. Patch by Florian Gross. llvm-svn: 297671
* [clang-tidy] Update the doc according to r297311.Haojian Wu2017-03-091-1/+1
| | | | llvm-svn: 297367
* Replaced UserNullMacros with NullMacros in modernize-use-nullptr check docsSylvestre Ledru2017-03-041-2/+2
| | | | | | | By patch Peter Goldsborough on https://github.com/llvm-mirror/clang-tools-extra/pull/14 See https://github.com/llvm-mirror/clang-tools-extra/blob/2cd835ee5bcd6c4944d7e30826668ec38db40b38/clang-tidy/modernize/UseNullptrCheck.cpp#L466 llvm-svn: 296970
* [clang-tidy] Yet another docs fixesPiotr Padlewski2017-03-031-6/+7
| | | | llvm-svn: 296888
* [clang-tidy] Fix modernize-use-emplace docsPiotr Padlewski2017-03-031-1/+1
| | | | llvm-svn: 296867
* [clang-tidy] Format code around applied fixesAlexander Kornienko2017-03-031-2/+18
| | | | | | | | | | | | | | | | Summary: Add -format option (disabled by default for now) to trigger formatting of replacements. Reviewers: ioeric Reviewed By: ioeric Subscribers: kimgr, malcolm.parsons, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D30564 llvm-svn: 296864
* [clang-tidy] Function names configurable for cppcoreguidelines-nomalloc - ↵Alexander Kornienko2017-03-021-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | checker Summary: Hello everybody, this is an incremental patch for the NoMalloc-Checker I wrote. It allows to configure the memory-management functions, that are checked, This might be helpful for a code base with custom functions in use, or non-standard functionality, like posix_memalign. Reviewers: aaron.ballman, hokein, alexfh Reviewed By: aaron.ballman, alexfh Subscribers: sbenza, nemanjai, JDevlieghere Tags: #clang-tools-extra Patch by Jonas Toth! Differential Revision: https://reviews.llvm.org/D28239 llvm-svn: 296734
* [clang-tidy] Add parametercount for readibility-function-sizeAlexander Kornienko2017-03-011-0/+5
| | | | | | | | | | | | | | | | | | | Summary: Add an option to function-size to warn about high parameter counts. This might be relevant for cppcoreguidelines and the safety module as well. Since the safety module is not landed in master already, i did not create an alias, but that can be done later as well. Reviewers: sbenza, alexfh, hokein Reviewed By: alexfh, hokein Subscribers: JDevlieghere Patch by Jonas Toth! Differential Revision: https://reviews.llvm.org/D29561 llvm-svn: 296599
* Misspelled checker description (argument comment)Alexander Kornienko2017-02-281-2/+3
| | | | | | | | | | | | | | | | Reviewers: alexfh Reviewed By: alexfh Subscribers: Eugene.Zelenko Tags: #clang-tools-extra Patch by Peter Szecsi! Differential Revision: https://reviews.llvm.org/D24137 llvm-svn: 296472
* [Docs] 'Limitations' should be a subsectionAlex Lorenz2017-02-171-1/+1
| | | | | | | | The 'Limitations' section in thedocumentation for readability-misleading-indentation should be a subsection, as otherwise the link to 'Limitations' isn't indented in the 'Clang-Tidy Checks' documentation page. llvm-svn: 295471
* [clang-tidy] Add cert-dcl58-cpp (do not modify the 'std' namespace) check.Gabor Horvath2017-02-172-0/+22
| | | | | | Differential Revision: https://reviews.llvm.org/D23421 llvm-svn: 295435
* [clang-tidy] Add check 'modernize-return-braced-init-list'Jonas Devlieghere2017-02-152-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Replaces explicit calls to the constructor in a return with a braced initializer list. This way the return type is not needlessly duplicated in the return type and the return statement. ``` Foo bar() { Baz baz; return Foo(baz); } // transforms to: Foo bar() { Baz baz; return {baz}; } ``` Reviewers: hokein, Prazek, aaron.ballman, alexfh Reviewed By: Prazek, aaron.ballman, alexfh Subscribers: malcolm.parsons, mgorny, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D28768 llvm-svn: 295199
* [clang-tidy] Add readability-misleading-indentation check.Gabor Horvath2017-02-142-0/+39
| | | | | | Differential Revision: https://reviews.llvm.org/D19586 llvm-svn: 295041
* Adds the commandline need to run clang-tidy tests.David L. Jones2017-02-101-0/+6
| | | | | | | | Patch by Jorge Gorbe (lethalantidote) Differential Revision: https://reviews.llvm.org/D29737 llvm-svn: 294689
* [clang-tidy] safety-no-assemblerJonathan Coe2017-02-062-0/+11
| | | | | | | | | | | | | | | | | | | Summary: Add a new clang-tidy module for safety-critical checks. Include a check for inline assembler. Reviewers: Prazek, dtarditi, malcolm.parsons, alexfh, aaron.ballman, idlecode Reviewed By: idlecode Subscribers: idlecode, JonasToth, Eugene.Zelenko, mgorny, JDevlieghere, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D29267 llvm-svn: 294255
* Revert "Implement a new clang-tidy check that suggests users replace dynamic ↵Diana Picus2017-01-272-89/+0
| | | | | | | | | exception specifications with noexcept exception specifications." This reverts commit r293217, its follow-up 293218 and part of 293234 because it broke all bots that build clang-tools-extra. llvm-svn: 293267
* [Clang-tidy documentation] Consistency (fix-it); 80 characters per line.Eugene Zelenko2017-01-264-16/+14
| | | | llvm-svn: 293234
* Implement a new clang-tidy check that suggests users replace dynamic ↵Aaron Ballman2017-01-262-0/+91
| | | | | | | | exception specifications with noexcept exception specifications. Patch by Don Hinton. llvm-svn: 293217
* Extend documentation of how to test clang-tidy checks.James Dennett2017-01-021-1/+20
| | | | | | | | | | | | | | | Summary: The documentation assumed expertise with FileCheck; many clang-tidy check authors may not have significant exposure to FileCheck, and so it's worth spending a few more words here to spell things out. Reviewers: alexfh Subscribers: cfe-commits, JDevlieghere Differential Revision: https://reviews.llvm.org/D28189 llvm-svn: 290838
* [clang-tidy] Add delete null pointer check.Gabor Horvath2016-12-312-0/+14
| | | | | | | | | | This check detects and fixes redundant null checks before deletes. Patch by: Gergely Angeli! Differential Revision: https://reviews.llvm.org/D21298 llvm-svn: 290784
* [clang-tidy] Add check 'misc-string-compare'.Mads Ravn2016-12-302-0/+55
| | | | | | | | | | | | | | | | | | | I have a created a new check for clang tidy: misc-string-compare. This will check for incorrect usage of std::string::compare when used to check equality or inequality of string instead of the string equality or inequality operators. Example: ``` std::string str1, str2; if (str1.compare(str2)) { } ``` Reviewers: hokein, aaron.ballman, alexfh, malcolm.parsons Subscribers: xazax.hun, Eugene.Zelenko, cfe-commits, malcolm.parsons, Prazek, mgorny, JDevlieghere Differential Revision: https://reviews.llvm.org/D27210 llvm-svn: 290747
* [clang-tidy] Replace dead link in modernize-pass-by-value docMalcolm Parsons2016-12-271-1/+1
| | | | llvm-svn: 290630
* [clang-tidy] Add enum misuse check.Gabor Horvath2016-12-272-0/+79
| | | | | | | | | | | The checker detects various cases when an enum is probably misused (as a bitmask). Patch by: Peter Szecsi! Differential Revision: https://reviews.llvm.org/D22507 llvm-svn: 290600
* [clang-tidy] Flag implicit conversion operators.Alexander Kornienko2016-12-231-1/+48
| | | | llvm-svn: 290434
* [clang-tidy] Add modernize-use-default-member-init checkMalcolm Parsons2016-12-202-0/+50
| | | | | | | | | | | | Summary: Fixes PR18858 Reviewers: alexfh, hokein, aaron.ballman Subscribers: JDevlieghere, Eugene.Zelenko, Prazek, mgorny, cfe-commits, modocache Differential Revision: https://reviews.llvm.org/D26750 llvm-svn: 290202
* [clang-tidy] Remove duplicated check from move-constructor-initMalcolm Parsons2016-12-172-10/+5
| | | | | | | | | | | | | | | | | | | | Summary: An addition to the move-constructor-init check was duplicating the modernize-pass-by-value check. Remove the additional check and UseCERTSemantics option. Run the move-constructor-init test with both checks enabled. Fix modernize-pass-by-value false-positive when initializing a base class. Add option to modernize-pass-by-value to only warn about parameters that are already values. Reviewers: alexfh, flx, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26453 llvm-svn: 290051
* [clang-tidy] Enhance modernize-use-auto to templated function castsMalcolm Parsons2016-12-151-4/+5
| | | | | | | | | | | | | | | | Summary: Use auto when declaring variables that are initialized by calling a templated function that returns its explicit first argument. Fixes PR26763. Reviewers: aaron.ballman, alexfh, staronj, Prazek Subscribers: Eugene.Zelenko, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D27166 llvm-svn: 289797
* [ClangTidy] Add new performance-type-promotion-in-math-fn check.Justin Lebar2016-12-142-0/+12
| | | | | | | | | | | | | Summary: This checks for calls to double-precision math.h with single-precision arguments. For example, it suggests replacing ::sin(0.f) with ::sinf(0.f). Subscribers: mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D27284 llvm-svn: 289627
* Fix sphinx build.Alexander Kornienko2016-12-131-1/+1
| | | | llvm-svn: 289549
* Remove trailing whitespace in docs and clang-tidy sources.Alexander Kornienko2016-12-136-25/+25
| | | | llvm-svn: 289547
* [Clang-tidy] check for malloc, realloc and free callsAlexander Kornienko2016-12-132-0/+28
| | | | | | | | | | | | | | | | | | | | | | | Summary: This checker flags the use of C-style memory management functionality and notes about modern alternatives. In an earlier revision it tried to autofix some kind of patterns, but that was a bad idea. Since memory management can be so widespread in a program, manual updating is most likely necessary. Maybe for special cases, there could be later additions to this basic checker. This is the first checker I wrote and I never did something with clang (only compiling programs). So whenever I missed conventions or did plain retarded stuff, feel free to point it out! I am willing to fix them and write a better checker. I hope the patch does work, I never did this either. On a testapply in my repository it did, but I am pretty unconfident in my patching skills :) Reviewers: aaron.ballman, hokein, alexfh, malcolm.parsons Subscribers: cfe-commits, JDevlieghere, nemanjai, Eugene.Zelenko, Prazek, mgorny, modocache Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D26167 Patch by Jonas Toth! llvm-svn: 289546
* [clang-tidy] Add check for redundant function pointer dereferencesMalcolm Parsons2016-12-132-0/+25
| | | | | | | | | | Reviewers: alexfh, aaron.ballman, hokein Subscribers: mgorny, JDevlieghere, cfe-commits Differential Revision: https://reviews.llvm.org/D27520 llvm-svn: 289524
* Add a blank line to make sphinx happy.Malcolm Parsons2016-12-011-0/+1
| | | | llvm-svn: 288384
* [clang-tidy] Rename modernize-use-default to modernize-use-equals-defaultMalcolm Parsons2016-12-013-25/+35
| | | | | | | | | | Reviewers: angelgarcia, aaron.ballman, alexfh Subscribers: JDevlieghere, Prazek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D26511 llvm-svn: 288375
* [clang-tidy] Make format style customizableJonas Devlieghere2016-11-301-0/+3
| | | | | | | | | | | | | | Summary: I came across an outstanding FIXME to make the format style customizable. Inspired by the include fixer, I added an new option `-style` to configure the fallback style in case no clang-format configuration file is found. The default remains "llvm". Reviewers: Prazek, aaron.ballman, hokein, alexfh Subscribers: cfe-commits, malcolm.parsons Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D27142 llvm-svn: 288258
* [docs] Remove doubled spacesMalcolm Parsons2016-11-1710-13/+13
| | | | | | | | | | Reviewers: aaron.ballman Subscribers: nemanjai, cfe-commits Differential Revision: https://reviews.llvm.org/D26798 llvm-svn: 287226
* [clang-tidy] New check to prefer transparent functors to non-transparent ones.Gabor Horvath2016-11-162-0/+40
| | | | llvm-svn: 287107
* [clang-tidy] Add modernize-use-equals-delete checkMalcolm Parsons2016-11-103-2/+27
| | | | | | | | | | | | Summary: Fixes PR27872 Reviewers: klimek, hokein, alexfh, aaron.ballman Subscribers: Prazek, Eugene.Zelenko, danielmarjamaki, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D26138 llvm-svn: 286472
* [clang-tidy] Add missing meta refresh for cert-msc30-c doc. NFCMalcolm Parsons2016-11-101-0/+2
| | | | llvm-svn: 286466
* [clang-tidy docs] Minor formatting changes.Alexander Kornienko2016-11-091-12/+13
| | | | llvm-svn: 286404
* [clang-tidy docs] Recommend using add_new_check.py moreAlexander Kornienko2016-11-091-34/+48
| | | | llvm-svn: 286390
* Remove mentions of clang-analyzer-alphaAlexander Kornienko2016-11-081-2/+2
| | | | llvm-svn: 286257
* [clang-tidy] Handle data() in readability-redundant-string-cstrMalcolm Parsons2016-11-031-1/+1
| | | | | | | | | | | | | | | Summary: std::string::data() and std::string::c_str() are equivalent. Enhance the readability-redundant-string-cstr check to also handle calls to data(). Reviewers: etienneb, alexfh, aaron.ballman Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D26279 llvm-svn: 285901
* [Documentation] Fix Clang-tidy misc-use-after-move and cert-msc50-cpp style ↵Eugene Zelenko2016-11-022-4/+9
| | | | | | and misspelling. llvm-svn: 285848
* [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
OpenPOWER on IntegriCloud