diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 2189db19f5..538e059e26 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2621,6 +2621,31 @@ sub process { if ($op eq '::') { $ok = 1; } + + # Ignore * in C++: templates and + # pointer types are incorrectly + # flagged. Example: + # static_cast + if ($op eq '*') { + $ok = 1; + } + + # Ignore & in C++: & means a + # reference, and this create + # issues with some constructions. + # Example: + # auto &[first, second] = pair; + if ($op eq '&') { + $ok = 1; + } + + # Ignore >> in C++ + # checkpatch is confused by + # >> closing templates. Example: + # vector> + if ($op eq '>>') { + $ok = 1; + } } # Ignore email addresses