hello,everyone
I want to judge whether a function it is a C/C++ standard library function
or not,that is to say,I want to distinguish a function is a C/C++ standard
library function or written by users in his program.which clang API can I
use? thank you!
The simplest is to check whether the function is in the std:: namespace - although this only works for C++ headers.
A better method might be to get the SourceLocation of the FunctionDecl (e.g. with getLocStart()) and then use SourceManager :: isInSystemHeader and isInExternCSystemHeader.