19 using namespace clang;
39 if (isa<ObjCMethodDecl>(D) || isa<CXXMethodDecl>(D))
41 if (isa<BlockDecl>(D))
42 return "anonymous block";
55 StringRef BName = FD->getASTContext().BuiltinInfo.
getName(BId);
56 if (BName.find(Name) != StringRef::npos)
80 StringRef FName = II->
getName();
81 if (FName.equals(Name))
84 if (FName.startswith(
"__inline") && (FName.find(Name) != StringRef::npos))
87 if (FName.startswith(
"__") && FName.endswith(
"_chk") &&
88 FName.find(Name) != StringRef::npos)
static unsigned getSpelling(const Token &Tok, const char *&Buffer, const SourceManager &SourceMgr, const LangOptions &LangOpts, bool *Invalid=nullptr)
getSpelling - This method is used to get the spelling of a token into a preallocated buffer...
FunctionDecl - An instance of this class is created to represent a function declaration or definition...
StringRef getName() const
getName - Get the name of identifier for this declaration as a StringRef.
StringRef getCalleeName(const FunctionDecl *FunDecl) const
Get the name of the called function (path-sensitive).
IdentifierInfo * getIdentifier() const
getIdentifier - Get the identifier that names this declaration, if there is one.
StringRef getDeclDescription(const Decl *D)
Returns the word that should be used to refer to the declaration in the report.
const Expr * getCallee() const
One of these records is kept for each identifier that is lexed.
class LLVM_ALIGNAS(8) DependentTemplateSpecializationType const IdentifierInfo * Name
Represents a template specialization type whose template cannot be resolved, e.g. ...
const FunctionDecl * getCalleeDecl(const CallExpr *CE) const
Get the declaration of the called function (path-sensitive).
bool isTranslationUnit() const
const FunctionDecl * getAsFunctionDecl() const
getAsFunctionDecl - If this SVal is a MemRegionVal and wraps a CodeTextRegion wrapping a FunctionDecl...
const LocationContext * getLocationContext() const
Expr - This represents one expression.
StringRef getName() const
Return the actual identifier string.
const ProgramStateRef & getState() const
static bool isCLibraryFunction(const FunctionDecl *FD, StringRef Name=StringRef())
Returns true if the callee is an externally-visible function in the top-level namespace, such as malloc.
bool isInlined() const
Determine whether this function should be inlined, because it is either marked "inline" or "constexpr...
bool isExternallyVisible() const
Encodes a location in the source.
SVal - This represents a symbolic expression, which can be either an L-value or an R-value...
unsigned getBuiltinID() const
Returns a value indicating whether this function corresponds to a builtin function.
static StringRef getImmediateMacroName(SourceLocation Loc, const SourceManager &SM, const LangOptions &LangOpts)
Retrieve the name of the immediate macro expansion.
StringRef getMacroNameOrSpelling(SourceLocation &Loc)
Depending on wither the location corresponds to a macro, return either the macro name or the token sp...
const LangOptions & getLangOpts() const
DeclContext * getRedeclContext()
getRedeclContext - Retrieve the context in which an entity conflicts with other entities of the same ...
SourceManager & getSourceManager()
CallExpr - Represents a function call (C99 6.5.2.2, C++ [expr.call]).
Defines enum values for all the target-independent builtin functions.