clang API Documentation
#include "ClangSACheckers.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h"
#include "clang/StaticAnalyzer/Core/Checker.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/Support/raw_ostream.h"
Go to the source code of this file.
Functions | |
static bool | IsLLVMStringRef (QualType T) |
static bool | InNamespace (const Decl *D, StringRef NS) |
static bool | IsStdString (QualType T) |
static bool | IsClangType (const RecordDecl *RD) |
static bool | IsClangDecl (const RecordDecl *RD) |
static bool | IsClangStmt (const RecordDecl *RD) |
static bool | IsClangAttr (const RecordDecl *RD) |
static bool | IsStdVector (QualType T) |
static bool | IsSmallVector (QualType T) |
static void | CheckStringRefAssignedTemporary (const Decl *D, BugReporter &BR, const CheckerBase *Checker) |
static bool | AllocatesMemory (QualType T) |
static bool | IsPartOfAST (const CXXRecordDecl *R) |
static void | CheckASTMemory (const CXXRecordDecl *R, BugReporter &BR, const CheckerBase *Checker) |
static bool AllocatesMemory | ( | QualType | T | ) | [static] |
Definition at line 195 of file LLVMConventionsChecker.cpp.
References IsSmallVector(), IsStdString(), and IsStdVector().
static void CheckASTMemory | ( | const CXXRecordDecl * | R, |
BugReporter & | BR, | ||
const CheckerBase * | Checker | ||
) | [static] |
Definition at line 233 of file LLVMConventionsChecker.cpp.
References IsPartOfAST().
static void CheckStringRefAssignedTemporary | ( | const Decl * | D, |
BugReporter & | BR, | ||
const CheckerBase * | Checker | ||
) | [static] |
Definition at line 139 of file LLVMConventionsChecker.cpp.
References clang::Decl::getBody().
static bool InNamespace | ( | const Decl * | D, |
StringRef | NS | ||
) | [static] |
Check whether the declaration is semantically inside the top-level namespace named by ns.
Definition at line 41 of file LLVMConventionsChecker.cpp.
References clang::Decl::getDeclContext(), clang::NamedDecl::getIdentifier(), and clang::IdentifierInfo::getName().
Referenced by IsClangAttr(), IsClangDecl(), IsClangStmt(), IsClangType(), IsSmallVector(), and IsStdVector().
static bool IsClangAttr | ( | const RecordDecl * | RD | ) | [static] |
Definition at line 79 of file LLVMConventionsChecker.cpp.
References clang::NamedDecl::getName(), and InNamespace().
Referenced by IsPartOfAST().
static bool IsClangDecl | ( | const RecordDecl * | RD | ) | [static] |
Definition at line 71 of file LLVMConventionsChecker.cpp.
References clang::NamedDecl::getName(), and InNamespace().
Referenced by IsPartOfAST().
static bool IsClangStmt | ( | const RecordDecl * | RD | ) | [static] |
Definition at line 75 of file LLVMConventionsChecker.cpp.
References clang::NamedDecl::getName(), and InNamespace().
Referenced by IsPartOfAST().
static bool IsClangType | ( | const RecordDecl * | RD | ) | [static] |
Definition at line 67 of file LLVMConventionsChecker.cpp.
References clang::NamedDecl::getName(), and InNamespace().
Referenced by IsPartOfAST().
static bool IsLLVMStringRef | ( | QualType | T | ) | [static] |
Definition at line 30 of file LLVMConventionsChecker.cpp.
References clang::Type::getAs().
static bool IsPartOfAST | ( | const CXXRecordDecl * | R | ) | [static] |
Definition at line 200 of file LLVMConventionsChecker.cpp.
References clang::CXXRecordDecl::bases(), clang::Type::getAs(), IsClangAttr(), IsClangDecl(), IsClangStmt(), and IsClangType().
Referenced by CheckASTMemory().
static bool IsSmallVector | ( | QualType | T | ) | [static] |
Definition at line 97 of file LLVMConventionsChecker.cpp.
References clang::Type::getAs(), clang::TemplateName::getAsTemplateDecl(), clang::NamedDecl::getName(), clang::TemplateSpecializationType::getTemplateName(), and InNamespace().
Referenced by AllocatesMemory().
static bool IsStdString | ( | QualType | T | ) | [static] |
Definition at line 51 of file LLVMConventionsChecker.cpp.
References clang::Type::getAs(), clang::TypedefType::getDecl(), clang::NamedDecl::getName(), and clang::Decl::isInStdNamespace().
Referenced by AllocatesMemory().
static bool IsStdVector | ( | QualType | T | ) | [static] |
Definition at line 83 of file LLVMConventionsChecker.cpp.
References clang::Type::getAs(), clang::TemplateName::getAsTemplateDecl(), clang::NamedDecl::getName(), clang::TemplateSpecializationType::getTemplateName(), and InNamespace().
Referenced by AllocatesMemory().