Open Bug 1531844 Opened 6 years ago Updated 2 years ago

Use of gtest TEST() macro causes clang static-analysis check failures

Categories

(Developer Infrastructure :: Source Code Analysis, enhancement, P2)

enhancement

Tracking

(Not tracked)

People

(Reporter: Gijs, Unassigned)

Details

 0:07.18 path/to/toolkit/components/reputationservice/test/gtest/TestExecutableLists.cpp:338:1: warning: use '= delete' to prohibit calling of a special member function [modernize-use-equals-delete]
 0:07.18 TEST(TestExecutableLists, TestListExtensionsExistSomewhere) {
 0:07.18 ^
 0:07.18 path/to/opt/dist/include\gtest/gtest.h:2187:42: note: expanded from macro 'TEST'
 0:07.18 # define TEST(test_case_name, test_name) GTEST_TEST(test_case_name, test_name)
 0:07.18                                          ^
 0:07.18 path/to/opt/dist/include\gtest/gtest.h:2181:3: note: expanded from macro 'GTEST_TEST'
 0:07.18   GTEST_TEST_(test_case_name, test_name, \
 0:07.18   ^
 0:07.18 path/to/opt/dist/include\gtest/internal/gtest-internal.h:1222:7: note: expanded from macro 'GTEST_TEST_'
 0:07.18       GTEST_TEST_CLASS_NAME_(test_case_name, test_name));\
 0:07.18       ^
 0:07.18 path/to/opt/dist/include\gtest/internal/gtest-internal.h:1211:3: note: expanded from macro 'GTEST_TEST_CLASS_NAME_'
 0:07.18   test_case_name##_##test_name##_Test
 0:07.18   ^
 0:07.18 note: expanded from here

https://searchfox.org/mozilla-central/source/tools/rewriting/ThirdPartyPaths.txt lists testing/gtest/gtest/ - perhaps we need another mechanism to deal with include files copied from there or something? (copied because this is windows so no symlinks, in case that matters)

The priority flag is not set for this bug.
:sylvestre, could you have a look please?

Flags: needinfo?(sledru)

Interesting, I am wondering how common this is.

Flags: needinfo?(sledru)
Priority: -- → P2
Product: Firefox Build System → Developer Infrastructure
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.