<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 2/7/17 7:30 PM, Saleem Abdulrasool
wrote:<br>
</div>
<blockquote
cite="mid:CANXyDxuHSf8b2+yUytdG1phLXpbAuZRAHF5QgzdTCtP_5xVf5g@mail.gmail.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr"><br>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Feb 7, 2017 at 1:09 PM,
Jonathan Roelofs <span dir="ltr"><<a
moz-do-not-send="true"
href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex"><span
class=""><br>
<br>
On 1/24/17 8:10 PM, Saleem Abdulrasool via cfe-commits
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
Don't use the cast for the check, use isa. Although,
since you use the<br>
value later, it is probably better to write this as:<br>
<br>
if (const auto *RD =
cast<CXXRecordDecl>(CurContext<wbr>))<br>
CheckShadowInheritedVariabless<wbr>(Loc,
Name.getAsString(), RD, RD);<br>
</blockquote>
<br>
<br>
</span>
@compnerd: s/cast/dyn_cast/ or s/cast/dyn_cast_or_null/,
right?<br>
</blockquote>
<div><br>
</div>
<div>Only in that it looks weird. There is an assert that
CurContext is a CXXRecordDecl, so the cast is perfectly
fine.</div>
</div>
</div>
</div>
</blockquote>
<br>
Oh, I see. the branch is never expected to go the other way... yeah,
that is a strange, non-idiomatic use of 'if'.<br>
<br>
<br>
Jon<br>
<blockquote
cite="mid:CANXyDxuHSf8b2+yUytdG1phLXpbAuZRAHF5QgzdTCtP_5xVf5g@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Jon<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
-- <br>
Jon Roelofs<br>
<a moz-do-not-send="true"
href="mailto:jonathan@codesourcery.com"
target="_blank">jonathan@codesourcery.com</a><br>
CodeSourcery / Mentor Embedded<br>
</font></span></blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="gmail_signature" data-smartmail="gmail_signature">Saleem
Abdulrasool<br>
compnerd (at) compnerd (dot) org</div>
</div>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Jon Roelofs
<a class="moz-txt-link-abbreviated" href="mailto:jonathan@codesourcery.com">jonathan@codesourcery.com</a>
CodeSourcery / Mentor Embedded</pre>
</body>
</html>