Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,7 @@ jobs:

- name: Run tests
if: matrix.config.run_tests == 'Yes'
shell: bash
id: run_tests
run: |
cmake --build build --target tests
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,8 @@ else()
${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_NAME:insights> --cxx ${CMAKE_CXX_COMPILER} ${TEST_FAILURE_IS_OK} ${TEST_USE_LIBCPP} ${LLVM_PROF_DIR}
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/testSTDIN.sh ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_NAME:insights>
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/testInvalidOption.sh ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_NAME:insights>
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_NAME:insights> ${CMAKE_CURRENT_SOURCE_DIR}/tests/runTest.py
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/shell/test-bash-completion.sh ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/tests/shell ${CMAKE_CURRENT_SOURCE_DIR}/scripts/bash-autocomplete.sh ${TEST_FAILURE_IS_OK}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/$<TARGET_FILE_NAME:insights> ${CMAKE_CURRENT_SOURCE_DIR}/tests/runTest.py ${CMAKE_CURRENT_SOURCE_DIR}/tests/shell/test-bash-completion.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests
COMMENT "Running tests" VERBATIM
)
Expand All @@ -667,7 +668,8 @@ if (NOT WIN32)
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/runTest.py --insights ${CMAKE_CURRENT_BINARY_DIR}/insights --cxx ${CMAKE_CXX_COMPILER} --update-tests ${TEST_FAILURE_IS_OK}
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/testSTDIN.sh ${CMAKE_CURRENT_BINARY_DIR}/insights
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/testInvalidOption.sh ${CMAKE_CURRENT_BINARY_DIR}/insights
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/insights ${CMAKE_CURRENT_SOURCE_DIR}/tests/runTest.py
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tests/shell/test-bash-completion.sh ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/tests/shell ${CMAKE_CURRENT_SOURCE_DIR}/scripts/bash-autocomplete.sh
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/insights ${CMAKE_CURRENT_SOURCE_DIR}/tests/runTest.py ${CMAKE_CURRENT_SOURCE_DIR}/tests/shell/test-bash-completion.sh
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/tests
COMMENT "Running tests" VERBATIM
)
Expand Down
22 changes: 11 additions & 11 deletions Insights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ static llvm::cl::OptionCategory gInsightEduCategory(
"This transformations are only for education purposes. The resulting code most likely does not compile."sv);
//-----------------------------------------------------------------------------

static llvm::cl::opt<bool> gStdinMode("stdin",
llvm::cl::desc("Read the input from <stdin>."sv),
llvm::cl::init(false),
llvm::cl::cat(gInsightCategory));
//-----------------------------------------------------------------------------

static llvm::cl::opt<bool>
gUseLibCpp("use-libc++", llvm::cl::desc("Use libc++."sv), llvm::cl::init(false), llvm::cl::cat(gInsightCategory));
//-----------------------------------------------------------------------------

#define INSIGHTS_OPT(option, name, deflt, description, category) \
static llvm::cl::opt<bool, true> g##name(option, \
llvm::cl::desc(std::string_view{description}), \
Expand Down Expand Up @@ -397,7 +387,17 @@ extern struct __mptr* __vtbl_array[];
auto opExpected = CommonOptionsParser::create(argc, argv, gInsightCategory);

if(auto err = opExpected.takeError()) {
llvm::errs() << toString(std::move(err)) << "\n";
if(gAutoComplete) {
#define INSIGHTS_OPT(option, name, deflt, description, category) llvm::outs() << "--" << option << " ";

#include "InsightsOptions.def"

return 0;
} else {

llvm::errs() << toString(std::move(err)) << "\n";
}

return 1;
}

Expand Down
5 changes: 5 additions & 0 deletions InsightsOptions.def
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,9 @@ INSIGHTS_OPT("edu-show-coroutine-transformation",
gInsightEduCategory)
INSIGHTS_OPT("edu-show-cfront", UseShow2C, false, "Show transformation to C", gInsightEduCategory)
INSIGHTS_OPT("edu-show-lifetime", ShowLifetime, false, "Show lifetime of objects", gInsightEduCategory)

INSIGHTS_OPT("stdin", StdinMode, false, "Read the input from <stdin>.", gInsightCategory)
INSIGHTS_OPT("use-libc++", UseLibCpp, false, "Use libc++ (LLVM) instead of libstdc++ (GNU).", gInsightCategory)
INSIGHTS_OPT("autocomplete", AutoComplete, false, "Generate list of options for autocomplete and exit.", gInsightCategory)

#undef INSIGHTS_OPT
10 changes: 10 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,16 @@ At least for macOS, you can install C++ Insights via Homebrew thanks to [this fo
brew install cppinsights
```

## Bash autocomplete

There is a bash autocomplete script. It autocompletes the C++ Insights options as well as the Clang options provided after `--`.
You can download it with the following commands:

```
cd <YOUR_BASH_COMPLETION.D>
curl -o insights https://github.com/andreasfertig/cppinsights/tree/main/scripts/bash-autocomplete.sh
```


## Compatibility

Expand Down
3 changes: 3 additions & 0 deletions docs/CommandLineOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

* [alt-syntax-for](@ref alt_syntax_for)
* [alt-syntax-subscription](@ref alt_syntax_subscription)
* [autocomplete](@ref autocomplete)
* [edu-show-cfront](@ref edu_show_cfront)
* [edu-show-coroutine-transformation](@ref edu_show_coroutine_transformation)
* [edu-show-initlist](@ref edu_show_initlist)
Expand All @@ -10,3 +11,5 @@
* [edu-show-padding](@ref edu_show_padding)
* [show-all-callexpr-template-parameters](@ref show_all_callexpr_template_parameters)
* [show-all-implicit-casts](@ref show_all_implicit_casts)
* [stdin](@ref stdin)
* [use-libc++](@ref use_libc++)
1 change: 1 addition & 0 deletions docs/cmdl-examples/autocomplete.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Just prints out all the C++ Insights options.
2 changes: 0 additions & 2 deletions docs/cmdl-examples/edu-show-cfront.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// cmdlineinsights:-edu-show-cfront

#include <cstdio>

class A
Expand Down
14 changes: 2 additions & 12 deletions docs/cmdl-examples/edu-show-coroutine-transformation.cpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,8 @@
#if __has_include(<coroutine>)
#include <coroutine>
#elif __has_include(<experimental/coroutine>)
#include <experimental/coroutine>

namespace std {
using namespace std::experimental;
}
#else
#error "No coroutine header"
#endif

#include <cstdio>
#include <exception>
#include <new>
#include <utility>

struct generator
{
Expand All @@ -35,7 +25,7 @@ struct generator

generator(generator const&) = delete;
generator(generator&& rhs)
: p{std::exchange(rhs.p, nullptr)}
: handle{std::exchange(rhs.handle, nullptr)}
{
}

Expand Down
4 changes: 4 additions & 0 deletions docs/cmdl-examples/stdin.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
int main()
{
// Nothing going on here.
}
9 changes: 9 additions & 0 deletions docs/cmdl-examples/use-libc++.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include <string>

int main()
{
const std::string s{"Hello"};

for(const auto& e : s) {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ int main()
return 0;
}


```
[Live view](https://cppinsights.io/lnk?code=I2luY2x1ZGUgPGluaXRpYWxpemVyX2xpc3Q+CgppbnQgbWFpbigpCnsKICAgIGF1dG8gaSA9IDM7ICAgICAgIC8vIGludAogICAgYXV0byBhID0gezQyfTsgICAgLy8gaW5pdGlhbGl6ZXIgbGlzdAogICAgYXV0byBiezQyfTsgICAgICAgLy8gaW50CiAgICBhdXRvIGMgPSB7MSwgMn07ICAvLyBpbml0aWFsaXplciBsaXN0Cn0=&insightsOptions=cpp2a&rev=1.0)
<!-- transformed-end:auto-uniform-initialization-and-the-equal-sign.cpp -->
Expand Down
13 changes: 3 additions & 10 deletions docs/examples/auto.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,41 +77,35 @@ class CTest
};



int Test()
{
return 1;
}


int Best()
{
return 1;
}


inline constexpr int CEBest()
{
return 1;
}


char West()
{
return 'c';
}


inline constexpr char CEWest()
{
return 'c';
}

[[maybe_unused]] inline constexpr char MUCEWest()
{
return 'c';
}

{
return 'c';
}

int main()
{
Expand All @@ -137,7 +131,6 @@ int main()
return 0;
}


```
[Live view](https://cppinsights.io/lnk?code=Y2xhc3MgQ1Rlc3QKewogICAgYXV0byBUZXN0KCkgeyByZXR1cm4gMjI7IH0KfTsKCmF1dG8gVGVzdCgpCnsKICAgIHJldHVybiAxOwp9CgphdXRvIEJlc3QoKSAtPiBpbnQKewogICAgcmV0dXJuIDE7Cn0KCmNvbnN0ZXhwciBhdXRvIENFQmVzdCgpIC0+IGludAp7CiAgICByZXR1cm4gMTsKfQoKZGVjbHR5cGUoYXV0bykgV2VzdCgpCnsKICAgIHJldHVybiAnYyc7Cn0KCmNvbnN0ZXhwciBkZWNsdHlwZShhdXRvKSBDRVdlc3QoKQp7CiAgICByZXR1cm4gJ2MnOwp9CgpbW21heWJlX3VudXNlZF1dIGlubGluZSBjb25zdGV4cHIgZGVjbHR5cGUoYXV0bykgTVVDRVdlc3QoKQp7CiAgICByZXR1cm4gJ2MnOwp9CgppbnQgbWFpbigpCnsKICAgIGludCAgICAgICAgICAgIHggPSAyOwogICAgY29uc3QgY2hhciogICAgcDsKICAgIGNvbnN0ZXhwciBhdXRvIGNlaSAgICAgICA9IDA7CiAgICBhdXRvIGNvbnN0ZXhwciBjZWkyICAgICAgPSAwOwogICAgYXV0byAgICAgICAgICAgICAgICAgaSAgID0gMDsKICAgIGRlY2x0eXBlKGF1dG8pICAgICAgIHhYICA9IChpKTsKICAgIGF1dG8gICAgICAgICAgICAgICAgIGlpICA9ICZpOwogICAgYXV0byYgICAgICAgICAgICAgICAgaXIgID0gaTsKICAgIGF1dG8qICAgICAgICAgICAgICAgIGlwICA9ICZpOwogICAgY29uc3QgYXV0byogICAgICAgICAgY2lwID0gJmk7CiAgICBhdXRvKiAgICAgICAgICAgICAgICBwcCAgPSBwOwogICAgY29uc3QgYXV0byogICAgICAgICAgY3AgID0gcDsKICAgIHZvbGF0aWxlIGNvbnN0IGF1dG8qIHZjcCA9IHA7CiAgICBhdXRvICAgICAgICAgICAgICAgICBmICAgPSAxLjBmOwogICAgYXV0byAgICAgICAgICAgICAgICAgYyAgID0gJ2MnOwogICAgYXV0byAgICAgICAgICAgICAgICAgdSAgID0gMHU7CiAgICBkZWNsdHlwZSh1KSAgICAgICAgICB1dSAgPSB1OwoKICAgIFtbbWF5YmVfdW51c2VkXV0gYXV0byAgICAgICAgbXUgID0gMHU7CiAgICBbW21heWJlX3VudXNlZF1dIGRlY2x0eXBlKHUpIG11dSA9IHU7Cn0=&insightsOptions=cpp2a&rev=1.0)
<!-- transformed-end:auto.cpp -->
Expand Down
1 change: 0 additions & 1 deletion docs/examples/braced-array-initialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ int main()
return 0;
}


```
[Live view](https://cppinsights.io/lnk?code=aW50IG1haW4oKQp7CiAgICAvLyBUaGUgY29tcGlsZXIgYXV0b21hdGljYWxseSBmaWxscyB0aGUgcmVtYWluaW5nCiAgICAvLyBmaWVsZHMgd2l0aCAwIHRoYW5rcyB0byBicmFjZWQgaW5pdGlhbGl6YXRpb24uCiAgICBpbnQgYXJyWzVdezIsIDMsIDR9Owp9&insightsOptions=cpp2a&rev=1.0)
<!-- transformed-end:braced-array-initialization.cpp -->
Expand Down
1 change: 0 additions & 1 deletion docs/examples/braced-return-value-and-decltype-auto.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ int & Bar()
return (x);
}


```
[Live view](https://cppinsights.io/lnk?code=ZGVjbHR5cGUoYXV0bykgQmFyKCkKewogICAgaW50IHggPSAyMjsKICAgIC8vIGRvIHNvbWUgZmFuY3kgY2FsY3VsYXRpb24gd2l0aCB4CiAgICByZXR1cm4gKHgpOwp9&insightsOptions=cpp2a&rev=1.0)
<!-- transformed-end:braced-return-value-and-decltype-auto.cpp -->
Expand Down
3 changes: 0 additions & 3 deletions docs/examples/braced-uniform-initialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ struct A
};



struct B
{
int i;
Expand All @@ -57,7 +56,6 @@ struct B
};



int main()
{
A a = A();
Expand All @@ -67,7 +65,6 @@ int main()
return 0;
}


```
[Live view](https://cppinsights.io/lnk?code=c3RydWN0IEEKewogICAgLy8gdXNlciBwcm92aWRlZCBjb25zdHJ1Y3RvciBfbWlzc2luZ18gaW5pdGlhbGl6YXRpb24gb2YgYGpgCiAgICBBKCkKICAgIDogaXszfQogICAgewogICAgfQoKICAgIGludCBpOwogICAgaW50IGo7Cn07CgpzdHJ1Y3QgQgp7CiAgICAvLyB1c2VzIHRoZSBkZWZhdWx0IGNvbnN0cnVjdG9yCiAgICBpbnQgaTsKICAgIGludCBqOwp9OwoKaW50IG1haW4oKQp7CiAgICBBIGE7CiAgICBBIGEye307ICAvLyBvbmx5IGkgZ2V0cyBpbml0aWFsaXplZC4KCiAgICBCIGI7CiAgICBCIGIye307ICAvLyBib3RoIGkgYW5kIGogZ2V0IGluaXRpYWxpemVkLgp9&insightsOptions=cpp2a&rev=1.0)
<!-- transformed-end:braced-uniform-initialization.cpp -->
Expand Down
1 change: 0 additions & 1 deletion docs/examples/generic-lambda.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ int main()
return 0;
}


```
[Live view](https://cppinsights.io/lnk?code=aW50IG1haW4oKQp7CiAgICAvLyBHZW5lcmljIGxhbWJkYXMgaGF2ZSBhIG1ldGhvZCB0ZW1wbGF0ZSBjYWxsIG9wZXJhdG9yLgogICAgYXV0byB4ID0gW10oYXV0byB4KSB7IHJldHVybiB4ICogeDsgfTsKCiAgICB4KDIpOyAgICAvLyBpbnQKICAgIHgoMy4wKTsgIC8vIGRvdWJsZQp9&insightsOptions=cpp2a&rev=1.0)
<!-- transformed-end:generic-lambda.cpp -->
Expand Down
3 changes: 1 addition & 2 deletions docs/examples/implicit-conversions.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ int main()
Here is the transformed code:
```{.cpp}
#include <cstdio>

template<typename U>
class X
{
Expand Down Expand Up @@ -106,7 +107,6 @@ class X<const int>

#endif


int main()
{
X<int> arr[2] = {X<int>{}, X<int>{}};
Expand All @@ -122,7 +122,6 @@ int main()
return 0;
}


```
[Live view](https://cppinsights.io/lnk?code=I2luY2x1ZGUgPGNzdGRpbz4KdGVtcGxhdGU8dHlwZW5hbWUgVT4KY2xhc3MgWAp7CnB1YmxpYzoKICAgIFgoKSAgICAgICAgICAgPSBkZWZhdWx0OwogICAgWChjb25zdCBYJiB4KSA9IGRlZmF1bHQ7CgogICAgdGVtcGxhdGU8dHlwZW5hbWUgVD4KICAgIFgoVCYmIHgpCiAgICA6IG1Ye30KICAgIHsKICAgIH0KCnByaXZhdGU6CiAgICBVIG1YOwp9OwoKaW50IG1haW4oKQp7CiAgICBYPGludD4gYXJyWzJde307CgogICAgLy8gV2UgdXNlIFg8Y29uc3QgaW50PiBpbnN0ZWFkIG9mIFg8aW50PiBoZXJlLiBUaGlzIHJlc3VsdHMKICAgIC8vIGluIGEgY29uc3RydWN0b3IgY2FsbCB0byBjcmVhdGUgYSBYPGNvbnN0IGludD4gb2JqZWN0IGFzCiAgICAvLyB5b3UgY2FuIHNlZSBpbiB0aGUgdHJhbnNmb3JtYXRpb24uCiAgICBmb3IoY29uc3QgWDxjb25zdCBpbnQ+JiB4IDogYXJyKSB7CiAgICB9Cn0=&insightsOptions=cpp2a&rev=1.0)
<!-- transformed-end:implicit-conversions.cpp -->
Expand Down
1 change: 0 additions & 1 deletion docs/examples/lambda-with-static-invoke.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ int main()
return 0;
}


```
[Live view](https://cppinsights.io/lnk?code=aW50IG1haW4oKQp7CiAgICBpbnQgKCpmcCkoaW50LCBjaGFyKSA9IFtdKGludCBhLCBjaGFyIGIpIHsgcmV0dXJuIGEgKyBiOyB9Owp9&insightsOptions=cpp2a&rev=1.0)
<!-- transformed-end:lambda-with-static-invoke.cpp -->
Expand Down
1 change: 0 additions & 1 deletion docs/examples/range-based-for-loop.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ int main()
return 0;
}


```
[Live view](https://cppinsights.io/lnk?code=I2luY2x1ZGUgPGNzdGRpbz4KCmludCBtYWluKCkKewogICAgY29uc3QgY2hhciBhcnJbXXsyLCA0LCA2LCA4LCAxMH07CgogICAgZm9yKGNvbnN0IGNoYXImIGMgOiBhcnIpIHsKICAgICAgICBwcmludGYoImM9JWNcbiIsIGMpOwogICAgfQp9&insightsOptions=cpp2a&rev=1.0)
<!-- transformed-end:range-based-for-loop.cpp -->
Expand Down
3 changes: 0 additions & 3 deletions docs/examples/recursive-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,22 +74,19 @@ struct A<5>

#endif


template<>
struct A<1>
{
static const int value = 1;
};



int main()
{
printf("c=%c\n", A<5>::value);
return 0;
}


```
[Live view](https://cppinsights.io/lnk?code=I2luY2x1ZGUgPGNzdGRpbz4KI2luY2x1ZGUgPHZlY3Rvcj4KCnRlbXBsYXRlPGludCBuPgpzdHJ1Y3QgQQp7CiAgICBzdGF0aWMgY29uc3QgYXV0byB2YWx1ZSA9IEE8biAtIDE+Ojp2YWx1ZSArIG47Cn07Cgp0ZW1wbGF0ZTw+CnN0cnVjdCBBPDE+CnsKICAgIHN0YXRpYyBjb25zdCBhdXRvIHZhbHVlID0gMTsKfTsKCmludCBtYWluKCkKewogICAgcHJpbnRmKCJjPSVjXG4iLCBBPDU+Ojp2YWx1ZSk7Cn0=&insightsOptions=cpp2a&rev=1.0)
<!-- transformed-end:recursive-template.cpp -->
Expand Down
6 changes: 0 additions & 6 deletions docs/examples/structured-bindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,16 @@ struct Point
};



Point pt = {1, 2};

// Here we get an additional object injected to which ax and ay refer.
Point __pt9 = Point(pt);
int & ax = __pt9.x;
int & ay = __pt9.y;


// In case of an reference the injected object is just a reference to
// the original one.
Point & __pt13 = pt;
int & a2x = __pt13.x;
int & a2y = __pt13.y;


```
[Live view](https://cppinsights.io/lnk?code=c3RydWN0IFBvaW50CnsKICAgIGludCB4OwogICAgaW50IHk7Cn07CgpQb2ludCBwdHsxLCAyfTsKLy8gSGVyZSB3ZSBnZXQgYW4gYWRkaXRpb25hbCBvYmplY3QgaW5qZWN0ZWQgdG8gd2hpY2ggYXggYW5kIGF5IHJlZmVyLgphdXRvIFtheCwgYXldID0gcHQ7CgovLyBJbiBjYXNlIG9mIGFuIHJlZmVyZW5jZSB0aGUgaW5qZWN0ZWQgb2JqZWN0IGlzIGp1c3QgYSByZWZlcmVuY2UgdG8KLy8gdGhlIG9yaWdpbmFsIG9uZS4KYXV0byYgW2EyeCwgYTJ5XSA9IHB0Ow==&insightsOptions=cpp2a&rev=1.0)
<!-- transformed-end:structured-bindings.cpp -->
Expand Down
1 change: 0 additions & 1 deletion docs/opt-alt-syntax-for.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ int main()
return 0;
}


```
1 change: 0 additions & 1 deletion docs/opt-alt-syntax-subscription.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ int main()
return 0;
}


```
16 changes: 16 additions & 0 deletions docs/opt-autocomplete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# autocomplete {#autocomplete}
Generate list of options for autocomplete and exit.

__Default:__ Off

__Examples:__

```.cpp
// Just prints out all the C++ Insights options.
```

transforms into this:

```.cpp

```
Loading