Move sideeffecting call out of assert().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158146 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/unittests/Tooling/RewriterTestContext.h b/unittests/Tooling/RewriterTestContext.h
index 9d5b4c9..f68be6b 100644
--- a/unittests/Tooling/RewriterTestContext.h
+++ b/unittests/Tooling/RewriterTestContext.h
@@ -63,8 +63,10 @@
   FileID createOnDiskFile(StringRef Name, StringRef Content) {
     if (TemporaryDirectory.empty()) {
       int FD;
-      assert(!llvm::sys::fs::unique_file("rewriter-test-%%-%%-%%-%%/anchor",
-                                         FD, TemporaryDirectory));
+      bool error =
+        llvm::sys::fs::unique_file("rewriter-test-%%-%%-%%-%%/anchor", FD,
+                                   TemporaryDirectory);
+      assert(!error); (void)error;
       llvm::raw_fd_ostream Closer(FD, /*shouldClose=*/true);
       TemporaryDirectory = llvm::sys::path::parent_path(TemporaryDirectory);
     }