[cfe-commits] r148253 - in /cfe/trunk/lib/Sema: SemaDeclCXX.cpp SemaExprCXX.cpp
Eli Friedman
eli.friedman at gmail.com
Mon Jan 16 13:00:51 PST 2012
Author: efriedma
Date: Mon Jan 16 15:00:51 2012
New Revision: 148253
URL: http://llvm.org/viewvc/llvm-project?rev=148253&view=rev
Log:
Add some calls to MarkDeclarationReferenced, towards a point where every declaration which is used is marked as used.
Modified:
cfe/trunk/lib/Sema/SemaDeclCXX.cpp
cfe/trunk/lib/Sema/SemaExprCXX.cpp
Modified: cfe/trunk/lib/Sema/SemaDeclCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDeclCXX.cpp?rev=148253&r1=148252&r2=148253&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDeclCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDeclCXX.cpp Mon Jan 16 15:00:51 2012
@@ -2366,7 +2366,9 @@
bool Moving = ImplicitInitKind == IIK_Move;
ParmVarDecl *Param = Constructor->getParamDecl(0);
QualType ParamType = Param->getType().getNonReferenceType();
-
+
+ SemaRef.MarkDeclarationReferenced(Constructor->getLocation(), Param);
+
Expr *CopyCtorArg =
DeclRefExpr::Create(SemaRef.Context, NestedNameSpecifierLoc(), Param,
Constructor->getLocation(), ParamType,
@@ -2436,6 +2438,8 @@
ParmVarDecl *Param = Constructor->getParamDecl(0);
QualType ParamType = Param->getType().getNonReferenceType();
+ SemaRef.MarkDeclarationReferenced(Constructor->getLocation(), Param);
+
// Suppress copying zero-width bitfields.
if (Field->isBitField() && Field->getBitWidthValue(SemaRef.Context) == 0)
return false;
Modified: cfe/trunk/lib/Sema/SemaExprCXX.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExprCXX.cpp?rev=148253&r1=148252&r2=148253&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaExprCXX.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExprCXX.cpp Mon Jan 16 15:00:51 2012
@@ -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())
More information about the cfe-commits
mailing list