(LibTooling) (scan-build-py) Link commands in the CompilationDatabase JSON

Sure, here's a dummy project.
Let's assume the following Makefile.

all:
        g++ -std=c++11 main.cpp MyType.cpp impl1.cpp
        g++ -std=c++11 main.cpp MyType.cpp impl2.cpp
        g++ -std=c++11 main.cpp MyType_custom.cpp impl1.cpp
        g++ -std=c++11 main.cpp MyType_custom.cpp impl2.cpp
        g++ -std=c++11 other.cpp

ownfiles:
        g++ -std=c++11 main.cpp MyType.cpp impl1.cpp -o impl1.out
        g++ -std=c++11 main.cpp MyType.cpp impl2.cpp -o impl2.out
        g++ -std=c++11 main.cpp MyType_custom.cpp impl1.cpp -o impl1c.out
        g++ -std=c++11 main.cpp MyType_custom.cpp impl2.cpp -o impl2c.out
        g++ -std=c++11 other.cpp -o other.out

I have attached, to this mail, the corresponding outputs. They are
roughly the same, because each command invoked is a one-liner which
compiles -and- builds. (In case of us having a link command, it would
be as I explained earlier, the file: key being the object file.)

But let me copy the most important information to the body of the mail:

    {
        "directory": "/home/whisperity/untitled",
        "command": "g++ [yadda] -std=c++11
/home/whisperity/untitled/main.cpp
/home/whisperity/untitled/MyType.cpp
/home/whisperity/untitled/impl1.cpp",
        "file": "/home/whisperity/untitled/main.cpp"
    },
    {
        "directory": "/home/whisperity/untitled",
        "command": "g++ [yadda] -std=c++11
/home/whisperity/untitled/main.cpp
/home/whisperity/untitled/MyType.cpp
/home/whisperity/untitled/impl2.cpp",
        "file": "/home/whisperity/untitled/main.cpp"
    }

From the command, we see, that there was an object or binary formed

(albeit we don't know its name) by using "main-MyType-impl1" and
another by using "main-MyType-impl2".

Actually we -could- be up for a new file, but isn't creating an
entirely new file and format and pushing it through much harder to
implement than a few filters in the existing tooling?

all.build.json (5.03 KB)

ownfiles.build.json (5.53 KB)