mirror of
https://github.com/MaskRay/ccls.git
synced 2024-11-26 01:21:57 +00:00
Fix compiler warnings and turn on warnings as errors
This commit is contained in:
parent
6906d9a0f7
commit
5b4986f04b
@ -403,6 +403,12 @@ optional<lsTextEdit> BuildAutoImplementForFunction(QueryDatabase* db, WorkingFil
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SymbolKind::Invalid:
|
||||||
|
case SymbolKind::File:
|
||||||
|
case SymbolKind::Type:
|
||||||
|
std::cerr << "Unexpected SymbolKind "
|
||||||
|
<< static_cast<int>(sym.idx.kind) << std::endl;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -211,10 +211,10 @@ Project::Entry GetCompilationEntryFromCompileCommandEntry(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* TODO: Fix this function, it may be way faster than libclang's implementation.
|
||||||
std::vector<Project::Entry> LoadFromCompileCommandsJson(
|
std::vector<Project::Entry> LoadFromCompileCommandsJson(
|
||||||
std::unordered_set<std::string>& quote_includes, std::unordered_set<std::string>& angle_includes,
|
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) {
|
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");
|
optional<std::string> compile_commands_content = ReadContent(project_directory + "/compile_commands.json");
|
||||||
if (!compile_commands_content)
|
if (!compile_commands_content)
|
||||||
@ -238,6 +238,7 @@ std::vector<Project::Entry> LoadFromCompileCommandsJson(
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
std::vector<Project::Entry> LoadFromDirectoryListing(
|
std::vector<Project::Entry> LoadFromDirectoryListing(
|
||||||
std::unordered_set<std::string>& quote_includes, std::unordered_set<std::string>& angle_includes,
|
std::unordered_set<std::string>& quote_includes, std::unordered_set<std::string>& angle_includes,
|
||||||
|
2
wscript
2
wscript
@ -130,7 +130,7 @@ def build(bld):
|
|||||||
|
|
||||||
bld.program(
|
bld.program(
|
||||||
source=cc_files,
|
source=cc_files,
|
||||||
cxxflags=['-g', '-O3', '-std=c++11', '-Wall'],
|
cxxflags=['-g', '-O3', '-std=c++11', '-Wall', '-Werror'],
|
||||||
includes=[
|
includes=[
|
||||||
'third_party/',
|
'third_party/',
|
||||||
'third_party/doctest/',
|
'third_party/doctest/',
|
||||||
|
Loading…
Reference in New Issue
Block a user