File indexing completed on 2024-04-06 12:31:50
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 return pt->getPointeeType().isConstQualified();
0036 }
0037
0038
0039 return qt.isConstQualified();
0040 }
0041
0042 bool isCmsLocalFile(const char *file);
0043 std::string getQualifiedName(const clang::NamedDecl &d);
0044 bool isSafeClassName(const std::string &d);
0045 bool isDataClass(const std::string &d);
0046 bool isInterestingLocation(const std::string &d);
0047 bool isKnownThrUnsafeFunc(const std::string &name);
0048 void writeLog(const std::string &ostring, const std::string &tfstring);
0049 void fixAnonNS(std::string &name, const char *fname);
0050 }
0051 }
0052
0053 #endif