LibTooling error

When I am using libTooling to run a FrontendAction on a c file, I got the error:
Skipping XXXXXX.c. Command line not found.

I find out in the source code that this means the CompilationDatabase is missing. Can anyone let me know how to fix it? I think it must be pretty easy for non-beginners…