Skip to content

Commit

Permalink
Merge pull request #322 from bkryza/v0.5.5
Browse files Browse the repository at this point in the history
V0.5.5
  • Loading branch information
bkryza authored Oct 2, 2024
2 parents 4e724a0 + f3f2912 commit dcaf9c0
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 29 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# CHANGELOG

### 0.5.5
* Updated code to work with LLVM 19 (#319)
* Added support for Objective C (#296)
* Added option to fold repeated activities in sequence diagrams (#317)
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "clang-uml"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.5.4
PROJECT_NUMBER = 0.5.5

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Linux build status](https://github.com/bkryza/clang-uml/actions/workflows/build.yml/badge.svg)](https://github.com/bkryza/clang-uml/actions)
[![macos build status](https://github.com/bkryza/clang-uml/actions/workflows/macos.yml/badge.svg)](https://github.com/bkryza/clang-uml/actions)
[![Coverage](https://codecov.io/gh/bkryza/clang-uml/branch/master/graph/badge.svg)](https://codecov.io/gh/bkryza/clang-uml)
[![Version](https://img.shields.io/badge/version-0.5.4-blue)](https://github.com/bkryza/clang-uml/releases)
[![Version](https://img.shields.io/badge/version-0.5.5-blue)](https://github.com/bkryza/clang-uml/releases)
[![Version](https://img.shields.io/badge/LLVM-12,13,14,15,16,17,18,19-orange)](https://github.com/bkryza/clang-uml/releases)
[![Doxygen](https://img.shields.io/badge/Docs-Doxygen-gainsboro)](https://clang-uml.github.io)

Expand All @@ -17,12 +17,11 @@ types and contents of each generated diagram.
The diagrams can be generated in [PlantUML](https://plantuml.com),
[MermaidJS](https://mermaid.js.org/) and JSON formats.

`clang-uml` currently supports C++ up to version 17 with partial support for C++ 20,
as well as C and Objective-C.
`clang-uml` currently supports C++ up to version 20, as well as C and Objective-C.

Full documentation can be found at [clang-uml.github.io](https://clang-uml.github.io).

To see what `clang-uml` can do, checkout the diagrams generated for unit
To see what `clang-uml` can do, check out the diagrams generated for unit
test cases [here](./docs/test_cases.md) or examples in
[clang-uml-examples](https://github.com/bkryza/clang-uml-examples) repository.

Expand Down Expand Up @@ -106,17 +105,18 @@ clang-uml
```

The output path for diagrams, as well as alternative location of
compilation database can be specified in `.clang-uml` configuration file.
compilation database can be specified in `.clang-uml` configuration file or
through command line parameters.

For other options checkout help:
For other options see help:

```bash
clang-uml --help
```

### Configuration file format and examples

Configuration files are written in YAML, and provide a list of diagrams
Configuration files are written in YAML, and provide definition of diagrams
which should be generated by `clang-uml`. Basic example is as follows:

```yaml
Expand All @@ -143,7 +143,7 @@ See [here](docs/configuration_file.md) for detailed configuration file reference
## Examples
To see what `clang-uml` can do, checkout the test cases documentation [here](./docs/test_cases.md).
To see what `clang-uml` can do, browse the test cases documentation [here](./docs/test_cases.md).

In order to see diagrams for the `clang-uml` itself, based on its own [config](.clang-uml) run
the following:
Expand All @@ -152,7 +152,7 @@ the following:
make clanguml_diagrams
```

and checkout the SVG diagrams in `docs/diagrams` folder.
and open the SVG diagrams in `docs/diagrams` folder.

### Class diagrams

Expand Down Expand Up @@ -228,7 +228,7 @@ results in the following diagram (via PlantUML):
![class_diagram_example](docs/test_cases/t00014_class.svg)

> Open the raw image [here](https://raw.githubusercontent.com/bkryza/clang-uml/master/docs/test_cases/t00014_class.svg),
> and checkout the hover tooltips and hyperlinks to classes and methods.
> and check out the hover tooltips and hyperlinks to classes and methods.

### Sequence diagrams

Expand Down Expand Up @@ -366,7 +366,7 @@ results in the following diagram (via PlantUML):
### Include diagrams

> In case you're looking for a simpler tool to visualize and analyze include graphs
> checkout my other tool - [clang-include-graph](https://github.com/bkryza/clang-include-graph)
> check out my other tool - [clang-include-graph](https://github.com/bkryza/clang-include-graph)

#### Example

Expand Down Expand Up @@ -403,7 +403,7 @@ results in the following diagram (via PlantUML) based on include directives in t

### Diagram content filtering

For typical code bases, generating a single diagram from entire code or even a single namespace can be too big to
For typical code bases, a single diagram generated from an entire code or even a single namespace can be too big to
be useful, e.g. as part of documentation. `clang-uml` allows specifying content to be included and excluded from
each diagram using simple YAML configuration:

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The diagrams can be generated in [PlantUML](https://plantuml.com),
Example sequence diagram generated using `clang-uml` from [this code](https://github.com/bkryza/clang-uml/blob/master/tests/t20029/t20029.cc):
![Sample sequence diagram](test_cases/t20029_sequence.svg)

`clang-uml` currently supports C++ up to version 17 with partial support for C++ 20.
`clang-uml` currently supports C++ up 20, as well as C and Objective-C.

To see what `clang-uml` can do, checkout the diagrams generated for unit
test cases [here](./test_cases.md) or examples in
Expand Down
28 changes: 14 additions & 14 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,16 @@ sudo apt install clang-uml

```bash
# Fedora 38
wget https://github.com/bkryza/clang-uml/releases/download/0.5.4/clang-uml-0.5.4-1.fc38.x86_64.rpm
sudo dnf install ./clang-uml-0.5.4-1.fc38.x86_64.rpm
wget https://github.com/bkryza/clang-uml/releases/download/0.5.5/clang-uml-0.5.4-1.fc38.x86_64.rpm
sudo dnf install ./clang-uml-0.5.5-1.fc38.x86_64.rpm

# Fedora 39
wget https://github.com/bkryza/clang-uml/releases/download/0.5.4/clang-uml-0.5.4-1.fc39.x86_64.rpm
sudo dnf install ./clang-uml-0.5.4-1.fc39.x86_64.rpm
wget https://github.com/bkryza/clang-uml/releases/download/0.5.5/clang-uml-0.5.5-1.fc39.x86_64.rpm
sudo dnf install ./clang-uml-0.5.5-1.fc39.x86_64.rpm

# Fedora 40
wget https://github.com/bkryza/clang-uml/releases/download/0.5.4/clang-uml-0.5.4-1.fc40.x86_64.rpm
sudo dnf install ./clang-uml-0.5.4-1.fc40.x86_64.rpm
wget https://github.com/bkryza/clang-uml/releases/download/0.5.5/clang-uml-0.5.5-1.fc40.x86_64.rpm
sudo dnf install ./clang-uml-0.5.5-1.fc40.x86_64.rpm
```

#### Arch Linux
Expand Down Expand Up @@ -116,8 +116,8 @@ brew install clang-uml
First make sure that you have the following dependencies installed:

```bash
# Ubuntu (Clang version will vary depending on Ubuntu version - below example is for Ubuntu 22.04)
apt install make gcc g++ ccache cmake libyaml-cpp-dev llvm-15 clang-15 libclang-15-dev libclang-cpp15-dev clang-format-15
# Ubuntu (Clang version will vary depending on Ubuntu version - below example is for Ubuntu 24.04)
apt install make gcc g++ ccache cmake libyaml-cpp-dev llvm-18 clang-18 libclang-18-dev libclang-cpp18-dev
```

Then proceed with building the sources:
Expand All @@ -130,14 +130,14 @@ make release
release/src/clang-uml --help

# To build using a specific installed version of LLVM use:
LLVM_VERSION=16 make release
LLVM_VERSION=18 make release
# or specify a path to a specific llvm-config binary, e.g.:
LLVM_CONFIG_PATH=/usr/bin/llvm-config-16 make release
LLVM_CONFIG_PATH=/usr/bin/llvm-config-18 make release
# or directly specify the path where LLVMConfig.cmake can be found on your system, e.g.:
CMAKE_PREFIX=/usr/lib/llvm-16/lib/cmake/llvm make release
CMAKE_PREFIX=/usr/lib/llvm-18/lib/cmake/llvm make release

# By default clang-uml is linked against shared LLVM libraries, this can be changed using:
LLVM_SHARED=OFF LLVM_VERSION=16 make release
LLVM_SHARED=OFF LLVM_VERSION=18 make release

# Optionally, to install in default prefix
make install
Expand All @@ -155,7 +155,7 @@ brew install ccache cmake llvm yaml-cpp

export CC=/usr/local/opt/llvm/bin/clang
export CXX=/usr/local/opt/llvm/bin/clang++
LLVM_VERSION=16 make release
LLVM_VERSION=18 make release
# or, if this fails, try:
CMAKE_PREFIX=/usr/local/opt/llvm/lib/cmake/llvm make release
```
Expand Down Expand Up @@ -237,7 +237,7 @@ bin\clang-uml.exe --version
```
It should produce something like:
```bash
clang-uml 0.5.4
clang-uml 0.5.5
Copyright (C) 2021-2024 Bartek Kryza <[email protected]>
Linux x86_64 6.5.0-21-generic
Built against LLVM/Clang libraries version: 18.1.8
Expand Down
2 changes: 1 addition & 1 deletion packaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ to the [documentation](../docs/installation.md#visual-studio-native-build).
```bash
cd packaging
.\make_installer.ps1
ls .\_BUILD\windows\clang-uml-0.5.4-win64.exe
ls .\_BUILD\windows\clang-uml-0.5.5-win64.exe
```
6 changes: 6 additions & 0 deletions src/common/clang_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,13 @@ std::string to_string(
clang::PrintingPolicy policy(context.getLangOpts());

const clang::TemplateArgument &arg = argLoc.getArgument();

#if LLVM_VERSION_MAJOR > 18
arg.print(policy, stream, false);
#else
arg.dump(stream);
#endif

stream.flush();

return result;
Expand Down

0 comments on commit dcaf9c0

Please sign in to comment.