r339402 - Remove obsolete set call
Stephen Kelly via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 9 15:44:04 PDT 2018
Author: steveire
Date: Thu Aug 9 15:44:03 2018
New Revision: 339402
URL: http://llvm.org/viewvc/llvm-project?rev=339402&view=rev
Log:
Remove obsolete set call
Summary:
Case case of the switch statement here makes the same call, but it is
already done at the start of the function.
Reviewers: rsmith, dblaikie
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50409
Modified:
cfe/trunk/lib/Sema/SemaDecl.cpp
Modified: cfe/trunk/lib/Sema/SemaDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaDecl.cpp?rev=339402&r1=339401&r2=339402&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaDecl.cpp (original)
+++ cfe/trunk/lib/Sema/SemaDecl.cpp Thu Aug 9 15:44:03 2018
@@ -4949,7 +4949,6 @@ Sema::GetNameFromUnqualifiedId(const Unq
case UnqualifiedIdKind::IK_ImplicitSelfParam:
case UnqualifiedIdKind::IK_Identifier:
NameInfo.setName(Name.Identifier);
- NameInfo.setLoc(Name.StartLocation);
return NameInfo;
case UnqualifiedIdKind::IK_DeductionGuideName: {
@@ -4976,14 +4975,12 @@ Sema::GetNameFromUnqualifiedId(const Unq
NameInfo.setName(
Context.DeclarationNames.getCXXDeductionGuideName(Template));
- NameInfo.setLoc(Name.StartLocation);
return NameInfo;
}
case UnqualifiedIdKind::IK_OperatorFunctionId:
NameInfo.setName(Context.DeclarationNames.getCXXOperatorName(
Name.OperatorFunctionId.Operator));
- NameInfo.setLoc(Name.StartLocation);
NameInfo.getInfo().CXXOperatorName.BeginOpNameLoc
= Name.OperatorFunctionId.SymbolLocations[0];
NameInfo.getInfo().CXXOperatorName.EndOpNameLoc
@@ -4993,7 +4990,6 @@ Sema::GetNameFromUnqualifiedId(const Unq
case UnqualifiedIdKind::IK_LiteralOperatorId:
NameInfo.setName(Context.DeclarationNames.getCXXLiteralOperatorName(
Name.Identifier));
- NameInfo.setLoc(Name.StartLocation);
NameInfo.setCXXLiteralOperatorNameLoc(Name.EndLocation);
return NameInfo;
@@ -5004,7 +5000,6 @@ Sema::GetNameFromUnqualifiedId(const Unq
return DeclarationNameInfo();
NameInfo.setName(Context.DeclarationNames.getCXXConversionFunctionName(
Context.getCanonicalType(Ty)));
- NameInfo.setLoc(Name.StartLocation);
NameInfo.setNamedTypeInfo(TInfo);
return NameInfo;
}
@@ -5016,7 +5011,6 @@ Sema::GetNameFromUnqualifiedId(const Unq
return DeclarationNameInfo();
NameInfo.setName(Context.DeclarationNames.getCXXConstructorName(
Context.getCanonicalType(Ty)));
- NameInfo.setLoc(Name.StartLocation);
NameInfo.setNamedTypeInfo(TInfo);
return NameInfo;
}
@@ -5038,7 +5032,6 @@ Sema::GetNameFromUnqualifiedId(const Unq
NameInfo.setName(Context.DeclarationNames.getCXXConstructorName(
Context.getCanonicalType(CurClassType)));
- NameInfo.setLoc(Name.StartLocation);
// FIXME: should we retrieve TypeSourceInfo?
NameInfo.setNamedTypeInfo(nullptr);
return NameInfo;
@@ -5051,7 +5044,6 @@ Sema::GetNameFromUnqualifiedId(const Unq
return DeclarationNameInfo();
NameInfo.setName(Context.DeclarationNames.getCXXDestructorName(
Context.getCanonicalType(Ty)));
- NameInfo.setLoc(Name.StartLocation);
NameInfo.setNamedTypeInfo(TInfo);
return NameInfo;
}
More information about the cfe-commits
mailing list