summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2017-07-14 01:42:57 +0000
committerEric Christopher <echristo@gmail.com>2017-07-14 01:42:57 +0000
commit7aba9784c3d8879cb7709113062ec62c72584424 (patch)
tree48444b9966e2dd7bf78f77c991825a5fe44a8900
parentf73870eefa19c9e0e2054c8966853b7d56764934 (diff)
downloadbcm5719-llvm-7aba9784c3d8879cb7709113062ec62c72584424.tar.gz
bcm5719-llvm-7aba9784c3d8879cb7709113062ec62c72584424.zip
Change dyn_casts with unused variables to isa statements to avoid unused variables.
llvm-svn: 307988
-rw-r--r--clang/lib/CodeGen/CGStmtOpenMP.cpp4
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGStmtOpenMP.cpp b/clang/lib/CodeGen/CGStmtOpenMP.cpp
index 50240d45717..8da6fcdfbea 100644
--- a/clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ b/clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -956,7 +956,7 @@ void CodeGenFunction::EmitOMPReductionClauseInit(
auto *LHSVD = cast<VarDecl>(cast<DeclRefExpr>(*ILHS)->getDecl());
auto *RHSVD = cast<VarDecl>(cast<DeclRefExpr>(*IRHS)->getDecl());
- if (auto *OASE = dyn_cast<OMPArraySectionExpr>(IRef)) {
+ if (isa<OMPArraySectionExpr>(IRef)) {
// Store the address of the original variable associated with the LHS
// implicit variable.
PrivateScope.addPrivate(LHSVD, [&RedCG, Count]() -> Address {
@@ -965,7 +965,7 @@ void CodeGenFunction::EmitOMPReductionClauseInit(
PrivateScope.addPrivate(RHSVD, [this, PrivateVD]() -> Address {
return GetAddrOfLocalVar(PrivateVD);
});
- } else if (auto *ASE = dyn_cast<ArraySubscriptExpr>(IRef)) {
+ } else if (isa<ArraySubscriptExpr>(IRef)) {
// Store the address of the original variable associated with the LHS
// implicit variable.
PrivateScope.addPrivate(LHSVD, [&RedCG, Count]() -> Address {
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index 302f24880f6..967573011d0 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -255,7 +255,7 @@ static void DiagnoseObjCImplementedDeprecations(Sema &S, const NamedDecl *ND,
bool IsCategory = false;
AvailabilityResult Availability = ND->getAvailability();
if (Availability != AR_Deprecated) {
- if (const auto *MD = dyn_cast<ObjCMethodDecl>(ND)) {
+ if (isa<ObjCMethodDecl>(ND)) {
if (Availability != AR_Unavailable)
return;
// Warn about implementing unavailable methods.
OpenPOWER on IntegriCloud