Fix compiler warnings and turn on warnings as errors

This commit is contained in:
James Cook 2017-06-16 22:40:03 -07:00 committed by Jacob Dufault
parent 6906d9a0f7
commit 5b4986f04b
3 changed files with 9 additions and 2 deletions

View File

@ -403,6 +403,12 @@ optional<lsTextEdit> BuildAutoImplementForFunction(QueryDatabase* db, WorkingFil
break;
}
case SymbolKind::Invalid:
case SymbolKind::File:
case SymbolKind::Type:
std::cerr << "Unexpected SymbolKind "
<< static_cast<int>(sym.idx.kind) << std::endl;
break;
}
}

View File

@ -211,10 +211,10 @@ Project::Entry GetCompilationEntryFromCompileCommandEntry(
return result;
}
/* TODO: Fix this function, it may be way faster than libclang's implementation.
std::vector<Project::Entry> LoadFromCompileCommandsJson(
std::unordered_set<std::string>& quote_includes, std::unordered_set<std::string>& angle_includes,
const std::vector<std::string>& extra_flags, const std::string& project_directory) {
// TODO: Fix this function, it may be way faster than libclang's implementation.
optional<std::string> compile_commands_content = ReadContent(project_directory + "/compile_commands.json");
if (!compile_commands_content)
@ -238,6 +238,7 @@ std::vector<Project::Entry> LoadFromCompileCommandsJson(
}
return result;
}
*/
std::vector<Project::Entry> LoadFromDirectoryListing(
std::unordered_set<std::string>& quote_includes, std::unordered_set<std::string>& angle_includes,

View File

@ -130,7 +130,7 @@ def build(bld):
bld.program(
source=cc_files,
cxxflags=['-g', '-O3', '-std=c++11', '-Wall'],
cxxflags=['-g', '-O3', '-std=c++11', '-Wall', '-Werror'],
includes=[
'third_party/',
'third_party/doctest/',