Update copyright notices

This commit is contained in:
Jonathan Müller 2022-02-07 20:43:22 +01:00
commit 62e571a4d6
133 changed files with 936 additions and 1103 deletions

View file

@ -1,5 +1,5 @@
# Copyright (C) 2017-2018 Jonathan Müller <jonathanmueller.dev@gmail.com> # Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
# This file is subject to the license terms in the LICENSE file # SPDX-License-Identifier: MIT
# found in the top-level directory of this distribution. # found in the top-level directory of this distribution.
cmake_minimum_required(VERSION 3.11) cmake_minimum_required(VERSION 3.11)

View file

@ -1,5 +1,5 @@
# Copyright (C) 2017-2018 Jonathan Müller <jonathanmueller.dev@gmail.com> # Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
# This file is subject to the license terms in the LICENSE file # SPDX-License-Identifier: MIT
# found in the top-level directory of this distribution. # found in the top-level directory of this distribution.
function(_cppast_example name) function(_cppast_example name)

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
/// \file /// \file
/// This is a very primitive version of the cppast tool. /// This is a very primitive version of the cppast tool.

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
/// \file /// \file
/// Generate equality comparisons. /// Generate equality comparisons.
@ -80,48 +79,46 @@ void generate_op_non_equal(std::ostream& out, const cppast::cpp_class& c)
// generate comparison operators for all classes in the file // generate comparison operators for all classes in the file
void generate_comparison(const cppast::cpp_file& file) void generate_comparison(const cppast::cpp_file& file)
{ {
cppast::visit(file, cppast::visit(
[](const cppast::cpp_entity& e) { file,
// only visit non-templated class definitions that have the attribute set [](const cppast::cpp_entity& e) {
return (!cppast::is_templated(e) // only visit non-templated class definitions that have the attribute set
&& e.kind() == cppast::cpp_entity_kind::class_t return (!cppast::is_templated(e) && e.kind() == cppast::cpp_entity_kind::class_t
&& cppast::is_definition(e) && cppast::is_definition(e) && cppast::has_attribute(e, "generate::comparison"))
&& cppast::has_attribute(e, "generate::comparison")) // or all namespaces
// or all namespaces || e.kind() == cppast::cpp_entity_kind::namespace_t;
|| e.kind() == cppast::cpp_entity_kind::namespace_t; },
}, [](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
[](const cppast::cpp_entity& e, const cppast::visitor_info& info) { if (e.kind() == cppast::cpp_entity_kind::class_t && !info.is_old_entity())
if (e.kind() == cppast::cpp_entity_kind::class_t && !info.is_old_entity()) {
{ // it is a new class
// it is a new class auto& class_ = static_cast<const cppast::cpp_class&>(e);
auto& class_ = static_cast<const cppast::cpp_class&>(e); auto& attribute = cppast::has_attribute(e, "generate::comparison").value();
auto& attribute
= cppast::has_attribute(e, "generate::comparison").value();
// generate requested operators // generate requested operators
if (attribute.arguments()) if (attribute.arguments())
{ {
if (has_token(attribute.arguments().value(), "==")) if (has_token(attribute.arguments().value(), "=="))
generate_op_equal(std::cout, class_); generate_op_equal(std::cout, class_);
if (has_token(attribute.arguments().value(), "!=")) if (has_token(attribute.arguments().value(), "!="))
generate_op_non_equal(std::cout, class_); generate_op_non_equal(std::cout, class_);
} }
else else
{ {
generate_op_equal(std::cout, class_); generate_op_equal(std::cout, class_);
generate_op_non_equal(std::cout, class_); generate_op_non_equal(std::cout, class_);
} }
} }
else if (e.kind() == cppast::cpp_entity_kind::namespace_t) else if (e.kind() == cppast::cpp_entity_kind::namespace_t)
{ {
if (info.event == cppast::visitor_info::container_entity_enter) if (info.event == cppast::visitor_info::container_entity_enter)
// open namespace // open namespace
std::cout << "namespace " << e.name() << " {\n\n"; std::cout << "namespace " << e.name() << " {\n\n";
else // if (info.event == cppast::visitor_info::container_entity_exit) else // if (info.event == cppast::visitor_info::container_entity_exit)
// close namespace // close namespace
std::cout << "}\n"; std::cout << "}\n";
} }
}); });
} }
int main(int argc, char* argv[]) int main(int argc, char* argv[])

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
/// \file /// \file
/// A primitive documentation generator. /// A primitive documentation generator.
@ -120,39 +119,39 @@ std::string generate_synopsis(const cppast::cpp_entity& e)
void generate_documentation(const cppast::cpp_file& file) void generate_documentation(const cppast::cpp_file& file)
{ {
// visit each entity // visit each entity
cppast::visit(file, cppast::visit(
[](const cppast::cpp_entity& e, cppast::cpp_access_specifier_kind access) { file,
if (is_excluded_documentation(e, access)) [](const cppast::cpp_entity& e, cppast::cpp_access_specifier_kind access) {
// exclude this and all children if (is_excluded_documentation(e, access))
return cppast::visit_filter::exclude_and_children; // exclude this and all children
else if (cppast::is_templated(e) || cppast::is_friended(e)) return cppast::visit_filter::exclude_and_children;
// continue on with children for a dummy entity else if (cppast::is_templated(e) || cppast::is_friended(e))
return cppast::visit_filter::exclude; // continue on with children for a dummy entity
else return cppast::visit_filter::exclude;
return cppast::visit_filter::include; else
}, return cppast::visit_filter::include;
[](const cppast::cpp_entity& e, const cppast::visitor_info& info) { },
if (info.is_old_entity()) [](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
// already done if (info.is_old_entity())
return; // already done
return;
// print name // print name
std::cout << "## " << cppast::to_string(e.kind()) << " '" << e.name() std::cout << "## " << cppast::to_string(e.kind()) << " '" << e.name() << "'\n";
<< "'\n"; std::cout << '\n';
std::cout << '\n';
// print synopsis // print synopsis
std::cout << "```\n"; std::cout << "```\n";
std::cout << generate_synopsis(e); std::cout << generate_synopsis(e);
std::cout << "```\n\n"; std::cout << "```\n\n";
// print documentation comment // print documentation comment
if (e.comment()) if (e.comment())
std::cout << e.comment().value() << '\n'; std::cout << e.comment().value() << '\n';
// print separator // print separator
std::cout << "\n---\n\n"; std::cout << "\n---\n\n";
}); });
std::cout << "\n\n"; std::cout << "\n\n";
} }

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
/// \file /// \file
/// Generates enum category functions. /// Generates enum category functions.
@ -55,68 +54,67 @@ const cppast::cpp_enum& get_enum(const cppast::cpp_entity_index& index,
// generates the function definitions // generates the function definitions
void generate_enum_category(const cppast::cpp_entity_index& index, const cppast::cpp_file& file) void generate_enum_category(const cppast::cpp_entity_index& index, const cppast::cpp_file& file)
{ {
cppast::visit(file, cppast::visit(
[](const cppast::cpp_entity& e) { file,
// only visit function declarations that have the attribute set [](const cppast::cpp_entity& e) {
return (e.kind() == cppast::cpp_entity_kind::function_t // only visit function declarations that have the attribute set
&& !cppast::is_definition(e) return (e.kind() == cppast::cpp_entity_kind::function_t && !cppast::is_definition(e)
&& cppast::has_attribute(e, "generate::enum_category")) && cppast::has_attribute(e, "generate::enum_category"))
// or all namespaces // or all namespaces
|| e.kind() == cppast::cpp_entity_kind::namespace_t; || e.kind() == cppast::cpp_entity_kind::namespace_t;
}, },
[&](const cppast::cpp_entity& e, const cppast::visitor_info& info) { [&](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
if (e.kind() == cppast::cpp_entity_kind::function_t) if (e.kind() == cppast::cpp_entity_kind::function_t)
{ {
// a new function, generate implementation // a new function, generate implementation
assert(info.is_new_entity()); assert(info.is_new_entity());
auto category = cppast::has_attribute(e, "generate::enum_category") auto category = cppast::has_attribute(e, "generate::enum_category")
.value() .value()
.arguments() .arguments()
.value() .value()
.as_string(); .as_string();
auto& func = static_cast<const cppast::cpp_function&>(e); auto& func = static_cast<const cppast::cpp_function&>(e);
// return type must be bool // return type must be bool
assert(func.return_type().kind() == cppast::cpp_type_kind::builtin_t assert(func.return_type().kind() == cppast::cpp_type_kind::builtin_t
&& static_cast<const cppast::cpp_builtin_type&>(func.return_type()) && static_cast<const cppast::cpp_builtin_type&>(func.return_type())
.builtin_type_kind() .builtin_type_kind()
== cppast::cpp_bool); == cppast::cpp_bool);
// single parameter... // single parameter...
assert(std::next(func.parameters().begin()) == func.parameters().end()); assert(std::next(func.parameters().begin()) == func.parameters().end());
auto& param = *func.parameters().begin(); auto& param = *func.parameters().begin();
auto& enum_ = get_enum(index, param); auto& enum_ = get_enum(index, param);
// generate function definition // generate function definition
std::cout << "inline bool " << func.name() << "(" std::cout << "inline bool " << func.name() << "(" << cppast::to_string(param.type())
<< cppast::to_string(param.type()) << " e) {\n"; << " e) {\n";
// generate switch // generate switch
std::cout << " switch (e) {\n"; std::cout << " switch (e) {\n";
for (const auto& enumerator : enum_) for (const auto& enumerator : enum_)
{ {
std::cout << " case " << enum_.name() << "::" << enumerator.name() std::cout << " case " << enum_.name() << "::" << enumerator.name() << ":\n";
<< ":\n"; if (is_category(enumerator, category))
if (is_category(enumerator, category)) std::cout << " return true;\n";
std::cout << " return true;\n"; else
else std::cout << " return false;\n";
std::cout << " return false;\n"; }
} std::cout << " }\n";
std::cout << " }\n";
std::cout << "}\n\n"; std::cout << "}\n\n";
} }
else if (e.kind() == cppast::cpp_entity_kind::namespace_t) else if (e.kind() == cppast::cpp_entity_kind::namespace_t)
{ {
if (info.event == cppast::visitor_info::container_entity_enter) if (info.event == cppast::visitor_info::container_entity_enter)
// open namespace // open namespace
std::cout << "namespace " << e.name() << " {\n\n"; std::cout << "namespace " << e.name() << " {\n\n";
else // if (info.event == cppast::visitor_info::container_entity_exit) else // if (info.event == cppast::visitor_info::container_entity_exit)
// close namespace // close namespace
std::cout << "}\n"; std::cout << "}\n";
} }
}); });
} }
int main(int argc, char* argv[]) int main(int argc, char* argv[])

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
/// \file /// \file
/// Generates enum `to_string()` code. /// Generates enum `to_string()` code.
@ -17,55 +16,51 @@
void generate_to_string(const cppast::cpp_file& file) void generate_to_string(const cppast::cpp_file& file)
{ {
cppast::visit(file, cppast::visit(
[](const cppast::cpp_entity& e) { file,
// only visit enum definitions that have the attribute set [](const cppast::cpp_entity& e) {
return (e.kind() == cppast::cpp_entity_kind::enum_t // only visit enum definitions that have the attribute set
&& cppast::is_definition(e) return (e.kind() == cppast::cpp_entity_kind::enum_t && cppast::is_definition(e)
&& cppast::has_attribute(e, "generate::to_string")) && cppast::has_attribute(e, "generate::to_string"))
// or all namespaces // or all namespaces
|| e.kind() == cppast::cpp_entity_kind::namespace_t; || e.kind() == cppast::cpp_entity_kind::namespace_t;
}, },
[](const cppast::cpp_entity& e, const cppast::visitor_info& info) { [](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
if (e.kind() == cppast::cpp_entity_kind::enum_t && !info.is_old_entity()) if (e.kind() == cppast::cpp_entity_kind::enum_t && !info.is_old_entity())
{ {
// a new enum, generate to string function // a new enum, generate to string function
auto& enum_ = static_cast<const cppast::cpp_enum&>(e); auto& enum_ = static_cast<const cppast::cpp_enum&>(e);
// write function header // write function header
std::cout << "inline const char* to_string(const " << enum_.name() std::cout << "inline const char* to_string(const " << enum_.name() << "& e) {\n";
<< "& e) {\n";
// generate switch // generate switch
std::cout << " switch (e) {\n"; std::cout << " switch (e) {\n";
for (const auto& enumerator : enum_) for (const auto& enumerator : enum_)
{ {
std::cout << " case " << enum_.name() << "::" << enumerator.name() std::cout << " case " << enum_.name() << "::" << enumerator.name() << ":\n";
<< ":\n";
// attribute can be used to override the string // attribute can be used to override the string
if (auto attr if (auto attr = cppast::has_attribute(enumerator, "generate::to_string"))
= cppast::has_attribute(enumerator, "generate::to_string")) std::cout << " return " << attr.value().arguments().value().as_string()
std::cout << " return " << ";\n";
<< attr.value().arguments().value().as_string() else
<< ";\n"; std::cout << " return \"" << enumerator.name() << "\";\n";
else }
std::cout << " return \"" << enumerator.name() << "\";\n"; std::cout << " }\n";
}
std::cout << " }\n";
std::cout << "}\n\n"; std::cout << "}\n\n";
} }
else if (e.kind() == cppast::cpp_entity_kind::namespace_t) else if (e.kind() == cppast::cpp_entity_kind::namespace_t)
{ {
if (info.event == cppast::visitor_info::container_entity_enter) if (info.event == cppast::visitor_info::container_entity_enter)
// open namespace // open namespace
std::cout << "namespace " << e.name() << " {\n\n"; std::cout << "namespace " << e.name() << " {\n\n";
else // if (info.event == cppast::visitor_info::container_entity_exit) else // if (info.event == cppast::visitor_info::container_entity_exit)
// close namespace // close namespace
std::cout << "}\n"; std::cout << "}\n";
} }
}); });
} }
int main(int argc, char* argv[]) int main(int argc, char* argv[])

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_EXAMPLE_PARSER_HPP_INCLUDED #ifndef CPPAST_EXAMPLE_PARSER_HPP_INCLUDED
#define CPPAST_EXAMPLE_PARSER_HPP_INCLUDED #define CPPAST_EXAMPLE_PARSER_HPP_INCLUDED
@ -13,7 +12,8 @@
// parses all files in that directory // parses all files in that directory
// and invokes the callback for each of them // and invokes the callback for each of them
template <typename Callback> template <typename Callback>
int example_main(int argc, char* argv[], const cppast::cpp_entity_index& index, Callback cb) try int example_main(int argc, char* argv[], const cppast::cpp_entity_index& index, Callback cb)
try
{ {
if (argc != 2) if (argc != 2)
{ {

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
/// \file /// \file
/// Serialization code generation. /// Serialization code generation.
@ -69,52 +68,50 @@ void generate_serialize_member(std::ostream& out, const cppast::cpp_member_varia
// generate serialization function // generate serialization function
void generate_serialize(const cppast::cpp_file& file) void generate_serialize(const cppast::cpp_file& file)
{ {
cppast::visit(file, cppast::visit(
[](const cppast::cpp_entity& e) { file,
// only visit non-templated class definitions that have the attribute set [](const cppast::cpp_entity& e) {
return (!cppast::is_templated(e) // only visit non-templated class definitions that have the attribute set
&& e.kind() == cppast::cpp_entity_kind::class_t return (!cppast::is_templated(e) && e.kind() == cppast::cpp_entity_kind::class_t
&& cppast::is_definition(e) && cppast::is_definition(e) && cppast::has_attribute(e, "generate::serialize"))
&& cppast::has_attribute(e, "generate::serialize")) // or all namespaces
// or all namespaces || e.kind() == cppast::cpp_entity_kind::namespace_t;
|| e.kind() == cppast::cpp_entity_kind::namespace_t; },
}, [](const cppast::cpp_entity& e, const cppast::visitor_info& info) {
[](const cppast::cpp_entity& e, const cppast::visitor_info& info) { if (e.kind() == cppast::cpp_entity_kind::class_t && !info.is_old_entity())
if (e.kind() == cppast::cpp_entity_kind::class_t && !info.is_old_entity()) {
{ auto& class_ = static_cast<const cppast::cpp_class&>(e);
auto& class_ = static_cast<const cppast::cpp_class&>(e);
std::cout << "inline void serialize(const foo::serializer& s, const " std::cout << "inline void serialize(const foo::serializer& s, const "
<< class_.name() << "& obj) {\n"; << class_.name() << "& obj) {\n";
// serialize base classes // serialize base classes
for (auto& base : class_.bases()) for (auto& base : class_.bases())
if (!cppast::has_attribute(base, "generate::transient")) if (!cppast::has_attribute(base, "generate::transient"))
std::cout << " serialize(s, static_cast<const " << base.name() std::cout << " serialize(s, static_cast<const " << base.name()
<< "&>(obj));\n"; << "&>(obj));\n";
// serialize member variables // serialize member variables
for (auto& member : class_) for (auto& member : class_)
{ {
if (member.kind() == cppast::cpp_entity_kind::member_variable_t) if (member.kind() == cppast::cpp_entity_kind::member_variable_t)
generate_serialize_member(std::cout, generate_serialize_member(std::cout,
static_cast< static_cast<const cppast::cpp_member_variable&>(
const cppast::cpp_member_variable&>( member));
member)); }
}
std::cout << "}\n\n"; std::cout << "}\n\n";
} }
else if (e.kind() == cppast::cpp_entity_kind::namespace_t) else if (e.kind() == cppast::cpp_entity_kind::namespace_t)
{ {
if (info.event == cppast::visitor_info::container_entity_enter) if (info.event == cppast::visitor_info::container_entity_enter)
// open namespace // open namespace
std::cout << "namespace " << e.name() << " {\n\n"; std::cout << "namespace " << e.name() << " {\n\n";
else // if (info.event == cppast::visitor_info::container_entity_exit) else // if (info.event == cppast::visitor_info::container_entity_exit)
// close namespace // close namespace
std::cout << "}\n"; std::cout << "}\n";
} }
}); });
} }
int main(int argc, char* argv[]) int main(int argc, char* argv[])

View file

@ -1,5 +1,5 @@
# Copyright (C) 2017 Jonathan Müller <jonathanmueller.dev@gmail.com> # Copyright (C) 2017 Jonathan Müller <jonathanmueller.dev@gmail.com>
# This file is subject to the license terms in the LICENSE file # SPDX-License-Identifier: MIT
# found in the top-level directory of this distribution. # found in the top-level directory of this distribution.
include(FetchContent) include(FetchContent)

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CODE_GENERATOR_HPP_INCLUDED #ifndef CPPAST_CODE_GENERATOR_HPP_INCLUDED
#define CPPAST_CODE_GENERATOR_HPP_INCLUDED #define CPPAST_CODE_GENERATOR_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_COMPILE_CONFIG_HPP_INCLUDED #ifndef CPPAST_COMPILE_CONFIG_HPP_INCLUDED
#define CPPAST_COMPILE_CONFIG_HPP_INCLUDED #define CPPAST_COMPILE_CONFIG_HPP_INCLUDED
@ -11,8 +10,8 @@
#include <type_safe/flag_set.hpp> #include <type_safe/flag_set.hpp>
#include <type_safe/reference.hpp> #include <type_safe/reference.hpp>
#include <cppast/detail/assert.hpp>
#include <cppast/cppast_fwd.hpp> #include <cppast/cppast_fwd.hpp>
#include <cppast/detail/assert.hpp>
namespace cppast namespace cppast
{ {

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_ALIAS_TEMPLATE_HPP_INCLUDED #ifndef CPPAST_CPP_ALIAS_TEMPLATE_HPP_INCLUDED
#define CPPAST_CPP_ALIAS_TEMPLATE_HPP_INCLUDED #define CPPAST_CPP_ALIAS_TEMPLATE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_ARRAY_TYPE_HPP_INCLUDED #ifndef CPPAST_CPP_ARRAY_TYPE_HPP_INCLUDED
#define CPPAST_CPP_ARRAY_TYPE_HPP_INCLUDED #define CPPAST_CPP_ARRAY_TYPE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_ATTRIBUTE_HPP_INCLUDED #ifndef CPPAST_CPP_ATTRIBUTE_HPP_INCLUDED
#define CPPAST_CPP_ATTRIBUTE_HPP_INCLUDED #define CPPAST_CPP_ATTRIBUTE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_CLASS_HPP_INCLUDED #ifndef CPPAST_CPP_CLASS_HPP_INCLUDED
#define CPPAST_CPP_CLASS_HPP_INCLUDED #define CPPAST_CPP_CLASS_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_CLASS_TEMPLATE_HPP_INCLUDED #ifndef CPPAST_CPP_CLASS_TEMPLATE_HPP_INCLUDED
#define CPPAST_CPP_CLASS_TEMPLATE_HPP_INCLUDED #define CPPAST_CPP_CLASS_TEMPLATE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_DECLTYPE_TYPE_HPP_INCLUDED #ifndef CPPAST_CPP_DECLTYPE_TYPE_HPP_INCLUDED
#define CPPAST_CPP_DECLTYPE_TYPE_HPP_INCLUDED #define CPPAST_CPP_DECLTYPE_TYPE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_ENTITY_HPP_INCLUDED #ifndef CPPAST_CPP_ENTITY_HPP_INCLUDED
#define CPPAST_CPP_ENTITY_HPP_INCLUDED #define CPPAST_CPP_ENTITY_HPP_INCLUDED
@ -151,7 +150,7 @@ public:
{ {
user_data_ = data; user_data_ = data;
} }
/// \effects Creates it giving it the the name. /// \effects Creates it giving it the the name.
cpp_entity(std::string name) : name_(std::move(name)), user_data_(nullptr) {} cpp_entity(std::string name) : name_(std::move(name)), user_data_(nullptr) {}

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_ENTITY_CONTAINER_HPP_INCLUDED #ifndef CPPAST_CPP_ENTITY_CONTAINER_HPP_INCLUDED
#define CPPAST_CPP_ENTITY_CONTAINER_HPP_INCLUDED #define CPPAST_CPP_ENTITY_CONTAINER_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_ENTITY_INDEX_HPP_INCLUDED #ifndef CPPAST_CPP_ENTITY_INDEX_HPP_INCLUDED
#define CPPAST_CPP_ENTITY_INDEX_HPP_INCLUDED #define CPPAST_CPP_ENTITY_INDEX_HPP_INCLUDED
@ -104,8 +103,8 @@ public:
/// \returns A [ts::optional_ref]() corresponding to the entity of the given /// \returns A [ts::optional_ref]() corresponding to the entity of the given
/// [cppast::cpp_entity_id](). If no definition has been registered, it returns an empty /// [cppast::cpp_entity_id](). If no definition has been registered, it returns an empty
/// optional. \notes This operation is thread safe. /// optional. \notes This operation is thread safe.
type_safe::optional_ref<const cpp_entity> lookup_definition(const cpp_entity_id& id) const type_safe::optional_ref<const cpp_entity> lookup_definition(
noexcept; const cpp_entity_id& id) const noexcept;
/// \returns A [ts::array_ref]() of references to all namespaces matching the given /// \returns A [ts::array_ref]() of references to all namespaces matching the given
/// [cppast::cpp_entity_id](). If no namespace is found, it returns an empty array reference. /// [cppast::cpp_entity_id](). If no namespace is found, it returns an empty array reference.

View file

@ -1,12 +1,11 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_ENTITY_KIND_HPP_INCLUDED #ifndef CPPAST_CPP_ENTITY_KIND_HPP_INCLUDED
#define CPPAST_CPP_ENTITY_KIND_HPP_INCLUDED #define CPPAST_CPP_ENTITY_KIND_HPP_INCLUDED
#include <cppast/detail/assert.hpp>
#include <cppast/cppast_fwd.hpp> #include <cppast/cppast_fwd.hpp>
#include <cppast/detail/assert.hpp>
namespace cppast namespace cppast
{ {

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_ENTITY_REF_HPP_INCLUDED #ifndef CPPAST_CPP_ENTITY_REF_HPP_INCLUDED
#define CPPAST_CPP_ENTITY_REF_HPP_INCLUDED #define CPPAST_CPP_ENTITY_REF_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_ENUM_HPP_INCLUDED #ifndef CPPAST_CPP_ENUM_HPP_INCLUDED
#define CPPAST_CPP_ENUM_HPP_INCLUDED #define CPPAST_CPP_ENUM_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_EXPRESSION_HPP_INCLUDED #ifndef CPPAST_CPP_EXPRESSION_HPP_INCLUDED
#define CPPAST_CPP_EXPRESSION_HPP_INCLUDED #define CPPAST_CPP_EXPRESSION_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_FILE_HPP_INCLUDED #ifndef CPPAST_CPP_FILE_HPP_INCLUDED
#define CPPAST_CPP_FILE_HPP_INCLUDED #define CPPAST_CPP_FILE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_FORWARD_DECLARABLE_HPP_INCLUDED #ifndef CPPAST_CPP_FORWARD_DECLARABLE_HPP_INCLUDED
#define CPPAST_CPP_FORWARD_DECLARABLE_HPP_INCLUDED #define CPPAST_CPP_FORWARD_DECLARABLE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_FRIEND_HPP_INCLUDED #ifndef CPPAST_CPP_FRIEND_HPP_INCLUDED
#define CPPAST_CPP_FRIEND_HPP_INCLUDED #define CPPAST_CPP_FRIEND_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_FUNCTION_HPP_INCLUDED #ifndef CPPAST_CPP_FUNCTION_HPP_INCLUDED
#define CPPAST_CPP_FUNCTION_HPP_INCLUDED #define CPPAST_CPP_FUNCTION_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_FUNCTION_TEMPLATE_HPP_INCLUDED #ifndef CPPAST_CPP_FUNCTION_TEMPLATE_HPP_INCLUDED
#define CPPAST_CPP_FUNCTION_TEMPLATE_HPP_INCLUDED #define CPPAST_CPP_FUNCTION_TEMPLATE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_FUNCTION_TYPE_HPP_INCLUDED #ifndef CPPAST_CPP_FUNCTION_TYPE_HPP_INCLUDED
#define CPPAST_CPP_FUNCTION_TYPE_HPP_INCLUDED #define CPPAST_CPP_FUNCTION_TYPE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_LANGUAGE_LINKAGE_HPP_INCLUDED #ifndef CPPAST_CPP_LANGUAGE_LINKAGE_HPP_INCLUDED
#define CPPAST_CPP_LANGUAGE_LINKAGE_HPP_INCLUDED #define CPPAST_CPP_LANGUAGE_LINKAGE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_MEMBER_FUNCTION_HPP_INCLUDED #ifndef CPPAST_CPP_MEMBER_FUNCTION_HPP_INCLUDED
#define CPPAST_CPP_MEMBER_FUNCTION_HPP_INCLUDED #define CPPAST_CPP_MEMBER_FUNCTION_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_MEMBER_VARIABLE_HPP_INCLUDED #ifndef CPPAST_CPP_MEMBER_VARIABLE_HPP_INCLUDED
#define CPPAST_CPP_MEMBER_VARIABLE_HPP_INCLUDED #define CPPAST_CPP_MEMBER_VARIABLE_HPP_INCLUDED
@ -19,7 +18,7 @@ public:
{ {
return mutable_; return mutable_;
} }
cpp_member_variable_base(std::string name, std::unique_ptr<cpp_type> type, cpp_member_variable_base(std::string name, std::unique_ptr<cpp_type> type,
std::unique_ptr<cpp_expression> def, bool is_mutable) std::unique_ptr<cpp_expression> def, bool is_mutable)
: cpp_entity(std::move(name)), cpp_variable_base(std::move(type), std::move(def)), : cpp_entity(std::move(name)), cpp_variable_base(std::move(type), std::move(def)),

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_NAMESPACE_HPP_INCLUDED #ifndef CPPAST_CPP_NAMESPACE_HPP_INCLUDED
#define CPPAST_CPP_NAMESPACE_HPP_INCLUDED #define CPPAST_CPP_NAMESPACE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_PREPROCESSOR_HPP_INCLUDED #ifndef CPPAST_CPP_PREPROCESSOR_HPP_INCLUDED
#define CPPAST_CPP_PREPROCESSOR_HPP_INCLUDED #define CPPAST_CPP_PREPROCESSOR_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_STATIC_ASSERT_HPP_INCLUDED #ifndef CPPAST_CPP_STATIC_ASSERT_HPP_INCLUDED
#define CPPAST_CPP_STATIC_ASSERT_HPP_INCLUDED #define CPPAST_CPP_STATIC_ASSERT_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_STORAGE_CLASS_SPECIFIERS_HPP_INCLUDED #ifndef CPPAST_CPP_STORAGE_CLASS_SPECIFIERS_HPP_INCLUDED
#define CPPAST_CPP_STORAGE_CLASS_SPECIFIERS_HPP_INCLUDED #define CPPAST_CPP_STORAGE_CLASS_SPECIFIERS_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_TEMPLATE_HPP_INCLUDED #ifndef CPPAST_CPP_TEMPLATE_HPP_INCLUDED
#define CPPAST_CPP_TEMPLATE_HPP_INCLUDED #define CPPAST_CPP_TEMPLATE_HPP_INCLUDED
@ -143,8 +142,8 @@ public:
/// \returns An array ref to the [cppast::cpp_template_argument](), if there are any. /// \returns An array ref to the [cppast::cpp_template_argument](), if there are any.
/// \requires The arguments are exposed, i.e. `arguments_exposed()` returns `true`. /// \requires The arguments are exposed, i.e. `arguments_exposed()` returns `true`.
type_safe::optional<type_safe::array_ref<const cpp_template_argument>> arguments() const type_safe::optional<type_safe::array_ref<const cpp_template_argument>> arguments()
noexcept const noexcept
{ {
auto& vec = arguments_.value(type_safe::variant_type<std::vector<cpp_template_argument>>{}); auto& vec = arguments_.value(type_safe::variant_type<std::vector<cpp_template_argument>>{});
if (vec.empty()) if (vec.empty())

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_TEMPLATE_PARAMETER_HPP_INCLUDED #ifndef CPPAST_CPP_TEMPLATE_PARAMETER_HPP_INCLUDED
#define CPPAST_CPP_TEMPLATE_PARAMETER_HPP_INCLUDED #define CPPAST_CPP_TEMPLATE_PARAMETER_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_TOKEN_HPP_INCLUDED #ifndef CPPAST_CPP_TOKEN_HPP_INCLUDED
#define CPPAST_CPP_TOKEN_HPP_INCLUDED #define CPPAST_CPP_TOKEN_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_TYPE_HPP_INCLUDED #ifndef CPPAST_CPP_TYPE_HPP_INCLUDED
#define CPPAST_CPP_TYPE_HPP_INCLUDED #define CPPAST_CPP_TYPE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_TYPE_ALIAS_HPP_INCLUDED #ifndef CPPAST_CPP_TYPE_ALIAS_HPP_INCLUDED
#define CPPAST_CPP_TYPE_ALIAS_HPP_INCLUDED #define CPPAST_CPP_TYPE_ALIAS_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_VARIABLE_HPP_INCLUDED #ifndef CPPAST_CPP_VARIABLE_HPP_INCLUDED
#define CPPAST_CPP_VARIABLE_HPP_INCLUDED #define CPPAST_CPP_VARIABLE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_VARIABLE_BASE_HPP_INCLUDED #ifndef CPPAST_CPP_VARIABLE_BASE_HPP_INCLUDED
#define CPPAST_CPP_VARIABLE_BASE_HPP_INCLUDED #define CPPAST_CPP_VARIABLE_BASE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CPP_VARIABLE_TEMPLATE_HPP_INCLUDED #ifndef CPPAST_CPP_VARIABLE_TEMPLATE_HPP_INCLUDED
#define CPPAST_CPP_VARIABLE_TEMPLATE_HPP_INCLUDED #define CPPAST_CPP_VARIABLE_TEMPLATE_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2021 Julian Rüth <julian.rueth@fsfe.org> // Copyright (C) 2021 Julian Rüth <julian.rueth@fsfe.org>
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_FORWARD_HPP_INCLUDED #ifndef CPPAST_FORWARD_HPP_INCLUDED
#define CPPAST_FORWARD_HPP_INCLUDED #define CPPAST_FORWARD_HPP_INCLUDED
@ -118,9 +117,12 @@ struct source_location;
struct visitor_info; struct visitor_info;
struct whitespace_t; struct whitespace_t;
template <class Derived, typename T> class cpp_entity_container; template <class Derived, typename T>
template <class Parser> class simple_file_parser; class cpp_entity_container;
template <typename T, typename Predicate> class basic_cpp_entity_ref; template <class Parser>
class simple_file_parser;
template <typename T, typename Predicate>
class basic_cpp_entity_ref;
} // namespace cppast } // namespace cppast

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_ASSERT_HPP_INCLUDED #ifndef CPPAST_ASSERT_HPP_INCLUDED
#define CPPAST_ASSERT_HPP_INCLUDED #define CPPAST_ASSERT_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_INTRUSIVE_LIST_HPP_INCLUDED #ifndef CPPAST_INTRUSIVE_LIST_HPP_INCLUDED
#define CPPAST_INTRUSIVE_LIST_HPP_INCLUDED #define CPPAST_INTRUSIVE_LIST_HPP_INCLUDED
@ -10,8 +9,8 @@
#include <type_safe/optional_ref.hpp> #include <type_safe/optional_ref.hpp>
#include <cppast/detail/assert.hpp>
#include <cppast/cppast_fwd.hpp> #include <cppast/cppast_fwd.hpp>
#include <cppast/detail/assert.hpp>
namespace cppast namespace cppast
{ {

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_DIAGNOSTIC_HPP_INCLUDED #ifndef CPPAST_DIAGNOSTIC_HPP_INCLUDED
#define CPPAST_DIAGNOSTIC_HPP_INCLUDED #define CPPAST_DIAGNOSTIC_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_DIAGNOSTIC_LOGGER_HPP_INCLUDED #ifndef CPPAST_DIAGNOSTIC_LOGGER_HPP_INCLUDED
#define CPPAST_DIAGNOSTIC_LOGGER_HPP_INCLUDED #define CPPAST_DIAGNOSTIC_LOGGER_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_LIBCLANG_PARSER_HPP_INCLUDED #ifndef CPPAST_LIBCLANG_PARSER_HPP_INCLUDED
#define CPPAST_LIBCLANG_PARSER_HPP_INCLUDED #define CPPAST_LIBCLANG_PARSER_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_PARSER_HPP_INCLUDED #ifndef CPPAST_PARSER_HPP_INCLUDED
#define CPPAST_PARSER_HPP_INCLUDED #define CPPAST_PARSER_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_VISITOR_HPP_INCLUDED #ifndef CPPAST_VISITOR_HPP_INCLUDED
#define CPPAST_VISITOR_HPP_INCLUDED #define CPPAST_VISITOR_HPP_INCLUDED

View file

@ -1,5 +1,5 @@
# Copyright (C) 2017-2018 Jonathan Müller <jonathanmueller.dev@gmail.com> # Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
# This file is subject to the license terms in the LICENSE file # SPDX-License-Identifier: MIT
# found in the top-level directory of this distribution. # found in the top-level directory of this distribution.
set(detail_header set(detail_header

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/code_generator.hpp> #include <cppast/code_generator.hpp>
@ -292,11 +291,10 @@ bool generate_enum(code_generator& generator, const cpp_enum& e,
output << opening_brace; output << opening_brace;
output.indent(); output.indent();
auto need_sep = write_container(output, e, auto need_sep = write_container(
[](const code_generator::output& out) { output, e,
out << punctuation(",") << newl; [](const code_generator::output& out) { out << punctuation(",") << newl; },
}, cur_access);
cur_access);
if (need_sep) if (need_sep)
output << newl; output << newl;

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_alias_template.hpp> #include <cppast/cpp_alias_template.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_attribute.hpp> #include <cppast/cpp_attribute.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_class.hpp> #include <cppast/cpp_class.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_class_template.hpp> #include <cppast/cpp_class_template.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_entity.hpp> #include <cppast/cpp_entity.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_entity_index.hpp> #include <cppast/cpp_entity_index.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_entity_kind.hpp> #include <cppast/cpp_entity_kind.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_enum.hpp> #include <cppast/cpp_enum.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_expression.hpp> #include <cppast/cpp_expression.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_file.hpp> #include <cppast/cpp_file.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_forward_declarable.hpp> #include <cppast/cpp_forward_declarable.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_friend.hpp> #include <cppast/cpp_friend.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_function.hpp> #include <cppast/cpp_function.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_function_template.hpp> #include <cppast/cpp_function_template.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_language_linkage.hpp> #include <cppast/cpp_language_linkage.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_member_function.hpp> #include <cppast/cpp_member_function.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_member_variable.hpp> #include <cppast/cpp_member_variable.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_namespace.hpp> #include <cppast/cpp_namespace.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_preprocessor.hpp> #include <cppast/cpp_preprocessor.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_static_assert.hpp> #include <cppast/cpp_static_assert.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_template_parameter.hpp> #include <cppast/cpp_template_parameter.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_token.hpp> #include <cppast/cpp_token.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_type.hpp> #include <cppast/cpp_type.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_type_alias.hpp> #include <cppast/cpp_type_alias.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_variable.hpp> #include <cppast/cpp_variable.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_variable_template.hpp> #include <cppast/cpp_variable_template.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/diagnostic_logger.hpp> #include <cppast/diagnostic_logger.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <clang-c/Index.h> #include <clang-c/Index.h>
#include <cppast/cpp_class.hpp> #include <cppast/cpp_class.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include "cxtokenizer.hpp" #include "cxtokenizer.hpp"

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_CXTOKENIZER_HPP_INCLUDED #ifndef CPPAST_CXTOKENIZER_HPP_INCLUDED
#define CPPAST_CXTOKENIZER_HPP_INCLUDED #define CPPAST_CXTOKENIZER_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include "debug_helper.hpp" #include "debug_helper.hpp"

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_DEBUG_HELPER_HPP_INCLUDED #ifndef CPPAST_DEBUG_HELPER_HPP_INCLUDED
#define CPPAST_DEBUG_HELPER_HPP_INCLUDED #define CPPAST_DEBUG_HELPER_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_enum.hpp> #include <cppast/cpp_enum.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_expression.hpp> #include <cppast/cpp_expression.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_friend.hpp> #include <cppast/cpp_friend.hpp>
@ -45,8 +44,8 @@ std::unique_ptr<cpp_entity> detail::parse_cpp_friend(const detail::parse_context
// as then the class name would be wrong // as then the class name would be wrong
auto name = detail::get_cursor_name(referenced); auto name = detail::get_cursor_name(referenced);
type = cpp_user_defined_type::build( type = cpp_user_defined_type::build(
cpp_type_ref(detail::get_entity_id(referenced), cpp_type_ref(detail::get_entity_id(referenced),
namespace_str + "::" + name.c_str())); namespace_str + "::" + name.c_str()));
} }
else else
{ {

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/cpp_function.hpp> #include <cppast/cpp_function.hpp>
#include <cppast/cpp_member_function.hpp> #include <cppast/cpp_member_function.hpp>

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include "parse_functions.hpp" #include "parse_functions.hpp"

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include <cppast/libclang_parser.hpp> #include <cppast/libclang_parser.hpp>
@ -494,7 +493,7 @@ namespace
std::vector<const char*> get_arguments(const libclang_compile_config& config) std::vector<const char*> get_arguments(const libclang_compile_config& config)
{ {
std::vector<const char*> args std::vector<const char*> args
// TODO: Why? and Why? // TODO: Why? and Why?
= {"-x", "c++", "-I."}; // force C++ and enable current directory for include search = {"-x", "c++", "-I."}; // force C++ and enable current directory for include search
for (auto& flag : detail::libclang_compile_config_access::flags(config)) for (auto& flag : detail::libclang_compile_config_access::flags(config))
args.push_back(flag.c_str()); args.push_back(flag.c_str());

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_LIBCLANG_VISITOR_HPP_INCLUDED #ifndef CPPAST_LIBCLANG_VISITOR_HPP_INCLUDED
#define CPPAST_LIBCLANG_VISITOR_HPP_INCLUDED #define CPPAST_LIBCLANG_VISITOR_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include "parse_functions.hpp" #include "parse_functions.hpp"

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_PARSE_ERROR_HPP_INCLUDED #ifndef CPPAST_PARSE_ERROR_HPP_INCLUDED
#define CPPAST_PARSE_ERROR_HPP_INCLUDED #define CPPAST_PARSE_ERROR_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include "parse_functions.hpp" #include "parse_functions.hpp"
@ -108,7 +107,8 @@ bool is_friend(const CXCursor& parent_cur)
std::unique_ptr<cpp_entity> detail::parse_entity(const detail::parse_context& context, std::unique_ptr<cpp_entity> detail::parse_entity(const detail::parse_context& context,
cpp_entity* parent, const CXCursor& cur, cpp_entity* parent, const CXCursor& cur,
const CXCursor& parent_cur) try const CXCursor& parent_cur)
try
{ {
if (context.logger->is_verbose()) if (context.logger->is_verbose())
{ {

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#ifndef CPPAST_PARSE_FUNCTIONS_HPP_INCLUDED #ifndef CPPAST_PARSE_FUNCTIONS_HPP_INCLUDED
#define CPPAST_PARSE_FUNCTIONS_HPP_INCLUDED #define CPPAST_PARSE_FUNCTIONS_HPP_INCLUDED

View file

@ -1,6 +1,5 @@
// Copyright (C) 2017-2019 Jonathan Müller <jonathanmueller.dev@gmail.com> // Copyright (C) 2017-2022 Jonathan Müller and cppast contributors
// This file is subject to the license terms in the LICENSE file // SPDX-License-Identifier: MIT
// found in the top-level directory of this distribution.
#include "preprocessor.hpp" #include "preprocessor.hpp"

Some files were not shown because too many files have changed in this diff Show more