[LLVMdev] RTTI handling

John McCall rjmccall at apple.com
Mon Oct 3 10:19:04 PDT 2011


On Oct 3, 2011, at 4:42 AM, Somorjai, Akos wrote:
> I'm trying to use this warning to check the vtable problem. Here's an example
> 
> In mem.hpp 
> 
> class
> AA {
> // Construction / destruction:
> protected:
> AA ();
> AA (const AA&); // Disabled
> public:
> virtual ~AA ();
> };
> 
> In mem.cpp
> 
> #include "mem.hpp"
> 
> AA::~AA()
> {
> }
> 
> And I still get the following warning:
> 
> warning: 'AA' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables,3]

Which version of Clang are you using?  Like I said, this warning was still experimental even a few months ago, and it's gotten a lot of attention on ToT.  In particular, this case no longer warns.

John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111003/6f3e7d10/attachment.html>


More information about the llvm-dev mailing list