llvm-project/clang-tools-extra/clang-tidy/cppcoreguidelines
Jonas Toth f22f3489d7 [clang-tidy] implement check for goto
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
2018-01-17 10:27:41 +00:00
..
AvoidGotoCheck.cpp [clang-tidy] implement check for goto 2018-01-17 10:27:41 +00:00
AvoidGotoCheck.h [clang-tidy] implement check for goto 2018-01-17 10:27:41 +00:00
CMakeLists.txt [clang-tidy] implement check for goto 2018-01-17 10:27:41 +00:00
CppCoreGuidelinesTidyModule.cpp [clang-tidy] implement check for goto 2018-01-17 10:27:41 +00:00
InterfacesGlobalInitCheck.cpp [clang-tidy] cppcoreguidelines-interfaces-global-init 2016-04-08 09:51:06 +00:00
InterfacesGlobalInitCheck.h [clang-tidy] cppcoreguidelines-interfaces-global-init 2016-04-08 09:51:06 +00:00
NoMallocCheck.cpp [clang-tidy] test commit for granted access 2017-08-30 07:50:28 +00:00
NoMallocCheck.h Spelling mistakes in comments. NFCI. 2017-03-30 13:10:33 +00:00
OwningMemoryCheck.cpp [clang-tidy] introduce legacy resource functions to 'cppcoreguidelines-owning-memory' 2017-10-18 16:14:15 +00:00
OwningMemoryCheck.h [clang-tidy] introduce legacy resource functions to 'cppcoreguidelines-owning-memory' 2017-10-18 16:14:15 +00:00
ProBoundsArrayToPointerDecayCheck.cpp Reverting r298421 due to using a header that's unavailable to all systems and some other post-commit review feedback. 2017-03-22 01:08:54 +00:00
ProBoundsArrayToPointerDecayCheck.h [clang-tidy] remove trailing whitespaces and retab 2016-08-01 12:06:18 +00:00
ProBoundsConstantArrayIndexCheck.cpp [clang-tidy] Unify the way IncludeStyle and HeaderFileExtesions options are used 2017-07-20 12:02:03 +00:00
ProBoundsConstantArrayIndexCheck.h [clang-tidy] Cleanup namespace in utils folder. 2016-05-03 02:54:05 +00:00
ProBoundsPointerArithmeticCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
ProBoundsPointerArithmeticCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
ProTypeConstCastCheck.cpp [clang-tidy] remove trailing whitespaces and retab 2016-08-01 12:06:18 +00:00
ProTypeConstCastCheck.h [clang-tidy] remove trailing whitespaces and retab 2016-08-01 12:06:18 +00:00
ProTypeCstyleCastCheck.cpp [clang-tidy] Cleaning up language options. 2016-09-24 02:13:45 +00:00
ProTypeCstyleCastCheck.h [clang-tidy] Cleaning namespaces to be more consistant across checkers. 2016-05-02 18:00:29 +00:00
ProTypeMemberInitCheck.cpp [cppcoreguidelines] Don't rely on SmallPtrSet iteration order. 2017-08-30 20:18:40 +00:00
ProTypeMemberInitCheck.h Fix some false-positives with cppcoreguidelines-pro-type-member-init. Handle classes with default constructors that are defaulted or are not present in the AST. 2016-10-04 14:48:05 +00:00
ProTypeReinterpretCastCheck.cpp [clang-tidy] Cleaning namespaces to be more consistant across checkers. 2016-05-02 18:00:29 +00:00
ProTypeReinterpretCastCheck.h [clang-tidy] Cleaning namespaces to be more consistant across checkers. 2016-05-02 18:00:29 +00:00
ProTypeStaticCastDowncastCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
ProTypeStaticCastDowncastCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
ProTypeUnionAccessCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
ProTypeUnionAccessCheck.h [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
ProTypeVarargCheck.cpp [clang-tools-extra] Format sources with clang-format. NFC. 2016-11-08 07:50:19 +00:00
ProTypeVarargCheck.h [clang-tidy] Cleaning namespaces to be more consistant across checkers. 2016-05-02 18:00:29 +00:00
SlicingCheck.cpp [clang-tidy] cppcoreguidelines-slicing: display discarded state size in bytes 2016-12-22 14:12:31 +00:00
SlicingCheck.h Revert "Revert "[clang-tidy] new cppcoreguidelines-slicing"" 2016-07-22 13:45:00 +00:00
SpecialMemberFunctionsCheck.cpp Don't make unqualified calls to functions that could well be found via 2017-03-21 20:15:42 +00:00
SpecialMemberFunctionsCheck.h Apply clang-tidy's performance-unnecessary-value-param to clang-tidy. 2017-03-21 21:34:58 +00:00