<div dir="ltr">This didn't affect any existing tests or diagnostics.  r215251 has the first diagnostic that is impacted with this change.  The difference is that:<div><br></div><div>#define foo(x) ((x) ? *x : 0)</div><div>
int x = 5;</div><div>int y = foo(&x);</div><div><div class="gmail_extra"><br></div><div class="gmail_extra">Without this change, this would cause a conversion warning, with a the diagnostic pointing to both 'x' and 'y' in the last line.  With this change, no diagnostic would be emitted since the context is inside the macro.<br>
<br><div class="gmail_quote">On Wed, Aug 6, 2014 at 10:25 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><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">
<p dir="ltr">Test coverage?</p><div class=""><div class="h5">
<div class="gmail_quote">On Aug 6, 2014 7:26 PM, "Richard Trieu" <<a href="mailto:rtrieu@google.com" target="_blank">rtrieu@google.com</a>> wrote:<br type="attribution"><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">

Author: rtrieu<br>
Date: Wed Aug  6 21:09:05 2014<br>
New Revision: 215048<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=215048&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=215048&view=rev</a><br>
Log:<br>
Update the context location of the condition of a conditional operator to the<br>
question mark instead of the context of the conditional operator.  The<br>
condition does not need the context of the conditional operator at all.<br>
<br>
Modified:<br>
    cfe/trunk/lib/Sema/SemaChecking.cpp<br>
<br>
Modified: cfe/trunk/lib/Sema/SemaChecking.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=215048&r1=215047&r2=215048&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaChecking.cpp?rev=215048&r1=215047&r2=215048&view=diff</a><br>


==============================================================================<br>
--- cfe/trunk/lib/Sema/SemaChecking.cpp (original)<br>
+++ cfe/trunk/lib/Sema/SemaChecking.cpp Wed Aug  6 21:09:05 2014<br>
@@ -6193,7 +6193,7 @@ void CheckConditionalOperand(Sema &S, Ex<br>
<br>
 void CheckConditionalOperator(Sema &S, ConditionalOperator *E,<br>
                               SourceLocation CC, QualType T) {<br>
-  AnalyzeImplicitConversions(S, E->getCond(), CC);<br>
+  AnalyzeImplicitConversions(S, E->getCond(), E->getQuestionLoc());<br>
<br>
   bool Suspicious = false;<br>
   CheckConditionalOperand(S, E->getTrueExpr(), T, CC, Suspicious);<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">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>
</blockquote></div>
</div></div></blockquote></div><br></div></div></div>