Ericsson / CodeCompass

CodeCompass is a software comprehension tool for large scale software written in C/C++ and Java
https://codecompass.net
GNU General Public License v3.0
521 stars 102 forks source link

Support multiple definitions #648

Open schaumb opened 1 year ago

schaumb commented 1 year ago

Sometimes declarations or usings have several definitions in the codebase.

Currently, CodeCompass can not support multiple implementations in C++.

Ex1:

namespace N {
  int a();
  int a(int);
}

using N::a; // ?

Ex2:

template<class>  struct B; // ?
template<class>  struct B    {}; // impl1
template<>       struct B<A> {}; // impl2
schaumb commented 1 year ago

It is available to exist multiple definitions. See namespaces (but not through compile units):

namespace A {}
namespace A {}