Small tweaks

This commit is contained in:
Jacob Dufault 2017-04-14 15:30:33 -07:00
parent 031c0c2011
commit 8f1e517c0a
7 changed files with 17 additions and 8 deletions

2
.gitignore vendored
View File

@ -3,7 +3,7 @@ Debug
x64 x64
build build
libcxx libcxx
CACHE CACHE*
waf-* waf-*
.lock-waf* .lock-waf*
.waf* .waf*

View File

@ -1234,7 +1234,7 @@ void QueryDbMainLoop(
std::cerr << "- Considering " << db->qualified_names.size() std::cerr << "- Considering " << db->qualified_names.size()
<< " candidates " << std::endl; << " candidates for query " << msg->params.query << std::endl;
std::string query = msg->params.query; std::string query = msg->params.query;
for (int i = 0; i < db->qualified_names.size(); ++i) { for (int i = 0; i < db->qualified_names.size(); ++i) {

View File

@ -14,11 +14,12 @@
#include <rapidjson/document.h> #include <rapidjson/document.h>
#include <algorithm> #include <algorithm>
#include <iostream>
#include <cstdint> #include <cstdint>
#include <cassert> #include <cassert>
#include <fstream> #include <fstream>
#include <iostream>
#include <unordered_map> #include <unordered_map>
#include <vector>
struct IndexedTypeDef; struct IndexedTypeDef;
struct IndexedFuncDef; struct IndexedFuncDef;
@ -84,7 +85,7 @@ struct Ref {
} }
bool operator!=(const Ref<T>& other) { return !(*this == other); } bool operator!=(const Ref<T>& other) { return !(*this == other); }
bool operator<(const Ref<T>& other) const { bool operator<(const Ref<T>& other) const {
return id < other.id && loc < other.loc; return id_ < other.id && loc < other.loc;
} }
}; };

View File

@ -172,10 +172,14 @@ std::vector<CompilationEntry> LoadCompilationEntriesFromDirectory(const std::str
} }
entry.args.push_back(arg); entry.args.push_back(arg);
//if (StartsWith(arg, "-I") || StartsWith(arg, "-D") || StartsWith(arg, "-std")) //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); result.push_back(entry);
} }

View File

@ -44,7 +44,7 @@ public:
auto val = std::move(queue_.front()); auto val = std::move(queue_.front());
queue_.pop(); queue_.pop();
return val; return std::move(val);
} }
private: private:

View File

@ -1,5 +1,6 @@
#pragma once #pragma once
#include <algorithm>
#include <functional> #include <functional>
#include <memory> #include <memory>
#include <queue> #include <queue>

View File

@ -85,7 +85,10 @@ def build(bld):
print('CLANG_LIB_DIR: {0}'.format(CLANG_LIB_DIR)) print('CLANG_LIB_DIR: {0}'.format(CLANG_LIB_DIR))
cc_files = bld.path.ant_glob(['**/*.cpp', '**/*.cc'], cc_files = bld.path.ant_glob(['**/*.cpp', '**/*.cc'],
excl=['libcxx/*', '*tests/*', 'third_party/*']) excl=['foo/*',
'libcxx/*',
'*tests/*',
'third_party/*'])
lib = ['clang'] lib = ['clang']
if sys.platform == 'linux' or sys.platform == 'linux2': if sys.platform == 'linux' or sys.platform == 'linux2':
@ -96,7 +99,7 @@ def build(bld):
bld.program( bld.program(
source=cc_files, source=cc_files,
cxxflags=['-O3', '-std=c++11', '-Wall'], cxxflags=['-g', '-O3', '-std=c++11', '-Wall'],
includes=[ includes=[
'third_party/', 'third_party/',
'third_party/doctest/', 'third_party/doctest/',