From 8f1e517c0a41e2c4e48f86c60b1f397b6b11e1a9 Mon Sep 17 00:00:00 2001 From: Jacob Dufault Date: Fri, 14 Apr 2017 15:30:33 -0700 Subject: [PATCH] Small tweaks --- .gitignore | 2 +- src/command_line.cc | 2 +- src/indexer.h | 5 +++-- src/project.cc | 6 +++++- src/threaded_queue.h | 2 +- src/utils.h | 1 + wscript | 7 +++++-- 7 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 4b8f6084..d430a1da 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,7 @@ Debug x64 build libcxx -CACHE +CACHE* waf-* .lock-waf* .waf* diff --git a/src/command_line.cc b/src/command_line.cc index d2ad6982..a5e66de9 100644 --- a/src/command_line.cc +++ b/src/command_line.cc @@ -1234,7 +1234,7 @@ void QueryDbMainLoop( std::cerr << "- Considering " << db->qualified_names.size() - << " candidates " << std::endl; + << " candidates for query " << msg->params.query << std::endl; std::string query = msg->params.query; for (int i = 0; i < db->qualified_names.size(); ++i) { diff --git a/src/indexer.h b/src/indexer.h index accc2099..1bf210c2 100644 --- a/src/indexer.h +++ b/src/indexer.h @@ -14,11 +14,12 @@ #include #include -#include #include #include #include +#include #include +#include struct IndexedTypeDef; struct IndexedFuncDef; @@ -84,7 +85,7 @@ struct Ref { } bool operator!=(const Ref& other) { return !(*this == other); } bool operator<(const Ref& other) const { - return id < other.id && loc < other.loc; + return id_ < other.id && loc < other.loc; } }; diff --git a/src/project.cc b/src/project.cc index c63cc601..50122677 100644 --- a/src/project.cc +++ b/src/project.cc @@ -172,10 +172,14 @@ std::vector LoadCompilationEntriesFromDirectory(const std::str } entry.args.push_back(arg); - //if (StartsWith(arg, "-I") || StartsWith(arg, "-D") || StartsWith(arg, "-std")) } + // TODO/fixme + entry.args.push_back("-xc++"); + entry.args.push_back("-std=c++11"); + + result.push_back(entry); } diff --git a/src/threaded_queue.h b/src/threaded_queue.h index ac59bb9d..c8f412fd 100644 --- a/src/threaded_queue.h +++ b/src/threaded_queue.h @@ -44,7 +44,7 @@ public: auto val = std::move(queue_.front()); queue_.pop(); - return val; + return std::move(val); } private: diff --git a/src/utils.h b/src/utils.h index da37f89f..b7f9647a 100644 --- a/src/utils.h +++ b/src/utils.h @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include diff --git a/wscript b/wscript index d00e01fa..a3b95f59 100644 --- a/wscript +++ b/wscript @@ -85,7 +85,10 @@ def build(bld): print('CLANG_LIB_DIR: {0}'.format(CLANG_LIB_DIR)) cc_files = bld.path.ant_glob(['**/*.cpp', '**/*.cc'], - excl=['libcxx/*', '*tests/*', 'third_party/*']) + excl=['foo/*', + 'libcxx/*', + '*tests/*', + 'third_party/*']) lib = ['clang'] if sys.platform == 'linux' or sys.platform == 'linux2': @@ -96,7 +99,7 @@ def build(bld): bld.program( source=cc_files, - cxxflags=['-O3', '-std=c++11', '-Wall'], + cxxflags=['-g', '-O3', '-std=c++11', '-Wall'], includes=[ 'third_party/', 'third_party/doctest/',