llvm-project/clang-tools-extra/clang-tidy/readability
mydeveloperday fe866327c1 [clang-tidy] [PR50069] readability-braces-around-statements doesn't work well with [[likely]] [[unlikely]]
https://bugs.llvm.org/show_bug.cgi?id=50069

When clang-tidy sees:

```
if (true) [[unlikely]] {
    ...
}
```

It thinks the braces are missing and add them again.

```
if (true)  { [[unlikely]] {
    ...
  }
}
```

This revision aims to prevent that incorrect code generation

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D105479
2021-08-14 12:05:21 +01:00
..
AvoidConstParamsInDecls.cpp [clang-tidy] Fix readability-avoid-const-params-in-decls removing const in template paramaters 2021-02-24 15:54:10 +00:00
AvoidConstParamsInDecls.h [clang-tidy] Simplify const params check 2021-02-17 10:20:12 +00:00
BracesAroundStatementsCheck.cpp [clang-tidy] [PR50069] readability-braces-around-statements doesn't work well with [[likely]] [[unlikely]] 2021-08-14 12:05:21 +01:00
BracesAroundStatementsCheck.h [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
CMakeLists.txt Add a check for enforcing minimum length for variable names 2021-08-12 11:31:26 -04:00
ConstReturnTypeCheck.cpp [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
ConstReturnTypeCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
ContainerSizeEmptyCheck.cpp [clang-tidy] Simplify implementation of container-size-empty 2021-02-05 14:03:41 +00:00
ContainerSizeEmptyCheck.h [clang-tidy] Simplify implementation of container-size-empty 2021-02-05 14:03:41 +00:00
ConvertMemberFunctionsToStatic.cpp [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
ConvertMemberFunctionsToStatic.h [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
DeleteNullPointerCheck.cpp [clang-tidy] Simplify delete null ptr check 2021-02-17 10:18:36 +00:00
DeleteNullPointerCheck.h [clang-tidy] Simplify delete null ptr check 2021-02-17 10:18:36 +00:00
ElseAfterReturnCheck.cpp [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
ElseAfterReturnCheck.h [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
FunctionCognitiveComplexityCheck.cpp Fix nits. 2021-04-12 18:46:13 +02:00
FunctionCognitiveComplexityCheck.h [clang-tidy] Add option to ignore macros in readability-function-cognitive-complexity check. 2021-04-12 18:46:12 +02:00
FunctionSizeCheck.cpp Fix file headers. NFC 2019-03-01 09:52:53 +00:00
FunctionSizeCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
IdentifierLengthCheck.cpp Add a check for enforcing minimum length for variable names 2021-08-12 11:31:26 -04:00
IdentifierLengthCheck.h Add a check for enforcing minimum length for variable names 2021-08-12 11:31:26 -04:00
IdentifierNamingCheck.cpp [clang-tidy] Fix command line is too long issue which breaks test on Windows 2021-08-03 22:12:46 +02:00
IdentifierNamingCheck.h [clang-tidy] Add new case type to check variables with Hungarian notation 2021-08-01 15:22:17 -07:00
ImplicitBoolConversionCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
ImplicitBoolConversionCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
InconsistentDeclarationParameterNameCheck.cpp [clang-tools-extra] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
InconsistentDeclarationParameterNameCheck.h [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
IsolateDeclarationCheck.cpp [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
IsolateDeclarationCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
MagicNumbersCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 12:39:33 +01:00
MagicNumbersCheck.h [clang-tidy][NFC] Remove unnecessary includes throughout clang-tidy header files 2020-06-29 16:05:52 +01:00
MakeMemberFunctionConstCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
MakeMemberFunctionConstCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
MisleadingIndentationCheck.cpp [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
MisleadingIndentationCheck.h [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
MisplacedArrayIndexCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
MisplacedArrayIndexCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
NamedParameterCheck.cpp [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
NamedParameterCheck.h [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
NamespaceCommentCheck.cpp [clang-tools-extra] NFC: Fix trivial typo in documents and comments 2020-04-05 15:28:40 +09:00
NamespaceCommentCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
NonConstParameterCheck.cpp [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
NonConstParameterCheck.h [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
QualifiedAutoCheck.cpp [clang-tidy][NFC] Tweak some generation of diag messages 2021-02-26 19:10:25 +00:00
QualifiedAutoCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
ReadabilityTidyModule.cpp Add a check for enforcing minimum length for variable names 2021-08-12 11:31:26 -04:00
RedundantAccessSpecifiersCheck.cpp [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
RedundantAccessSpecifiersCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
RedundantControlFlowCheck.cpp [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
RedundantControlFlowCheck.h [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
RedundantDeclarationCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
RedundantDeclarationCheck.h [clang-tidy] Implement storeOptions for checks missing it. 2020-06-21 19:01:11 +01:00
RedundantFunctionPtrDereferenceCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
RedundantFunctionPtrDereferenceCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
RedundantMemberInitCheck.cpp [clang-tidy] Simplify redundant member init check 2021-02-27 12:11:44 +00:00
RedundantMemberInitCheck.h [clang-tidy] Simplify redundant member init check 2021-02-27 12:11:44 +00:00
RedundantPreprocessorCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
RedundantPreprocessorCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
RedundantSmartptrGetCheck.cpp [clang-tidy] Handle uninstantiated templates in redundant get check 2021-02-27 12:08:41 +00:00
RedundantSmartptrGetCheck.h [clang-tidy] Handle uninstantiated templates in redundant get check 2021-02-27 12:08:41 +00:00
RedundantStringCStrCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
RedundantStringCStrCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
RedundantStringInitCheck.cpp [clang-tidy] Applied clang-tidy fixes. NFC 2021-01-29 01:01:19 +01:00
RedundantStringInitCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
SimplifyBooleanExprCheck.cpp [clang-tidy] Simplify boolean expr check 2021-02-27 12:13:24 +00:00
SimplifyBooleanExprCheck.h [clang-tidy] Simplify boolean expr check 2021-02-27 12:13:24 +00:00
SimplifySubscriptExprCheck.cpp [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
SimplifySubscriptExprCheck.h [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
StaticAccessedThroughInstanceCheck.cpp [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
StaticAccessedThroughInstanceCheck.h [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
StaticDefinitionInAnonymousNamespaceCheck.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
StaticDefinitionInAnonymousNamespaceCheck.h [clang-tidy] Switch checks to #include "ClangTidyCheck.h" 2019-03-25 12:38:26 +00:00
StringCompareCheck.cpp Remove references to the ast_type_traits namespace 2020-12-11 00:58:46 +01:00
StringCompareCheck.h [clang-tidy] Change checks to use new isLanguageVersionSupported restriction 2020-03-03 16:43:45 +00:00
SuspiciousCallArgumentCheck.cpp [clang-tidy] Add 'readability-suspicious-call-argument' check 2021-07-19 10:18:09 +02:00
SuspiciousCallArgumentCheck.h [clang-tidy] Add 'readability-suspicious-call-argument' check 2021-07-19 10:18:09 +02:00
UniqueptrDeleteReleaseCheck.cpp [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
UniqueptrDeleteReleaseCheck.h [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
UppercaseLiteralSuffixCheck.cpp [clang-tools-extra] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
UppercaseLiteralSuffixCheck.h [clang-tidy] Simplify readability checks to not need ignoring* matchers 2021-03-28 11:25:41 +01:00
UseAnyOfAllOfCheck.cpp [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
UseAnyOfAllOfCheck.h [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00