diff options
| author | Richard Trieu <rtrieu@google.com> | 2017-07-21 21:29:35 +0000 |
|---|---|---|
| committer | Richard Trieu <rtrieu@google.com> | 2017-07-21 21:29:35 +0000 |
| commit | 09f14114c98eca778f71788677efe7965cfb1bd7 (patch) | |
| tree | 3f772f83b3478ee85e3ec84240b4fdc1cdb5ba01 /clang/lib | |
| parent | c0d12bcd68764536072d1798c3033747b4b38962 (diff) | |
| download | bcm5719-llvm-09f14114c98eca778f71788677efe7965cfb1bd7.tar.gz bcm5719-llvm-09f14114c98eca778f71788677efe7965cfb1bd7.zip | |
Inline variable into assert to fix unused warning.
llvm-svn: 308783
Diffstat (limited to 'clang/lib')
| -rw-r--r-- | clang/lib/Sema/SemaOpenMP.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/clang/lib/Sema/SemaOpenMP.cpp b/clang/lib/Sema/SemaOpenMP.cpp index f31581a6189..fd6c1959269 100644 --- a/clang/lib/Sema/SemaOpenMP.cpp +++ b/clang/lib/Sema/SemaOpenMP.cpp @@ -745,9 +745,8 @@ void DSAStackTy::addReductionData(ValueDecl *D, SourceRange SR, BinaryOperatorKind BOK) { D = getCanonicalDecl(D); assert(!isStackEmpty() && "Data-sharing attributes stack is empty"); - auto &Data = Stack.back().first.back().SharingMap[D]; assert( - Data.Attributes == OMPC_reduction && + Stack.back().first.back().SharingMap[D].Attributes == OMPC_reduction && "Additional reduction info may be specified only for reduction items."); auto &ReductionData = Stack.back().first.back().ReductionMap[D]; assert(ReductionData.ReductionRange.isInvalid() && @@ -760,9 +759,8 @@ void DSAStackTy::addReductionData(ValueDecl *D, SourceRange SR, const Expr *ReductionRef) { D = getCanonicalDecl(D); assert(!isStackEmpty() && "Data-sharing attributes stack is empty"); - auto &Data = Stack.back().first.back().SharingMap[D]; assert( - Data.Attributes == OMPC_reduction && + Stack.back().first.back().SharingMap[D].Attributes == OMPC_reduction && "Additional reduction info may be specified only for reduction items."); auto &ReductionData = Stack.back().first.back().ReductionMap[D]; assert(ReductionData.ReductionRange.isInvalid() && |

