Hi,
In the code below, MyNamespace::MyClass_ptr will be named
"struct.boost::MyClass_ptr" by llvm-g++, and not
"struct.MyNamespace::MyClass_ptr" as I expected.
I observed this with the real boost::shared_ptr but used the code below
(also attached as structnametest1.cc) on the demo page
(http://llvm.org/demo/index.cgi) to reproduce the behavior.
When I extended my test code to create a MyClass and MyClass_ptr in the
boost namespace too, it seems like both struct:s get called
"struct.boost::MyClass_ptr". (Attached as structnametest2.cc)
I have a suspicion that this is not the desired behavior. Is there
somewhere in llvm-gcc I could look to see if it's an easy patch, or
something else to do before I file a bug report?
Best regards,
David Eriksson
namespace boost
{
template<typename T>
class shared_ptr
{
private:
T* p_;
void* q_;
public:
shared_ptr(T*p) :
p_(p)
{
}
};
} // namespace boost
namespace MyNamespace
{
class MyClass
{
};
typedef boost::shared_ptr<MyClass> MyClass_ptr;
} // namespace MyNamespace
MyNamespace::MyClass_ptr func()
{
return MyNamespace::MyClass_ptr(new MyNamespace::MyClass());
}
structnametest1.cc (393 Bytes)
structnametest2.cc (546 Bytes)