]> granicus.if.org Git - clang/commitdiff
Update the context location of the condition of a conditional operator to the
authorRichard Trieu <rtrieu@google.com>
Thu, 7 Aug 2014 02:09:05 +0000 (02:09 +0000)
committerRichard Trieu <rtrieu@google.com>
Thu, 7 Aug 2014 02:09:05 +0000 (02:09 +0000)
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

index 5128df817ce00ce552fbb45ea8162c39a7cc346b..0483341cef1b3698a993861207e327d75fa8c3e0 100644 (file)
@@ -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);