Add some calls to MarkDeclarationReferenced, towards a point where every declaration which is used is marked as used.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148253 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaExprCXX.cpp b/lib/Sema/SemaExprCXX.cpp
index ee25591..6476f4a 100644
--- a/lib/Sema/SemaExprCXX.cpp
+++ b/lib/Sema/SemaExprCXX.cpp
@@ -2043,6 +2043,9 @@
                                         ConditionVar->getLocation(),
                             ConditionVar->getType().getNonReferenceType(),
                               VK_LValue));
+
+  MarkDeclarationReferenced(ConditionVar->getLocation(), ConditionVar);
+
   if (ConvertToBoolean) {
     Condition = CheckBooleanCondition(Condition.take(), StmtLoc);
     if (Condition.isInvalid())