call clang with option "-x c++" if source.c contains C++
When clang compiles a C++ source with file extension ".c", it generates the warning
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
I guess this warning could be suppressed by calling clang with "-x c++".