Small nits

This commit is contained in:
Jacob Dufault 2017-05-21 00:56:21 -07:00
parent 3fe824e208
commit a058eb8e95
2 changed files with 9 additions and 10 deletions

View File

@ -7,7 +7,6 @@
-IC:/Users/jacob/Desktop/superindex/indexer/third_party
-IC:/Users/jacob/Desktop/superindex/indexer/third_party/doctest
-IC:/Users/jacob/Desktop/superindex/indexer/third_party/rapidjson/include
-IC:/Users/jacob/Desktop/superindex/indexer/third_party/sparsehash/src
-IC:/Users/jacob/Desktop/superindex/indexer/third_party/sparsepp
-IC:/Program Files/LLVM/include
-IC:/Program Files (x86)/Windows Kits/10/Include/10.0.14393.0
@ -15,11 +14,11 @@
# OSX
#-I/Users/jdufault/Personal/super-clang-index/third_party
#-I/Users/jdufault/Personal/super-clang-index/third_party/doctest
#-I/Users/jdufault/Personal/super-clang-index/third_party/rapidjson/include
#-I/Users/jdufault/Personal/super-clang-index/third_party/sparsehash/src
#-I/Users/jdufault/Personal/super-clang-index/build/clang+llvm-4.0.0-x86_64-apple-darwin/include
-I/Users/jdufault/personal/cquery/third_party
-I/Users/jdufault/personal/cquery/third_party/doctest
-I/Users/jdufault/personal/cquery/third_party/rapidjson/include
-I/Users/jdufault/personal/cquery/third_party/sparsepp
-I/Users/jdufault/personal/cquery/build/clang+llvm-4.0.0-x86_64-apple-darwin/include
# Use libcxx
#-stdlib=libc++
@ -40,4 +39,4 @@
#-L<libcxx-install-prefix>/lib \
#-Wl,-rpath,<libcxx-install-prefix>/lib \
#-I<libcxx-install-prefix>/include/c++/v1 \
#-I<libcxx-install-prefix>/include/c++/v1 \

View File

@ -691,7 +691,7 @@ void QueryDatabase::ImportOrUpdate(const std::vector<QueryType::DefUpdate>& upda
auto it = usr_to_type.find(def.usr);
assert(it != usr_to_type.end());
assert(it->second.id >= 0 && it->second.id < types.size());
optional<QueryType>& existing = types[it->second.id];
if (!existing)
@ -820,7 +820,7 @@ TEST_CASE("type usages") {
ct->uses.push_back(Range(Position(2, 0)));
IndexUpdate update = GetDelta(previous, current);
REQUIRE(update.types_removed == std::vector<Usr>{});
REQUIRE(update.types_def_update == std::vector<QueryType::DefUpdate>{});
REQUIRE(update.types_uses.size() == 1);
@ -848,7 +848,7 @@ TEST_CASE("apply delta") {
IndexUpdate import_update = IndexUpdate::CreateDelta(nullptr, &previous_map, nullptr, &previous);
IndexUpdate delta_update = IndexUpdate::CreateDelta(&previous_map, &current_map, &previous, &current);
db.ApplyIndexUpdate(&import_update);
REQUIRE(db.funcs[0]->callers.size() == 2);
REQUIRE(db.funcs[0]->callers[0].loc.range == Range(Position(1, 0)));