summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/docs
Commit message (Collapse)AuthorAgeFilesLines
...
* [clang-tidy] New check bugprone-unused-return-valueAlexander Kornienko2018-03-193-0/+30
| | | | | | | | | | | | | | | | | | | | | Summary: Detects function calls where the return value is unused. Checked functions can be configured. Reviewers: alexfh, aaron.ballman, ilya-biryukov, hokein Reviewed By: alexfh, aaron.ballman Subscribers: hintonda, JonasToth, Eugene.Zelenko, mgorny, xazax.hun, cfe-commits Tags: #clang-tools-extra Patch by Kalle Huttunen! Differential Revision: https://reviews.llvm.org/D41655 llvm-svn: 327833
* [clang-tidy] rename_check.py misc-unused-raii bugprone-unused-raii ↵Alexander Kornienko2018-03-153-8/+11
| | | | | | --check_class_name=UnusedRAIICheck llvm-svn: 327610
* [clang-tidy] rename_check.py misc-sizeof-container bugprone-sizeof-containerAlexander Kornienko2018-03-153-4/+7
| | | | llvm-svn: 327608
* [clang-tidy] rename_check.py misc-sizeof-expression bugprone-sizeof-expressionAlexander Kornienko2018-03-153-4/+7
| | | | llvm-svn: 327607
* [clang-tidy] rename_check.py {misc,bugprone}-macro-parenthesesAlexander Kornienko2018-03-153-7/+10
| | | | llvm-svn: 327606
* [clang-tidy] Add Zircon module to clang-tidyJulie Hockett2018-03-144-0/+62
| | | | | | | | | | Adding a Zircon module to clang-tidy for checks specific to the Zircon kernel, and adding a checker to fuchsia-zx (for zircon) to flag instances where specific objects are temporarily created. Differential Revision: https://reviews.llvm.org/D44346 llvm-svn: 327590
* [docs] Adding clang-doc to CTE toctree to fix docs build errorJulie Hockett2018-03-122-0/+4
| | | | llvm-svn: 327333
* Reland "[clang-doc] Setup clang-doc frontend framework"Julie Hockett2018-03-121-0/+62
| | | | | | | There was a missing newline in the docs, and a static_assert that needed to be a normal assert. llvm-svn: 327295
* [clang-tidy] Add check: replace string::find(...) == 0 with absl::StartsWithHaojian Wu2018-03-093-0/+51
| | | | | | | | | | | | Patch by Niko Weh! Reviewers: hokein Subscribers: klimek, cfe-commits, ioeric, ilya-biryukov, ahedberg Differential Revision: https://reviews.llvm.org/D43847 llvm-svn: 327111
* Revert "[clang-doc] Setup clang-doc frontend framework"Julie Hockett2018-03-091-62/+0
| | | | | | | This reverts commit r327102, since it was breaking the linux-abi-test on x86. llvm-svn: 327103
* [clang-doc] Setup clang-doc frontend frameworkJulie Hockett2018-03-091-0/+62
| | | | | | | | | | | | | | | | Setting up the mapper part of the frontend framework for a clang-doc tool. It creates a series of relevant matchers for declarations, and uses the ToolExecutor to traverse the AST and extract the matching declarations and comments. The mapper serializes the extracted information to individual records for reducing and eventually doc generation. For a more detailed overview of the tool, see the design document on the mailing list: http://lists.llvm.org/pipermail/cfe-dev/2017-December/056203.html Differential Revision: https://reviews.llvm.org/D41102 llvm-svn: 327102
* [Documentation] Fix Clang-tidy checks list broken in r326909.Eugene Zelenko2018-03-071-1/+1
| | | | llvm-svn: 326954
* [clang-tidy] Add "portability" module and rename readability-simd-intrinsics ↵Fangrui Song2018-03-073-5/+14
| | | | | | | | | | | | to portability-simd-intrinsics Reviewers: alexfh Subscribers: klimek, nemanjai, mgorny, xazax.hun, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D44173 llvm-svn: 326909
* [clang-tidy] Another batch of checks to rename from misc- to bugprone-.Alexander Kornienko2018-02-288-24/+34
| | | | | | | | | | | | | | | | Summary: clang-tidy/rename_check.py {misc,bugprone}-suspicious-semicolon clang-tidy/rename_check.py {misc,bugprone}-suspicious-string-compare clang-tidy/rename_check.py {misc,bugprone}-swapped-arguments clang-tidy/rename_check.py {misc,bugprone}-undelegated-constructor --check_class_name UndelegatedConstructor Reviewers: hokein, sammccall, aaron.ballman Subscribers: klimek, mgorny, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D43870 llvm-svn: 326386
* Rename more checks from misc- to bugprone-.Alexander Kornienko2018-02-286-18/+30
| | | | | | | | | | | | | | | | Summary: clang-tidy/rename_check.py {misc,bugprone}-string-integer-assignment clang-tidy/rename_check.py {misc,bugprone}-string-literal-with-embedded-nul clang-tidy/rename_check.py {misc,bugprone}-suspicious-enum-usage clang-tidy/rename_check.py {misc,bugprone}-suspicious-missing-comma Reviewers: hokein, sammccall, aaron.ballman Subscribers: klimek, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D43868 llvm-svn: 326384
* [Documentation] Split Clang-tidy changes in Release Notes into sections: new ↵Eugene Zelenko2018-02-283-31/+33
| | | | | | checks, new aliases, renamed checks; sort all of them alphabetically. Enforce 80 characters line length limit. Highlight C++ keywords. llvm-svn: 326354
* Rename a few checks from misc- to bugprone-.Alexander Kornienko2018-02-287-20/+32
| | | | | | | | | | | | | | | | | | Summary: rename_check.py {misc,bugprone}-forwarding-reference-overload rename_check.py {misc,bugprone}-macro-repeated-side-effects rename_check.py {misc,bugprone}-lambda-function-name rename_check.py {misc,bugprone}-misplaced-widening-cast Reviewers: hokein, sammccall, aaron.ballman Reviewed By: aaron.ballman Subscribers: klimek, cfe-commits, mgorny Differential Revision: https://reviews.llvm.org/D43867 llvm-svn: 326327
* [clang-tidy] Replace the usage of std::uncaught_exception with ↵Gabor Horvath2018-02-203-0/+70
| | | | | | | | | | std::uncaught_exceptions Patch by: Daniel Kolozsvari! Differential Revision: https://reviews.llvm.org/D40787 llvm-svn: 325572
* [Documentation] Fix Sphinx error. Limit text width to 80 characters.Eugene Zelenko2018-02-161-10/+12
| | | | llvm-svn: 325374
* [clang-tidy] Add `readability-simd-intrinsics` check.Fangrui Song2018-02-153-0/+49
| | | | | | | | | | | | | | | | | | | | | Summary: Many architectures provide SIMD operations (e.g. x86 SSE/AVX, Power AltiVec/VSX, ARM NEON). It is common that SIMD code implementing the same algorithm, is written in multiple target-dispatching pieces to optimize for different architectures or micro-architectures. The C++ standard proposal P0214 and its extensions cover many common SIMD operations. By migrating from target-dependent intrinsics to P0214 operations, the SIMD code can be simplified and pieces for different targets can be unified. Refer to http://wg21.link/p0214 for introduction and motivation for the data-parallel standard library. Subscribers: klimek, aemerson, mgorny, xazax.hun, kristof.beyls, hintonda, cfe-commits Differential Revision: https://reviews.llvm.org/D42983 llvm-svn: 325272
* [clang-tidy] Minor documentation fixGabor Horvath2018-02-151-0/+1
| | | | llvm-svn: 325223
* [clang-tidy] New checker for exceptions that are created but not thrownGabor Horvath2018-02-153-0/+26
| | | | | | | | Patch by: Kristof Umann Differential Revision: https://reviews.llvm.org/D43120 llvm-svn: 325222
* [clang-tidy] Fix incorrect code indention in the doc.Haojian Wu2018-02-051-6/+5
| | | | llvm-svn: 324235
* [clang-tidy] tweak "misc-definitions-in-headers" doc, NFC.Haojian Wu2018-02-051-3/+2
| | | | llvm-svn: 324233
* clang-tidy/rename_check.py misc-incorrect-roundings bugprone-incorrect-roundingsAlexander Kornienko2018-01-303-4/+7
| | | | | | | | More specifically, clang-tidy/rename_check.py misc-incorrect-roundings \ bugprone-incorrect-roundings --check_class_name IncorrectRoundings llvm-svn: 323768
* clang-tidy/rename_check.py misc-string-compare readability-string-compareAlexander Kornienko2018-01-303-5/+8
| | | | llvm-svn: 323766
* add prefix with '_' support for property name. Corresponding apple dev doc: ↵Yan Zhang2018-01-301-0/+9
| | | | | | | | | | | | | | https://developer.apple.com/library/content/qa/qa1908/_index.html Reviewers: benhamilton, hokein Reviewed By: benhamilton Subscribers: klimek, cfe-commits Differential Revision: https://reviews.llvm.org/D42464 llvm-svn: 323722
* [clang-tidy objc-property-declaration] New option IncludeDefaultAcronymsBen Hamilton2018-01-221-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The existing option objc-property-declaration.Acronyms replaces the built-in set of acronyms. While this behavior is OK for clients that don't want the default behavior, many clients may just want to add their own custom acronyms to the default list. This revision introduces a new option, objc-property-declaration.IncludeDefaultAcronyms, which controls whether the acronyms in objc-property-declaration.Acronyms are appended to the default list (the default behavior) or whether they replace. I also updated the documentation. Test Plan: make -j12 check-clang-tools Reviewers: Wizard, hokein, klimek Reviewed By: hokein Subscribers: Eugene.Zelenko, cfe-commits Differential Revision: https://reviews.llvm.org/D42261 llvm-svn: 323130
* [clang-tidy] Adding Fuchsia checker for multiple inheritanceJulie Hockett2018-01-193-0/+52
| | | | | | | | | | | | Adds a check to the Fuchsia module to warn when a class inherits from multiple classes that are not pure virtual. See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for reference. Differential Revision: https://reviews.llvm.org/D40580 llvm-svn: 323011
* [clang-tidy objc-property-declaration] Expand list of ObjC acronymsBen Hamilton2018-01-181-5/+5
| | | | | | | | | | | | | | | | | | | | | Summary: We were missing some pretty common acronyms in the camelCase property name check objc-property-declaration. This expands the list and sorts it lexicographically, so we can avoid duplicates. Test Plan: make -j12 check-clang-tools Reviewers: Wizard, hokein, klimek Reviewed By: Wizard Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D42253 llvm-svn: 322886
* [clang-tidy] Adding Fuchsia checker for trailing returnsJulie Hockett2018-01-173-1/+44
| | | | | | | | | | | | Adds a check to the Fuchsia module to warn if a function has a trailing return. See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for reference. Differential Revision: https://reviews.llvm.org/D42116 llvm-svn: 322759
* [clang-tidy] implement check for gotoJonas Toth2018-01-174-0/+76
| | | | | | | | | | | | | | | | | | | | The usage of `goto` is discourage in C++ since forever. This check implements a warning for every `goto`. Even though there are (rare) valid use cases for `goto`, better high level constructs should be used. `goto` is used sometimes in C programs to free resources at the end of functions in the case of errors. This pattern is better implemented with RAII in C++. Reviewers: aaron.ballman, alexfh, hokein Reviewed By: aaron.ballman Subscribers: lebedev.ri, jbcoe, Eugene.Zelenko, klimek, nemanjai, mgorny, xazax.hun, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D41815 llvm-svn: 322626
* [clang-tidy] Adding Fuchsia checker for statically constructed objectsJulie Hockett2018-01-113-1/+50
| | | | | | | | | | | | Adds a check to the Fuchsia module to warn if statically-stored objects are created, unless constructed with `constexpr`. See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for reference. Differential Revision: https://reviews.llvm.org/D41546 llvm-svn: 322310
* clang-tidy: add IgnoreMacros option to ↵Miklos Vajna2018-01-051-0/+5
| | | | | | | | | | | | | | | | | readability-inconsistent-declaration-parameter-name And also enable it by default to be consistent with e.g. modernize-use-using. This helps e.g. when running this check on client code where the macro is provided by the system, so there is no easy way to modify it. Reviewers: alexfh, piotrdz, hokein, ilya-biryukov Reviewed By: alexfh Differential Revision: https://reviews.llvm.org/D41716 llvm-svn: 321913
* Docs, release notes: update version to 7.0.0Hans Wennborg2018-01-032-230/+7
| | | | llvm-svn: 321730
* [clang-tidy] Adding Fuchsia checker for overloaded operatorsJulie Hockett2017-12-223-1/+25
| | | | | | | | | | | | Adds a check to the Fuchsia module to warn if an operator is overloaded, except move and copy operators. See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for reference. Differential Revision: https://reviews.llvm.org/D41363 llvm-svn: 321363
* Fix an error in the release notes.Gabor Horvath2017-12-201-1/+1
| | | | llvm-svn: 321169
* [clang-tidy] Misc redundant expression checker updated for ineffective ↵Gabor Horvath2017-12-201-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bitwise operator expressions Examples: * Always evaluates to 0: ``` int X; if (0 & X) return; ``` * Always evaluates to ~0: ``` int Y; if (Y | ~0) return; ``` * The symbol is unmodified: ``` int Z; Z &= ~0; ``` Patch by: Lilla Barancsuk! Differential Revision: https://reviews.llvm.org/D39285 llvm-svn: 321168
* Fix more inconsistent line endings. NFC.Dimitry Andric2017-12-182-156/+156
| | | | llvm-svn: 321016
* [clangd] Update documentation page with new features, instructionsMarc-Andre Laperle2017-12-181-8/+25
| | | | | | | | | | | | | | | | | | | | Summary: - Some features were implemented so mark them as such. - Add installation instructions (LLVM debian packages) Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Reviewers: jkorous-apple Reviewed By: jkorous-apple Subscribers: jkorous-apple, klimek, ilya-biryukov, cfe-commits Tags: #clang-tools-extra Differential Revision: https://reviews.llvm.org/D41306 llvm-svn: 320988
* [clang-tidy] Adding Fuchsia checker for virtual inheritanceJulie Hockett2017-12-153-0/+20
| | | | | | | | | | | | Adds a check to the Fuchsia module to warn if classes are defined with virtual inheritance. See https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md for reference. Differential Revision: https://reviews.llvm.org/D40813 llvm-svn: 320841
* Add support for NOLINT and NOLINTNEXTLINE comments mentioning specific check ↵Aaron Ballman2017-12-142-0/+52
| | | | | | | | | | names. Supports a comma-separated list of check names to be disabled on the given line. Also supports * as a wildcard to disable all lint diagnostic messages on that line. Patch by Anton (xgsa). llvm-svn: 320713
* [clang-tidy] adjust cppcoreguidelines-owning-memory documentationJonas Toth2017-12-051-1/+5
| | | | | | | | | | | | | | | | | | Summary: A user of the check opened a bugreport and reported that `std::exchange` triggers a false positive. I adjusted the doc to include a list of known (std) constructs that do trigger the issue with templates forgetting the type alias. Reviewers: aaron.ballman, alexfh, hokein Reviewed By: aaron.ballman Subscribers: klimek, nemanjai, xazax.hun, kbarton, cfe-commits Differential Revision: https://reviews.llvm.org/D40829 llvm-svn: 319785
* [Documentation] Style fixes for Objective-C checks documentation to follow ↵Eugene Zelenko2017-11-306-32/+29
| | | | | | | | | | C/C++ example. Release Notes should just repeat first sentence from documentation. Remove duplicated entry from Release Notes. llvm-svn: 319479
* add new check to find NSError init invocationYan Zhang2017-11-301-0/+5
| | | | | | | | Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D40528 llvm-svn: 319460
* add new check to find NSError init invocationYan Zhang2017-11-303-0/+19
| | | | | | | | | | | | | | | | | | | Summary: This check will find out improper initialization of NSError objects. According to Apple developer document, we should always use factory method errorWithDomain:code:userInfo: to create new NSError objects instead of [NSError alloc] init]. Otherwise it will lead to a warning message during runtime in Xcode. The corresponding information about NSError creation: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/CreateCustomizeNSError/CreateCustomizeNSError.html Reviewers: hokein, benhamilton Reviewed By: benhamilton Subscribers: klimek, mgorny, cfe-commits Differential Revision: https://reviews.llvm.org/D40528 llvm-svn: 319459
* [Documentation] Sort Clang-tidy changes next way: new modules, new checks, ↵Eugene Zelenko2017-11-292-121/+116
| | | | | | | | renamed checks, extended checks, new check aliases. Sort checks in each section alphabetically. llvm-svn: 319369
* Add a new clang-tidy module for Fuchsia as an umbrella to diagnose issues ↵Aaron Ballman2017-11-284-1/+32
| | | | | | | | with the Fuschia and Zircon coding guidelines (https://fuchsia.googlesource.com/zircon/+/master/docs/cxx.md). Adds the first of such checkers, which detects when default arguments are declared in a function declaration or when default arguments are used at call sites. Patch by Julie Hockett llvm-svn: 319225
* [clang-tidy] Move more checks from misc- to performance-Alexander Kornienko2017-11-285-11/+17
| | | | | | | | | | | | | | | | Summary: rename_check.py misc-move-const-arg performance-move-const-arg rename_check.py misc-noexcept-move-constructor performance-noexcept-move-constructor Reviewers: hokein, xazax.hun Reviewed By: xazax.hun Subscribers: rnkovacs, klimek, mgorny, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D40507 llvm-svn: 319183
* Add an option to misc-move-const-arg to not diagnose on trivially copyable ↵Aaron Ballman2017-11-271-0/+8
| | | | | | | | types. Patch by Oleg Smolsky llvm-svn: 319111
OpenPOWER on IntegriCloud