File indexing completed on 2024-12-19 04:04:57
0001
0002
0003
0004
0005
0006
0007 #ifndef LLVM_CLANG_STATICANALYZER_CMS_SUPPORT_H
0008 #define LLVM_CLANG_STATICANALYZER_CMS_SUPPORT_H
0009
0010 #include <clang/AST/Type.h>
0011 #include <clang/AST/Decl.h>
0012 #include <clang/AST/DeclCXX.h>
0013 #include <string>
0014
0015 namespace clangcms {
0016
0017 namespace support {
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028 inline bool isConst(clang::QualType const &qt) {
0029 if (qt->isReferenceType()) {
0030
0031 return qt.getNonReferenceType().isConstQualified();
0032 }
0033 if (qt->isPointerType()) {
0034 clang::PointerType const *pt = qt->getAs<clang::PointerType>();
0035 assert(pt);
0036 return pt->getPointeeType().isConstQualified();
0037 }
0038
0039
0040 return qt.isConstQualified();
0041 }
0042
0043 bool isCmsLocalFile(const char *file);
0044 std::string getQualifiedName(const clang::NamedDecl &d);
0045 bool isSafeClassName(const std::string &d);
0046 bool isDataClass(const std::string &d);
0047 bool isInterestingLocation(const std::string &d);
0048 bool isKnownThrUnsafeFunc(const std::string &name);
0049 void writeLog(const std::string &ostring, const std::string &tfstring);
0050 void fixAnonNS(std::string &name, const char *fname);
0051 bool isStdAtomic(const clang::FieldDecl *fieldDecl);
0052 }
0053 }
0054 #endif