check filetype of buffer, only handle c, cpp, objc