diff --git a/cpp/ycm/ClangCompleter/ClangUtils.cpp b/cpp/ycm/ClangCompleter/ClangUtils.cpp index 14fcf48a..70f571d9 100644 --- a/cpp/ycm/ClangCompleter/ClangUtils.cpp +++ b/cpp/ycm/ClangCompleter/ClangUtils.cpp @@ -35,7 +35,9 @@ std::vector< CXUnsavedFile > ToCXUnsavedFiles( std::vector< CXUnsavedFile > clang_unsaved_files( unsaved_files.size() ); for ( uint i = 0; i < unsaved_files.size(); ++i ) { - // TODO: assert non-null + X_VERIFY( unsaved_files[ i ].filename_ ); + X_VERIFY( unsaved_files[ i ].contents_ ); + X_VERIFY( unsaved_files[ i ].length_ ); clang_unsaved_files[ i ].Filename = unsaved_files[ i ].filename_; clang_unsaved_files[ i ].Contents = unsaved_files[ i ].contents_; clang_unsaved_files[ i ].Length = unsaved_files[ i ].length_;