From: Richard Trieu Date: Thu, 7 Aug 2014 02:09:05 +0000 (+0000) Subject: Update the context location of the condition of a conditional operator to the X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9e2d9f2ea87a9399ff3d076e69c6f73410094517;p=clang Update the context location of the condition of a conditional operator to the question mark instead of the context of the conditional operator. The condition does not need the context of the conditional operator at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215048 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Sema/SemaChecking.cpp b/lib/Sema/SemaChecking.cpp index 5128df817c..0483341cef 100644 --- a/lib/Sema/SemaChecking.cpp +++ b/lib/Sema/SemaChecking.cpp @@ -6193,7 +6193,7 @@ void CheckConditionalOperand(Sema &S, Expr *E, QualType T, void CheckConditionalOperator(Sema &S, ConditionalOperator *E, SourceLocation CC, QualType T) { - AnalyzeImplicitConversions(S, E->getCond(), CC); + AnalyzeImplicitConversions(S, E->getCond(), E->getQuestionLoc()); bool Suspicious = false; CheckConditionalOperand(S, E->getTrueExpr(), T, CC, Suspicious);