Skip to content
This repository has been archived by the owner on Jul 30, 2020. It is now read-only.

Add unqlite database option #624

Open
wants to merge 121 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
9ddd15f
Experimental unqlite commit
Apr 15, 2018
43ef54d
unqlite: Rebase fixes
Apr 15, 2018
ece5c8b
Interim fixes to the tests
Apr 16, 2018
d2a6058
Do store shutdown on shutdown handler
Apr 16, 2018
37ce2f9
Fix gcc compilation
Apr 17, 2018
08cbc05
- try to limit unqlite memory buffer to 32*1024 pages (=128MiB)
Apr 19, 2018
ee03ee8
Limit in-memory unsaved contents to 128MiB
Apr 19, 2018
d9a6080
rebase and merge
Apr 19, 2018
1e255ab
Make Cache great again
Apr 20, 2018
eee902c
improve error handling
Apr 20, 2018
22d5789
Update to new unqlite version which supposedly fixes memory leaks in …
Apr 28, 2018
7e0eeef
continue directory listing even if broken symlink encountered
Apr 30, 2018
5d4b1d3
Fix LSP json responses for some methods
btolsch Apr 27, 2018
484d0c1
Try to deal with issue #543
jacobdufault May 8, 2018
eac38ba
Fix allowing the user to disable snippets.
jacobdufault May 8, 2018
9fa50c9
Do not append (, < when snippets are disabled
jacobdufault May 8, 2018
aa709dd
Allow disabling diagnostics as you type
jacobdufault May 8, 2018
64b16cc
dropOldRequests config was not added to Config::Completion in 599e2f3…
patilarpith May 8, 2018
29f27a9
ensure_exists should be second predicate in short-circuit evaluation …
May 8, 2018
7daf944
textDocument/implementation provider
jacobdufault May 9, 2018
07ef6d7
Remove $cquery/random.
jacobdufault May 9, 2018
62e9b25
Remove lsLocationEx.
jacobdufault May 9, 2018
5a64a56
Remove client check.
jacobdufault May 9, 2018
e1b4eb3
Inline g_config->xref.maxNum usages
jacobdufault May 9, 2018
8f8fcee
Simplify HashUsr usage.
jacobdufault May 9, 2018
dd96a9f
Remove cquery_derived; use textDocument/implementation instead
jacobdufault May 10, 2018
e5822c5
Remove NTString; fix use-after-free memory
jacobdufault May 10, 2018
3220b39
Remove port.h/cc
jacobdufault May 10, 2018
2d7490d
Remove NormalizedPath
jacobdufault May 10, 2018
6294b51
More AbsolutePath conversions
jacobdufault May 10, 2018
14f055c
Add $cquery/queryDbStatus
jacobdufault May 10, 2018
97244b1
Fix CI
jacobdufault May 10, 2018
f80f2a6
fix error: no member named 'to_string'
xu-cheng May 12, 2018
bdf40b8
Another attempt at fixing #543
jacobdufault May 13, 2018
36630da
Fixed typo '--dirver-mode'
andyleejordan Apr 12, 2018
475c8a2
Fixed warning C4018: '<': signed/unsigned mismatch
andyleejordan May 14, 2018
5b6e9c4
Fixed warning C4146: unary minus operator applied to unsigned type
andyleejordan May 14, 2018
71a6f7a
Fixed warning C4244: '=': conversion from 'int64_t' to 'int'
andyleejordan May 14, 2018
7639d1d
Fixed warning C4273: '__p__environ': inconsistent dll linkage
andyleejordan May 14, 2018
cd1551f
Use `#if defined(...)` over `#ifdef` consistently
andyleejordan May 14, 2018
747504b
Fix potential crash in --check
jacobdufault May 16, 2018
6b6b8d0
Skip highlighting symbols not actually in file
andyleejordan May 15, 2018
af3d199
Update TinyDir to latest release, version 1.2.3
andyleejordan May 15, 2018
88f5390
Blacklist MSVC `/permissive` and PCH compiler flags
andyleejordan Feb 22, 2018
7032743
add FindCompilerType function.
xu-cheng May 6, 2018
ceee1a6
FindSystemIncludeDirectories: only passing -working-directory for clang
xu-cheng May 12, 2018
288a790
Preventing unrecognized flags passed to non Clang compiler
xu-cheng May 12, 2018
1f404a7
Add /D_CRT_SECURE_NO_WARNINGS for MSVC
jacobdufault May 17, 2018
b747d84
Get env from main
jacobdufault May 17, 2018
9e31f2f
Log when we are running --check
jacobdufault May 17, 2018
692ca03
Resource dir can return an empty optional
jacobdufault May 17, 2018
19efb4d
Remove performance.h; it has been unused for a long time
jacobdufault May 17, 2018
a4f8a13
Simplify ThreadedQueue API
jacobdufault May 17, 2018
6de72a3
More threaded_queue API cleanup
jacobdufault May 17, 2018
7e4a19d
Fix build on clang
jacobdufault May 17, 2018
ecd4b49
More threaded_queue cleanup; fix threading bug
jacobdufault May 18, 2018
f5f52c5
Fix large perf regression in project loading
jacobdufault May 18, 2018
1217606
Fix not passing various args to libclang
jacobdufault May 18, 2018
6f4402c
Fix warning
jacobdufault May 18, 2018
50c8122
Return a standards-compliant :textDocument/documentHighlight reply
jaelsasser May 21, 2018
bd6e519
A bit more threaded_queue work
jacobdufault May 24, 2018
7f264a5
Fix enableIndexOnDidChange not using the correct file contents
jacobdufault May 24, 2018
fd240b2
Don't always preload file contents on querydb
jacobdufault May 24, 2018
ce07399
Revert "Don't always preload file contents on querydb"
jacobdufault May 24, 2018
3dadd6f
Fix bad memory usage by partially reverting 2e31ddc3704d0646380b54c82…
jacobdufault May 24, 2018
5b51b2f
Fix enableSnippets setting in initialize message
btolsch May 25, 2018
3cde44f
Do not destroy QueueManager on shutdown.
jacobdufault May 31, 2018
d9e47a9
Don't call new between fork() and execvp().
jacobdufault May 31, 2018
39d81b0
Fix CI
jacobdufault May 31, 2018
55fad2d
Call _exit, not exit, after execvp fails.
jacobdufault Jun 1, 2018
2a9c7ee
Remove code that supports indexing from a completion TU
jacobdufault Jun 1, 2018
8a14830
Whitespace cleanup in CMakeLists.txt
jacobdufault Jun 1, 2018
805bcc1
Check file type in text_document_document_link
jacobdufault Jun 7, 2018
6130f2f
Format
jacobdufault Jun 7, 2018
3c04c08
fix using compilationDatabaseCommand
wberrier Jun 5, 2018
1352c3e
Add config option for disabling formatting
LeszekSwirski Jun 1, 2018
60a04f1
Fix use-after-free error
jacobdufault Jun 7, 2018
07836e5
Import pipeline: remove LoadPreviousIndex step
jacobdufault Jun 7, 2018
816c82e
Move writing index to disk to ParseFile.
jacobdufault Jun 7, 2018
42408f3
Try to avoid preloading file contents on querydb thread
jacobdufault Jun 8, 2018
459dfd4
Do not emit highlight and inactive region unless requested
jacobdufault Jun 7, 2018
4803193
Use std::regex_match
jacobdufault Jun 8, 2018
1072aaf
Better IterationLoop usage
jacobdufault Jun 8, 2018
01faec1
Only free memory when idle
jacobdufault Jun 8, 2018
cc62f22
Index*Id -> IndexFamily::*Id
jacobdufault Jun 14, 2018
0df794a
Remove unused Index/QueryFamily::Range
jacobdufault Jun 14, 2018
85488b1
Remove QueryFileId, QueryTypeId, etc in favor of QueryFamily
jacobdufault Jun 14, 2018
a5940cb
Query/IndexFamily -> Query/IndexId
jacobdufault Jun 18, 2018
baccbca
Format
jacobdufault Jun 18, 2018
cf33651
Id<void> -> AnyId
jacobdufault Jun 18, 2018
f15128e
Small code cleanup
jacobdufault Jun 18, 2018
294bad2
Remove some usage of Use in indexer
jacobdufault Jun 18, 2018
1aecbe3
Add LexicalRef to restore previous Use semantic difference
jacobdufault Jun 18, 2018
f7a4d60
Replace Use with Index/QueryId::LexicalRef
jacobdufault Jun 18, 2018
1370c9e
Rename some local variables
jacobdufault Jun 18, 2018
61752a0
[Fix 569] Blacklist arch flags
ambihelical Jun 12, 2018
667503a
Fixing tests which were failing due to 0038a34
patilarpith Jun 20, 2018
7db2435
c_cpp_properties parsing
Yanpas Jun 18, 2018
bc63e1f
c_cpp_props unit test, separate file
Yanpas Jun 20, 2018
2c89ae9
nits
Yanpas Jun 25, 2018
2bb6834
Add LICENSE
jacobdufault Jun 29, 2018
c03b7a3
Fix incorrect path in diagnostics
jacobdufault Jun 29, 2018
e1d0e07
Pass --target when discovering system includes.
jacobdufault Jun 29, 2018
8754ed4
Add global .cquery file (#702)
Jun 29, 2018
7dc23cb
Fix query unittests
jacobdufault Jun 29, 2018
38bd94e
Add cmake ci flag that enables -Werror or equivalent and enable on CI
DaanDeMeyer Jun 29, 2018
c3ed08c
Disable warning Wunused-function for single line
DaanDeMeyer Jun 29, 2018
301af80
Disable unknown pragma warning
DaanDeMeyer Jun 29, 2018
f71507d
Disable unused function warning at two more lines
DaanDeMeyer Jun 29, 2018
9402751
Deprecate Waf build
DaanDeMeyer Jun 26, 2018
b490a8c
Fix deprecation notice in python 2
DaanDeMeyer Jun 26, 2018
138801d
cmake: Allow -DASSERTS=yes to compile with asserts even in release (#…
jacobdufault Jun 29, 2018
5120478
Do not read .cquery if it is a folder
innerout Jul 1, 2018
9c9ad93
Moved implementation to utils.cc as windows,unix use the same code.
innerout Jul 2, 2018
2fbfca9
Changed IsDirectory call to the correct position
innerout Jul 3, 2018
c4ed7a7
Renamed GetFilesInFolder to GetFilesAndDirectoriesInFolder
innerout Jul 6, 2018
dfedf82
Experimental unqlite commit
Apr 15, 2018
dd11a10
Interim fixes to the tests
Apr 16, 2018
2ff5748
- try to limit unqlite memory buffer to 32*1024 pages (=128MiB)
Apr 19, 2018
5eedc62
after rebasing:
Jul 13, 2018
07d09cd
Fix build after mistakes when rebasing
Jul 13, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ matrix:
fast_finish: true # Immediately finish build if one of the jobs fails.

before_build:
- cmake -DCMAKE_INSTALL_PREFIX=install -DCMAKE_GENERATOR_PLATFORM=x64 .
- cmake -DCI=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_GENERATOR_PLATFORM=x64 .

build:
project: cquery.sln
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ before_install:
- eval "${INSTALL}"

script:
- cmake -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Debug .
- cmake -DCI=ON -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Debug .
- cmake --build . -- -j 3
- cmake --build . --target install
- ./install/bin/cquery --ci --log-all-to-stderr --test-unit
Expand Down
40 changes: 30 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.1)
project(cquery LANGUAGES CXX)
project(cquery LANGUAGES CXX C)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/)
include(DefaultCMakeBuildType)
Expand All @@ -11,6 +11,8 @@ set(CLANG_DOWNLOAD_LOCATION ${CMAKE_BINARY_DIR}
option(SYSTEM_CLANG "Use system installation of Clang instead of \
downloading Clang" OFF)
option(ASAN "Compile with address sanitizers" OFF)
option(ASSERTS "Compile with asserts enabled" OFF)
option(CI "Add -Werror or equivalent" OFF)

# Sources for the executable are specified at end of CMakeLists.txt
add_executable(cquery "")
Expand Down Expand Up @@ -39,6 +41,7 @@ if(MSVC)
target_compile_options(cquery PRIVATE
/nologo
/EHsc
/D_CRT_SECURE_NO_WARNINGS # don't try to use MSVC std replacements
/W3 # roughly -Wall
/wd4996 # disable loguru unsafe warnings
/wd4722 # ignores warning C4722
Expand All @@ -47,13 +50,17 @@ if(MSVC)
# (conversion from 'size_t' to 'type'),
# roughly -Wno-sign-compare
/wd4800
/wd4068 # Disable unknown pragma warning
$<$<CONFIG:Debug>:/FS>
$<$<BOOL:${CI}>:/WX>
)
else()
# Common GCC/Clang(Linux) options
target_compile_options(cquery PRIVATE
-Wall
-Wno-sign-compare
-Wno-unknown-pragmas
$<$<BOOL:${CI}>:-Werror>
)

if(${CMAKE_CXX_COMPILER_ID} STREQUAL GNU)
Expand All @@ -72,6 +79,14 @@ else()
endif()
endif()


# Enable asserts
if(ASSERTS)
string(REPLACE "/DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REPLACE "-DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
endif()


### Download Clang if required

if(NOT SYSTEM_CLANG)
Expand All @@ -87,6 +102,10 @@ endif()

### Libraries

# unqlite
add_subdirectory(third_party/unqlite)
target_link_libraries(cquery PRIVATE unqlite)

# See cmake/FindClang.cmake
find_package(Clang ${CLANG_VERSION} REQUIRED)
target_link_libraries(cquery PRIVATE Clang::Clang)
Expand Down Expand Up @@ -136,11 +155,11 @@ target_include_directories(cquery PRIVATE

install(TARGETS cquery RUNTIME DESTINATION bin)

# If downloaded Clang is used we have to bundle the required files from
# If downloaded Clang is used we have to bundle the required files from
# the downloaded Clang along with the cquery executable
if(NOT SYSTEM_CLANG)

# On Linux/FreeBSD/Darwin we set the rpath so cquery can find
# On Linux/FreeBSD/Darwin we set the rpath so cquery can find
# libclang.[so,dylib]. On Windows we install libclang.dll to the bin directory
# to do the same.

Expand All @@ -151,7 +170,7 @@ if(NOT SYSTEM_CLANG)
set_property(TARGET cquery APPEND PROPERTY
INSTALL_RPATH @loader_path/../lib)
elseif(${CMAKE_SYSTEM_NAME} STREQUAL Windows)
install(FILES ${DOWNLOADED_CLANG_DIR}/bin/libclang.dll DESTINATION bin)
install(FILES ${DOWNLOADED_CLANG_DIR}/bin/libclang.dll DESTINATION bin)
endif()

# Install libclang.[so,lib,dylib] to lib directory
Expand Down Expand Up @@ -194,15 +213,15 @@ if(NOT SYSTEM_CLANG)
# prefix.

file(GLOB CLANG_INCLUDE_DIR ${DOWNLOADED_CLANG_DIR}/lib/clang/*/include)
string(REPLACE ${DOWNLOADED_CLANG_DIR}/ ""
string(REPLACE ${DOWNLOADED_CLANG_DIR}/ ""
CLANG_INCLUDE_DIR ${CLANG_INCLUDE_DIR})

# Add trailing slash to overwrite destination directory instead of putting the
# directory inside the destination directory
install(DIRECTORY ${DOWNLOADED_CLANG_DIR}/${CLANG_INCLUDE_DIR}/
DESTINATION ${CLANG_INCLUDE_DIR})
# include/c++/v1 is not included in every Clang download (Windows) so we check

# include/c++/v1 is not included in every Clang download (Windows) so we check
# if it exists first
if(IS_DIRECTORY ${DOWNLOADED_CLANG_DIR}/include/c++/v1)
install(DIRECTORY ${DOWNLOADED_CLANG_DIR}/include/c++/v1/
Expand Down Expand Up @@ -245,6 +264,7 @@ target_sources(cquery PRIVATE
third_party/pugixml/src/pugixml.cpp)

target_sources(cquery PRIVATE
src/c_cpp_properties.cc
src/cache_manager.cc
src/clang_complete.cc
src/clang_cursor.cc
Expand All @@ -256,6 +276,7 @@ target_sources(cquery PRIVATE
src/clang_utils.cc
src/code_complete_cache.cc
src/command_line.cc
src/compiler.cc
src/diagnostics_engine.cc
src/file_consumer.cc
src/file_contents.cc
Expand All @@ -275,7 +296,6 @@ target_sources(cquery PRIVATE
src/platform_posix.cc
src/platform_win.cc
src/platform.cc
src/port.cc
src/position.cc
src/project.cc
src/query_utils.cc
Expand All @@ -288,6 +308,7 @@ target_sources(cquery PRIVATE
src/task.cc
src/test.cc
src/third_party_impl.cc
src/threaded_queue.cc
src/timer.cc
src/timestamp_manager.cc
src/type_printer.cc
Expand All @@ -299,14 +320,12 @@ target_sources(cquery PRIVATE
src/messages/cquery_base.cc
src/messages/cquery_call_hierarchy.cc
src/messages/cquery_callers.cc
src/messages/cquery_derived.cc
src/messages/cquery_did_view.cc
src/messages/cquery_file_info.cc
src/messages/cquery_freshen_index.cc
src/messages/cquery_index_file.cc
src/messages/cquery_inheritance_hierarchy.cc
src/messages/cquery_member_hierarchy.cc
src/messages/cquery_random.cc
src/messages/cquery_vars.cc
src/messages/cquery_wait.cc
src/messages/exit.cc
Expand All @@ -325,6 +344,7 @@ target_sources(cquery PRIVATE
src/messages/text_document_document_symbol.cc
src/messages/text_document_formatting.cc
src/messages/text_document_hover.cc
src/messages/text_document_implementation.cc
src/messages/text_document_range_formatting.cc
src/messages/text_document_references.cc
src/messages/text_document_rename.cc
Expand Down
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017-2018 Jacob Dufault

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
141 changes: 141 additions & 0 deletions src/c_cpp_properties.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
#include "c_cpp_properties.h"

#include <fstream>
#include <iostream>
#include <regex>

#include <string_view.h>

#include <rapidjson/document.h>
#include <doctest/doctest.h>

#ifdef _WIN32
#define CURRENT_PLATFORM "Win32"
#elif defined(__APPLE__)
#define CURRENT_PLATFORM "Mac"
#else
#define CURRENT_PLATFORM "Linux"
#endif

namespace {

std::string_view kCurrentPlatform = CURRENT_PLATFORM;

optional<CCppProperties> LoadCCppPropertiesFromStr(
const std::string_view filecontent,
const std::string& project_dir) {
CCppProperties res;
res.args.push_back("%clang");
rapidjson::Document document;
document.Parse(filecontent.data());
if (!document.IsObject())
return {};
auto conf_it = document.FindMember("configurations");
if (conf_it == document.MemberEnd())
return {};
if (!conf_it->value.IsArray())
return {};
for (auto& conf : conf_it->value.GetArray()) {
if (!conf.HasMember("name") || conf["name"].GetString() != kCurrentPlatform)
continue;
auto def_it = conf.FindMember("defines");
if (def_it != conf.MemberEnd() && def_it->value.IsArray()) {
for (auto& def : def_it->value.GetArray()) {
res.args.push_back(std::string("-D") + def.GetString());
}
}

auto inc_it = conf.FindMember("includePath");
if (inc_it != conf.MemberEnd() && inc_it->value.IsArray()) {
for (auto& inc : inc_it->value.GetArray()) {
// TODO maybe handle "path/**" ?
auto incpath = std::regex_replace(
std::string(inc.GetString()),
std::regex("\\$\\{workspaceFolder\\}"),
project_dir);
res.args.push_back("-I" + incpath);
}
}

if (res.cStandard.empty() && conf.HasMember("cStandard")) {
res.cStandard = conf["cStandard"].GetString();
res.args.push_back("%c -std=" + res.cStandard);
}
if (res.cppStandard.empty() && conf.HasMember("cppStandard")) {
res.cppStandard = conf["cppStandard"].GetString();
res.args.push_back("%cpp -std=" + res.cppStandard);
}
}

return res;
}

} // namespace

optional<CCppProperties> LoadCCppProperties(
const std::string& json_full_path,
const std::string& project_dir) {
std::ifstream fc_stream(json_full_path);
if (!fc_stream)
return {};
std::string filecontent{ std::istreambuf_iterator<char>(fc_stream),
std::istreambuf_iterator<char>() };
return LoadCCppPropertiesFromStr(filecontent, project_dir);
}


TEST_SUITE("CCppProperties") {
TEST_CASE("basic") {
const char* testjson = R"(
{
"configurations": [
{
"name": ")" CURRENT_PLATFORM R"(",
"browse": {
"path": [
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
},
"includePath": [
"${workspaceFolder}",
"foo",
"${workspaceFolder}/bar"
],
"defines": [
"FOO",
"BAR=1"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c11",
"cppStandard": "c++17",
"intelliSenseMode": "clang-x64"
}
],
"version": 4
})";
auto res = LoadCCppPropertiesFromStr(testjson, "/proj/");
REQUIRE(res.has_value());
CCppProperties& val = res.value();
REQUIRE_EQ(val.cStandard, "c11");
REQUIRE_EQ(val.cppStandard, "c++17");
std::vector<std::string> args{"%clang", "-DFOO", "-DBAR=1", "-I/proj/",
"-Ifoo", "-I/proj//bar", "%c -std=c11", "%cpp -std=c++17"};
bool args_equal = val.args == args;
if (!args_equal) {
if (val.args.size() != args.size()) {
std::cout << "\tval.args size " << val.args.size()
<< " , args size " << args.size() << std::endl;
}
for(size_t i = 0; i < std::min(val.args.size(), args.size()); ++i) {
auto& a1 = val.args[i];
auto& a2 = args[i];
if (a1 != a2) {
std::cout << "\tArg " << a1 << " != " << a2 << std::endl;
}
}
}
REQUIRE(args_equal);
}
}

16 changes: 16 additions & 0 deletions src/c_cpp_properties.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

#include <string>
#include <vector>

#include "optional.h"

struct CCppProperties {
std::string cStandard;
std::string cppStandard;
std::vector<std::string> args;
};

optional<CCppProperties> LoadCCppProperties(
const std::string& json_full_path,
const std::string& project_dir);
Loading