Ericsson / clang

Cross Translation Unit analysis capability for Clang Static Analyzer. (Fork of official clang at http://llvm.org/git/clang)
http://clang.llvm.org/
Other
15 stars 10 forks source link

Unify redecl chain tests as type parameterized tests #508

Closed martong closed 5 years ago

martong commented 5 years ago

This PR unifies all those tests which check the correctness of the redecl chains. Previously we had several structurally very similar test cases for each language construct (class, function, variable, function template, ...).

We still use value-parameterized tests for the different AST compatibility switches (-fdelayed-template-parsing, -fms-compatibility). Gtest makes it possible to have either value-parameterized or type-parameterized fixtures. However, we cannot have both value- and type-parameterized test fixtures. So we use a value-parameterized test fixture in the gtest sense. We intend to mimic gtest's type-parameters via the type template parameter. We manually instantiate the different tests with the each types.

martong commented 5 years ago

After this PR I am planning to put the "generic redecl chain" related tests into their own separate test file (in another PR).

balazske commented 5 years ago

Great to have the tests in this way and find the not working cases. The failing cases are to be checked if there is really import error or the test is not correct for that case.

martong commented 5 years ago

Yes, I agree, all FIXMEs related to this change should be addressed in later PRs.

martong commented 5 years ago

https://reviews.llvm.org/D57236