normal [;{}] [*] \w+? (\+\+|\-\-) ; UnusedDeref style Redundant * found, "*p++" is the same as "*(p++)". normal if \( ([!] )*?(strlen) \( \w+? \) ([>] [0] )*?\) { StrlenEmptyString performance Using strlen() to check if a string is empty is not efficient. normal [;{}] [*] \w+? (\+\+|\-\-) ; UnusedDeref style Redundant * found, "*p++" is the same as "*(p++)". define define [0-9A-Z_^a-z]*[a-z] defineUpperCase style Macros must be uppercase define define (MIGRAPH|[^X]{7})[^X][^_] definePrefix style Macros must be prefixed with MIGRAPHX_ normal mutable \w+ MutableVariable style Do not create mutable variables. normal (memcpy|strcpy|strncpy|strcat|strncat) \( useStlAlgorithms style Use std::copy instead normal memset \( useStlAlgorithms style Use std::fill instead normal memcmp \( useStlAlgorithms style Use std::equal_range instead normal memchr \( useStlAlgorithms style Use std::find instead normal \\W(fclose|free|hipFree|hipHostFree|hipFreeArray|hipMemFree|hipStreamDestroy|hipEventDestroy|hipArrayDestroy|hipCtxDestroy|hipDestroyTextureObject|hipDestroySurfaceObject|miirDestroyHandle) \( useManagePointer style Use manage pointer for resource management normal useSmartPointer style Use make_shared or make_unique instead of new normal \))]]> UseDeviceLaunch style Use device::launch instead normal UnnecessaryElseStatement style Else statement is not necessary. normal |::) )*(?:\w+|>)(?: &|\*)*) (\w) ; \2 = static_cast < \1 > (\([^()]*(?-1)*[^()]*\)) ;]]> RedundantCast style Static cast is redundant. normal |::) )*(?:\w+|>)(?: &|\*)* > (\([^()]*(?-1)*[^()]*\)) ;]]> RedundantCast style Static cast is redundant. normal RedundantConditionalOperator style Conditional operator is redundant. normal EmptySwitchStatement style Empty switch statement. normal |::) )*(?:\w+|>)(?: &|\*)* (\w) ; \1 = [^;]+ ; return \1 ;]]> RedundantLocalVariable style Variable is returned immediately after its declaration, can be simplified to just return expression. normal ForLoopShouldBeWhileLoop style For loop should be written as a while loop. normal EmptyWhileStatement style Empty while statement. normal BitwiseOperatorInConditional style Bitwise operator found in if statement. normal EmptyElseBlock style Empty else statement can be safely removed. normal EmptyForStatement style Empty for statement. normal EmptyIfStatement style Empty if statement. normal RedundantIfStatement style The if statement is redundant. normal DoubleNegative style Double negative is always positive. normal DoubleNegative style Double negative is always positive. normal DoubleNegative style Double negative is always positive. normal DoubleNegative style Double negative is always positive. normal InvertedLogic style It is cleaner to invert the logic. normal InvertedLogic style It is cleaner to invert the logic. normal InvertedLogic style It is cleaner to invert the logic. normal InvertedLogic style It is cleaner to invert the logic. normal EmptyCatchStatement style An empty catch statement. normal ConditionalAssert style The if condition should be included in assert. normal |::) )*(?:\w+|>)(?: &|\*)* \w : \1 \) ({[^{}]*(?-1)*[^{}]*}) }]]> UnnecessaryEmptyCondition style Unnecessary check for empty before for range loop. normal |::) )*(?:\w+|>)(?: &|\*)* \w : \1 \) ({[^{}]*(?-1)*[^{}]*}) }]]> UnnecessaryEmptyCondition style Unnecessary check for empty before for range loop. normal |::) )*(?:\w+|>)(?: &|\*)* (\w+) = \w+ ; \1 < \w+ ; (\1 \+\+|\+\+ \1|\1 \-\-|\-\- \1) \) { \w+ \[ \1 \] = \w+ \[ \1 \] ; }]]> useStlAlgorithm style Considering using std::copy instead. normal |::) )*(?:\w+|>)(?: &|\*)* (\w+) = \w+ ; \1 < \w+ ; (\1 \+\+|\+\+ \1|\1 \-\-|\-\- \1) \) { \w+ \[ \1 \] = \w+ ; }]]> useStlAlgorithm style Considering using std::fill instead. normal |::) )*(?:\w+|>)(?: &|\*)* (\w+) = \w+ ; \1 < \w+ ; (\1 \+\+|\+\+ \1|\1 \-\-|\-\- \1) \) { \w+ \[ \1 \] = (?:\w+ :: )*\w+ \( \) ; }]]> useStlAlgorithm style Considering using std::generate instead. normal |::) )*(?:\w+|>)(?: &|\*)* (\w+) = \w+ ; \1 < \w+ ; (\1 \+\+|\+\+ \1|\1 \-\-|\-\- \1) \) { \w+ \[ \1 \] = (?:\w+ :: )*\w+ \( \w+ \[ \1 \] \) ; }]]> useStlAlgorithm style Considering using std::transform instead. normal |::) )*(?:\w+|>)(?: &|\*)* (\w+) = \w+ ; \1 < \w+ ; (\1 \+\+|\+\+ \1|\1 \-\-|\-\- \1) \) { \w+ \[ \1 \] = (?:\w+ :: )*\w+ \( \w+ \[ \1 \] , \w+ \[ \1 \] \) ; }]]> useStlAlgorithm style Considering using std::transform instead. normal |::) )*(?:\w+|>)(?: &|\*)* (\w+) : (?:[^()]*(\([^()]*(?-1)*[^()]*\)))*[^)]*\) { (?:(?\w+) \+\+|\+\+ (?\w+)) ; if (\([^()]*(?-1)*[^()]*\)) { \w+ = \g{idx1}|\g{idx2} ; (?:break ; )?(?:return [^;]*; )?} }]]> useStlAlgorithm style Considering using std::find or std::find_if instead. normal |::) )*(?:\w+|>)(?: &|\*)* (\w+) : (?:[^()]*(\([^()]*(?-1)*[^()]*\)))*[^)]*\) { if (\([^()]*(?-1)*[^()]*\)) { \w+ = (?\w) ; (?:break ; )?(?:return [^;]*; )?} (?:(\g{idx}) \+\+|\+\+ (\g{idx})) ; }]]> useStlAlgorithm style Considering using std::find or std::find_if instead. normal |::) )*(?:\w+|>)(?: &|\*)* (\w+) : (?:[^()]*(\([^()]*(?-1)*[^()]*\)))*[^)]*\) { (?:(?\w+) \+\+|\+\+ (?\w+)) ; if (\([^()]*(?-1)*[^()]*\)) { return \g{idx1}|\g{idx2} ; } }]]> useStlAlgorithm style Considering using std::find or std::find_if instead. normal |::) )*(?:\w+|>)(?: &|\*)* (\w+) : (?:[^()]*(\([^()]*(?-1)*[^()]*\)))*[^)]*\) { if (\([^()]*(?-1)*[^()]*\)) { return (?\w+) ; } (?:(\g{idx}) \+\+|\+\+ (\g{idx})) ; }]]> useStlAlgorithm style Considering using std::find or std::find_if instead. normal EmptyDoWhileStatement style Empty do-while. normal goto GotoStatement style Goto considered harmful.