Files
clang-uml/docs/test_cases/t00057.md
2023-02-19 18:56:11 +01:00

946 B

t00057 - Test case C99/C11 translation units with structs and unions

Config

compilation_database_dir: ..
output_directory: puml
diagrams:
  t00057_class:
    type: class
    glob:
      - ../../tests/t00057/t00057.c
      - ../../tests/t00057/src/t00057_impl.c

Source code

File t00057.c

#include "include/t00057.h"

struct t00057_A {
    int a1;
};

typedef struct t00057_B {
    int b1;
} t00057_B;

struct t00057_C {
    int c1;
};

union t00057_D {
    int d1;
    float d2;
};

struct t00057_E {
    int e;
    struct {
        int x;
        int y;
    } coordinates;
    union {
        int z;
        double t;
    } height;
};

struct t00057_R {
    struct t00057_A a;
    t00057_B b;
    struct t00057_C *c;
    union t00057_D d;
    struct t00057_E *e;
    struct t00057_F *f;
};

Generated UML diagrams

t00057_class