<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); ">
<div>
<div>
<div style="font-family: Arial, sans-serif; font-size: 13px; ">
<div>Apple clang version 3.0 (tags/Apple/clang-211.9) (based on LLVM 3.0svn)</div>
<div>Target: x86_64-apple-darwin10.8.0</div>
</div>
<div style="font-family: Arial, sans-serif; font-size: 13px; "><br>
</div>
<div style="font-family: Arial, sans-serif; font-size: 13px; ">It's part of the Xcode 4.2b7 package.</div>
<div style="font-family: Arial, sans-serif; font-size: 13px; "><br>
</div>
<div style="font-family: Arial, sans-serif; font-size: 13px; ">Shall I try to compile it on my own?</div>
<div style="font-family: Arial, sans-serif; font-size: 13px; "><br>
</div>
<div style="font-family: Arial, sans-serif; font-size: 13px; ">Thanks, Akos</div>
<div>
<div>
<p><font class="Apple-style-span" face="Arial,sans-serif" size="4"><b><br>
</b></font></p>
</div>
</div>
</div>
</div>
<span id="OLK_SRC_BODY_SECTION" style="font-size: 13px; font-family: Arial, sans-serif; ">
<div style="font-family:Calibri; font-size:11pt; text-align:left; color:black; BORDER-BOTTOM: medium none; BORDER-LEFT: medium none; PADDING-BOTTOM: 0in; PADDING-LEFT: 0in; PADDING-RIGHT: 0in; BORDER-TOP: #b5c4df 1pt solid; BORDER-RIGHT: medium none; PADDING-TOP: 3pt">
<span style="font-weight:bold">From: </span>John McCall <<a href="mailto:rjmccall@apple.com">rjmccall@apple.com</a>><br>
<span style="font-weight:bold">Date: </span>Mon, 3 Oct 2011 10:19:04 -0700<br>
<span style="font-weight:bold">To: </span>Ákos Somorjai <<a href="mailto:asomorjai@graphisoft.com">asomorjai@graphisoft.com</a>><br>
<span style="font-weight:bold">Cc: </span>"<a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>" <<a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a>><br>
<span style="font-weight:bold">Subject: </span>Re: [LLVMdev] RTTI handling<br>
</div>
<div><br>
</div>
<div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div>
<div>On Oct 3, 2011, at 4:42 AM, Somorjai, Akos wrote:</div>
<blockquote type="cite">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 13px; font-family: Arial, sans-serif; ">
<div>
<div>
<div>I'm trying to use this warning to check the vtable problem. Here's an example</div>
<div><br>
</div>
<div>In mem.hpp </div>
<div><br>
</div>
<div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">
<span style="color: #bb2d9d">class</span><span class="Apple-tab-span" style="white-space:pre"></span>AA {</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(0, 132, 37); ">
<span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"></span></span>// Construction / destruction:</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(187, 45, 157); ">
protected<span style="color: #000000">:</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">
<span class="Apple-tab-span" style="white-space:pre"></span>AA ();</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(0, 132, 37); ">
<span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre"></span>AA (</span><span style="color: #bb2d9d">const</span><span style="color: #000000"></span><span style="color: #4e8186">AA</span><span style="color: #000000">&);
</span>// Disabled</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(187, 45, 157); ">
public<span style="color: #000000">:</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">
<span class="Apple-tab-span" style="white-space:pre"></span><span style="color: #bb2d9d">virtual</span> ~AA ();</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">
};</div>
</div>
<div><br>
</div>
<div>In mem.cpp</div>
<div><br>
</div>
<div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(120, 72, 47); ">
#include <span style="color: #d12c26">"mem.hpp"</span></div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; min-height: 13px; ">
<br>
</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">
<span style="color: #4e8186">AA</span>::~AA()</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">
{</div>
<div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; ">
}</div>
</div>
<div><br>
</div>
<div>And I still get the following warning:</div>
<div><br>
</div>
<div><span class="Apple-tab-span" style="white-space:pre"></span>warning: 'AA' has no out-of-line virtual method definitions; its vtable will be emitted in every translation unit [-Wweak-vtables,3]</div>
</div>
</div>
</div>
</blockquote>
<div><br>
</div>
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.</div>
<div><br>
</div>
<div>John.</div>
</div>
</div>
</span>
</body>
</html>