[libcxx] r302162 - [test] Name the local variable in the C1XX implementation of DoNotOptmize

Casey Carter via cfe-commits cfe-commits at lists.llvm.org
Thu May 4 08:54:09 PDT 2017


Author: caseycarter
Date: Thu May  4 10:54:09 2017
New Revision: 302162

URL: http://llvm.org/viewvc/llvm-project?rev=302162&view=rev
Log:
[test] Name the local variable in the C1XX implementation of DoNotOptmize

Differential Revision: https://reviews.llvm.org/D32510

Modified:
    libcxx/trunk/test/support/test_macros.h

Modified: libcxx/trunk/test/support/test_macros.h
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/support/test_macros.h?rev=302162&r1=302161&r2=302162&view=diff
==============================================================================
--- libcxx/trunk/test/support/test_macros.h (original)
+++ libcxx/trunk/test/support/test_macros.h Thu May  4 10:54:09 2017
@@ -209,7 +209,8 @@ inline void DoNotOptimize(Tp const& valu
 #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




More information about the cfe-commits mailing list