diff --git a/tools/libclang/CIndex.cpp b/tools/libclang/CIndex.cpp
index babfc3adea875cd92915110059f3aa68b3e93605..d8cca44a0ea0e86ca59a0742b29c563dd4159077 100644
--- a/tools/libclang/CIndex.cpp
+++ b/tools/libclang/CIndex.cpp
@@ -2821,6 +2821,7 @@ clang_parseTranslationUnit(CXIndex CIdx,
   enum CXErrorCode Result = clang_parseTranslationUnit2(
       CIdx, source_filename, command_line_args, num_command_line_args,
       unsaved_files, num_unsaved_files, options, &TU);
+  (void)Result;
   assert((TU && Result == CXError_Success) ||
          (!TU && Result != CXError_Success));
   return TU;