<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">+<br>+  case Expr::CXXThrowExprClass: {<br>+    const auto* throwExpr = cast<CXXThrowExpr>(E);<br>

</blockquote><div><br></div><div>Please stick the star on the RHS. Also, it is customary in LLVM and clang to spell it like "ThrowExpr"</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+    EmitCXXThrowExpr(throwExpr);<br>
+    const QualType subExprType = throwExpr->getSubExpr()->getType();<br></blockquote><div><br></div><div>Likewise for "subExprType"</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+    llvm::Type *Ty = llvm::PointerType::getUnqual(ConvertType(subExprType));<br>+    return MakeAddrLValue(llvm::UndefValue::get(Ty), subExprType);<br>
   }</blockquote></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jun 10, 2014 at 5:19 PM, Marius Wachtler <span dir="ltr"><<a href="mailto:undingen@gmail.com" target="_blank">undingen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello<div><br></div><div>Attached you can find my first clang patch which should implement </div><div>"cond ? throw 1 : val".</div>
<div><br></div><div>Without this patch I get: "cannot compile this l-value expression yet"</div>
<div><br></div><div>As this is my first time looking under the hood of clang I'm not sure if this is the right approach. I'm Looking forward to your feedback.</div><span class="HOEnZb"><font color="#888888"><div>
<br></div><div>- Marius Wachtler</div></font></span></div>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>