This revision was automatically updated to reflect the committed changes. Closed by commit rL302162: [test] Name the local variable in the C1XX implementation of DoNotOptmize (authored by CaseyCarter).
Changed prior to commit: https://reviews.llvm.org/D32510?vs=96648&id=97837#toc Repository: rL LLVM https://reviews.llvm.org/D32510 Files: libcxx/trunk/test/support/test_macros.h Index: libcxx/trunk/test/support/test_macros.h =================================================================== --- libcxx/trunk/test/support/test_macros.h +++ libcxx/trunk/test/support/test_macros.h @@ -209,7 +209,8 @@ #include <intrin.h> template <class Tp> inline void DoNotOptimize(Tp const& value) { - const volatile void* volatile = __builtin_addressof(value); + const volatile void* volatile unused = __builtin_addressof(value); + static_cast<void>(unused); _ReadWriteBarrier(); } #endif
Index: libcxx/trunk/test/support/test_macros.h =================================================================== --- libcxx/trunk/test/support/test_macros.h +++ libcxx/trunk/test/support/test_macros.h @@ -209,7 +209,8 @@ #include <intrin.h> template <class Tp> inline void DoNotOptimize(Tp const& value) { - const volatile void* volatile = __builtin_addressof(value); + const volatile void* volatile unused = __builtin_addressof(value); + static_cast<void>(unused); _ReadWriteBarrier(); } #endif
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits