From f36e01de6187e25d857f5e4245fa956be89375d9 Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Fri, 8 Oct 2021 13:14:41 -0700 Subject: Add new clang-tidy and clang warning patterns * New "clang-tidy used ... seconds" warnings are reported when clang-tidy runs for more than 1/2 of TIDY_TIMEOUT seconds. * Recognize other clang-tidy warnings in separate groups; they should not be used in normal Android builds. * Add two more variants of C++ warnings. Test: warn.py --url=http://cs/android --separator='?l=' build.log > warnings.html Test: warn.py --gencsv build.log > warnings.csv Change-Id: I4a2e1c3c817c586cfe3da125b920cca77fcc63b6 --- tools/warn/cpp_warn_patterns.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/warn/cpp_warn_patterns.py') diff --git a/tools/warn/cpp_warn_patterns.py b/tools/warn/cpp_warn_patterns.py index b738086640..1e1aa43fd5 100644 --- a/tools/warn/cpp_warn_patterns.py +++ b/tools/warn/cpp_warn_patterns.py @@ -297,6 +297,7 @@ warn_patterns = [ [r".*: warning: declaration 'class .+' does not declare anything"]), medium('Initialization order will be different', [r".*: warning: '.+' will be initialized after", + r".*: warning: initializer order does not match the declaration order", r".*: warning: field .+ will be initialized after .+Wreorder"]), skip('skip, ....', [r".*: warning: '.+'"]), @@ -448,6 +449,7 @@ warn_patterns = [ [r".*: warning: 'operator new' must not return NULL unless it is declared 'throw\(\)' .+"]), medium('NULL used in arithmetic', [r".*: warning: NULL used in arithmetic", + r".*: warning: .* subtraction with a null pointer", r".*: warning: comparison between NULL and non-pointer"]), medium('Misspelled header guard', [r".*: warning: '.+' is used as a header guard .+ followed by .+ different macro"]), -- cgit v1.2.3-59-g8ed1b