From 9e2d9f2ea87a9399ff3d076e69c6f73410094517 Mon Sep 17 00:00:00 2001 From: Richard Trieu Date: Thu, 7 Aug 2014 02:09:05 +0000 Subject: [PATCH] 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 --- lib/Sema/SemaChecking.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.40.0