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

Add test RedeclChainShouldBeCorrectAmongstNamespaces #516

Closed martong closed 5 years ago

martong commented 5 years ago

This test exercises the structural eq logic too. In this test case, isBeingDefined() will be true for X.

This test is related to https://reviews.llvm.org/D53697 But there the redecl chain is not handled yet, so we should upstream it only later.

balazske commented 5 years ago

During the import of Y the isBeingDefined for X should be true. The test looks good if only this is the purpose of it. (The previous decl for X definition could be checked too.)

martong commented 5 years ago

Yes, I wanted to have a concrete test which exercises the isBeingDefined() branch in the structural eq logic. (Too bad, this test does not fail on upstream , because there we do not handle the redecl chain of classes yet.)

martong commented 5 years ago

https://reviews.llvm.org/D57901