Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 1 | //=== LLVMConventionsChecker.cpp - Check LLVM codebase conventions ---*- C++ -*- |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This defines LLVMConventionsChecker, a bunch of small little checks |
| 11 | // for checking specific coding conventions in the LLVM/Clang codebase. |
| 12 | // |
| 13 | //===----------------------------------------------------------------------===// |
| 14 | |
Argyrios Kyrtzidis | 9fb9474 | 2011-02-17 21:39:24 +0000 | [diff] [blame] | 15 | #include "ClangSACheckers.h" |
Argyrios Kyrtzidis | ec8605f | 2011-03-01 01:16:21 +0000 | [diff] [blame] | 16 | #include "clang/StaticAnalyzer/Core/Checker.h" |
Ted Kremenek | 9b66371 | 2011-02-10 01:03:03 +0000 | [diff] [blame] | 17 | #include "clang/StaticAnalyzer/Core/BugReporter/BugReporter.h" |
Argyrios Kyrtzidis | 9fb9474 | 2011-02-17 21:39:24 +0000 | [diff] [blame] | 18 | #include "clang/AST/DeclTemplate.h" |
| 19 | #include "clang/AST/StmtVisitor.h" |
Benjamin Kramer | 8fe83e1 | 2012-02-04 13:45:25 +0000 | [diff] [blame] | 20 | #include "llvm/ADT/SmallString.h" |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 21 | |
| 22 | using namespace clang; |
Ted Kremenek | 9ef6537 | 2010-12-23 07:20:52 +0000 | [diff] [blame] | 23 | using namespace ento; |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 24 | |
| 25 | //===----------------------------------------------------------------------===// |
Ted Kremenek | 55abf16 | 2010-02-14 19:08:36 +0000 | [diff] [blame] | 26 | // Generic type checking routines. |
| 27 | //===----------------------------------------------------------------------===// |
| 28 | |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 29 | static bool IsLLVMStringRef(QualType T) { |
Ted Kremenek | 55abf16 | 2010-02-14 19:08:36 +0000 | [diff] [blame] | 30 | const RecordType *RT = T->getAs<RecordType>(); |
| 31 | if (!RT) |
| 32 | return false; |
| 33 | |
Chris Lattner | 5f9e272 | 2011-07-23 10:55:15 +0000 | [diff] [blame] | 34 | return StringRef(QualType(RT, 0).getAsString()) == |
| 35 | "class StringRef"; |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 36 | } |
| 37 | |
Nick Lewycky | 31b5c4b | 2010-05-30 18:05:23 +0000 | [diff] [blame] | 38 | /// Check whether the declaration is semantically inside the top-level |
| 39 | /// namespace named by ns. |
Chris Lattner | 5f9e272 | 2011-07-23 10:55:15 +0000 | [diff] [blame] | 40 | static bool InNamespace(const Decl *D, StringRef NS) { |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 41 | const NamespaceDecl *ND = dyn_cast<NamespaceDecl>(D->getDeclContext()); |
| 42 | if (!ND) |
| 43 | return false; |
| 44 | const IdentifierInfo *II = ND->getIdentifier(); |
Nick Lewycky | 31b5c4b | 2010-05-30 18:05:23 +0000 | [diff] [blame] | 45 | if (!II || !II->getName().equals(NS)) |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 46 | return false; |
Ted Kremenek | c39b5e8 | 2011-01-14 22:31:41 +0000 | [diff] [blame] | 47 | return isa<TranslationUnitDecl>(ND->getDeclContext()); |
Ted Kremenek | 55abf16 | 2010-02-14 19:08:36 +0000 | [diff] [blame] | 48 | } |
| 49 | |
| 50 | static bool IsStdString(QualType T) { |
Abramo Bagnara | 465d41b | 2010-05-11 21:36:43 +0000 | [diff] [blame] | 51 | if (const ElaboratedType *QT = T->getAs<ElaboratedType>()) |
Ted Kremenek | 55abf16 | 2010-02-14 19:08:36 +0000 | [diff] [blame] | 52 | T = QT->getNamedType(); |
| 53 | |
| 54 | const TypedefType *TT = T->getAs<TypedefType>(); |
| 55 | if (!TT) |
| 56 | return false; |
| 57 | |
Richard Smith | 162e1c1 | 2011-04-15 14:24:37 +0000 | [diff] [blame] | 58 | const TypedefNameDecl *TD = TT->getDecl(); |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 59 | |
Nick Lewycky | 31b5c4b | 2010-05-30 18:05:23 +0000 | [diff] [blame] | 60 | if (!InNamespace(TD, "std")) |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 61 | return false; |
| 62 | |
| 63 | return TD->getName() == "string"; |
| 64 | } |
| 65 | |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 66 | static bool IsClangType(const RecordDecl *RD) { |
Nick Lewycky | 31b5c4b | 2010-05-30 18:05:23 +0000 | [diff] [blame] | 67 | return RD->getName() == "Type" && InNamespace(RD, "clang"); |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | static bool IsClangDecl(const RecordDecl *RD) { |
Nick Lewycky | 31b5c4b | 2010-05-30 18:05:23 +0000 | [diff] [blame] | 71 | return RD->getName() == "Decl" && InNamespace(RD, "clang"); |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 72 | } |
| 73 | |
| 74 | static bool IsClangStmt(const RecordDecl *RD) { |
Nick Lewycky | 31b5c4b | 2010-05-30 18:05:23 +0000 | [diff] [blame] | 75 | return RD->getName() == "Stmt" && InNamespace(RD, "clang"); |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 76 | } |
| 77 | |
Nick Lewycky | 31b5c4b | 2010-05-30 18:05:23 +0000 | [diff] [blame] | 78 | static bool IsClangAttr(const RecordDecl *RD) { |
| 79 | return RD->getName() == "Attr" && InNamespace(RD, "clang"); |
Ted Kremenek | 1ed482b | 2010-02-14 22:58:16 +0000 | [diff] [blame] | 80 | } |
| 81 | |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 82 | static bool IsStdVector(QualType T) { |
| 83 | const TemplateSpecializationType *TS = T->getAs<TemplateSpecializationType>(); |
| 84 | if (!TS) |
Ted Kremenek | 55abf16 | 2010-02-14 19:08:36 +0000 | [diff] [blame] | 85 | return false; |
| 86 | |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 87 | TemplateName TM = TS->getTemplateName(); |
| 88 | TemplateDecl *TD = TM.getAsTemplateDecl(); |
| 89 | |
Nick Lewycky | 31b5c4b | 2010-05-30 18:05:23 +0000 | [diff] [blame] | 90 | if (!TD || !InNamespace(TD, "std")) |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 91 | return false; |
| 92 | |
| 93 | return TD->getName() == "vector"; |
| 94 | } |
| 95 | |
| 96 | static bool IsSmallVector(QualType T) { |
| 97 | const TemplateSpecializationType *TS = T->getAs<TemplateSpecializationType>(); |
| 98 | if (!TS) |
| 99 | return false; |
| 100 | |
| 101 | TemplateName TM = TS->getTemplateName(); |
| 102 | TemplateDecl *TD = TM.getAsTemplateDecl(); |
| 103 | |
Nick Lewycky | 31b5c4b | 2010-05-30 18:05:23 +0000 | [diff] [blame] | 104 | if (!TD || !InNamespace(TD, "llvm")) |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 105 | return false; |
| 106 | |
| 107 | return TD->getName() == "SmallVector"; |
Ted Kremenek | 55abf16 | 2010-02-14 19:08:36 +0000 | [diff] [blame] | 108 | } |
| 109 | |
| 110 | //===----------------------------------------------------------------------===// |
Chris Lattner | 5f9e272 | 2011-07-23 10:55:15 +0000 | [diff] [blame] | 111 | // CHECK: a StringRef should not be bound to a temporary std::string whose |
Ted Kremenek | 55abf16 | 2010-02-14 19:08:36 +0000 | [diff] [blame] | 112 | // lifetime is shorter than the StringRef's. |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 113 | //===----------------------------------------------------------------------===// |
| 114 | |
| 115 | namespace { |
| 116 | class StringRefCheckerVisitor : public StmtVisitor<StringRefCheckerVisitor> { |
| 117 | BugReporter &BR; |
| 118 | public: |
| 119 | StringRefCheckerVisitor(BugReporter &br) : BR(br) {} |
| 120 | void VisitChildren(Stmt *S) { |
| 121 | for (Stmt::child_iterator I = S->child_begin(), E = S->child_end() ; |
| 122 | I != E; ++I) |
| 123 | if (Stmt *child = *I) |
| 124 | Visit(child); |
| 125 | } |
| 126 | void VisitStmt(Stmt *S) { VisitChildren(S); } |
| 127 | void VisitDeclStmt(DeclStmt *DS); |
| 128 | private: |
| 129 | void VisitVarDecl(VarDecl *VD); |
| 130 | }; |
| 131 | } // end anonymous namespace |
| 132 | |
| 133 | static void CheckStringRefAssignedTemporary(const Decl *D, BugReporter &BR) { |
| 134 | StringRefCheckerVisitor walker(BR); |
| 135 | walker.Visit(D->getBody()); |
| 136 | } |
| 137 | |
| 138 | void StringRefCheckerVisitor::VisitDeclStmt(DeclStmt *S) { |
Ted Kremenek | 005f09b | 2010-02-14 19:08:43 +0000 | [diff] [blame] | 139 | VisitChildren(S); |
| 140 | |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 141 | for (DeclStmt::decl_iterator I = S->decl_begin(), E = S->decl_end();I!=E; ++I) |
| 142 | if (VarDecl *VD = dyn_cast<VarDecl>(*I)) |
| 143 | VisitVarDecl(VD); |
| 144 | } |
| 145 | |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 146 | void StringRefCheckerVisitor::VisitVarDecl(VarDecl *VD) { |
| 147 | Expr *Init = VD->getInit(); |
| 148 | if (!Init) |
Ted Kremenek | 676ca15 | 2010-02-14 19:09:05 +0000 | [diff] [blame] | 149 | return; |
Ted Kremenek | 55abf16 | 2010-02-14 19:08:36 +0000 | [diff] [blame] | 150 | |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 151 | // Pattern match for: |
Chris Lattner | 5f9e272 | 2011-07-23 10:55:15 +0000 | [diff] [blame] | 152 | // StringRef x = call() (where call returns std::string) |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 153 | if (!IsLLVMStringRef(VD->getType())) |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 154 | return; |
John McCall | 4765fa0 | 2010-12-06 08:20:24 +0000 | [diff] [blame] | 155 | ExprWithCleanups *Ex1 = dyn_cast<ExprWithCleanups>(Init); |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 156 | if (!Ex1) |
| 157 | return; |
| 158 | CXXConstructExpr *Ex2 = dyn_cast<CXXConstructExpr>(Ex1->getSubExpr()); |
| 159 | if (!Ex2 || Ex2->getNumArgs() != 1) |
| 160 | return; |
| 161 | ImplicitCastExpr *Ex3 = dyn_cast<ImplicitCastExpr>(Ex2->getArg(0)); |
| 162 | if (!Ex3) |
| 163 | return; |
| 164 | CXXConstructExpr *Ex4 = dyn_cast<CXXConstructExpr>(Ex3->getSubExpr()); |
| 165 | if (!Ex4 || Ex4->getNumArgs() != 1) |
| 166 | return; |
| 167 | ImplicitCastExpr *Ex5 = dyn_cast<ImplicitCastExpr>(Ex4->getArg(0)); |
| 168 | if (!Ex5) |
| 169 | return; |
| 170 | CXXBindTemporaryExpr *Ex6 = dyn_cast<CXXBindTemporaryExpr>(Ex5->getSubExpr()); |
| 171 | if (!Ex6 || !IsStdString(Ex6->getType())) |
| 172 | return; |
Ted Kremenek | 55abf16 | 2010-02-14 19:08:36 +0000 | [diff] [blame] | 173 | |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 174 | // Okay, badness! Report an error. |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 175 | const char *desc = "StringRef should not be bound to temporary " |
| 176 | "std::string that it outlives"; |
Anna Zaks | 590dd8e | 2011-09-20 21:38:35 +0000 | [diff] [blame] | 177 | PathDiagnosticLocation VDLoc = |
| 178 | PathDiagnosticLocation::createBegin(VD, BR.getSourceManager()); |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 179 | BR.EmitBasicReport(desc, "LLVM Conventions", desc, |
Anna Zaks | 590dd8e | 2011-09-20 21:38:35 +0000 | [diff] [blame] | 180 | VDLoc, Init->getSourceRange()); |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 181 | } |
| 182 | |
| 183 | //===----------------------------------------------------------------------===// |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 184 | // CHECK: Clang AST nodes should not have fields that can allocate |
| 185 | // memory. |
| 186 | //===----------------------------------------------------------------------===// |
| 187 | |
| 188 | static bool AllocatesMemory(QualType T) { |
| 189 | return IsStdVector(T) || IsStdString(T) || IsSmallVector(T); |
| 190 | } |
| 191 | |
| 192 | // This type checking could be sped up via dynamic programming. |
| 193 | static bool IsPartOfAST(const CXXRecordDecl *R) { |
Nick Lewycky | 31b5c4b | 2010-05-30 18:05:23 +0000 | [diff] [blame] | 194 | if (IsClangStmt(R) || IsClangType(R) || IsClangDecl(R) || IsClangAttr(R)) |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 195 | return true; |
| 196 | |
| 197 | for (CXXRecordDecl::base_class_const_iterator I = R->bases_begin(), |
| 198 | E = R->bases_end(); I!=E; ++I) { |
| 199 | CXXBaseSpecifier BS = *I; |
| 200 | QualType T = BS.getType(); |
| 201 | if (const RecordType *baseT = T->getAs<RecordType>()) { |
| 202 | CXXRecordDecl *baseD = cast<CXXRecordDecl>(baseT->getDecl()); |
| 203 | if (IsPartOfAST(baseD)) |
| 204 | return true; |
| 205 | } |
| 206 | } |
| 207 | |
| 208 | return false; |
| 209 | } |
| 210 | |
| 211 | namespace { |
| 212 | class ASTFieldVisitor { |
Chris Lattner | 5f9e272 | 2011-07-23 10:55:15 +0000 | [diff] [blame] | 213 | SmallVector<FieldDecl*, 10> FieldChain; |
Argyrios Kyrtzidis | 9fb9474 | 2011-02-17 21:39:24 +0000 | [diff] [blame] | 214 | const CXXRecordDecl *Root; |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 215 | BugReporter &BR; |
| 216 | public: |
Argyrios Kyrtzidis | 9fb9474 | 2011-02-17 21:39:24 +0000 | [diff] [blame] | 217 | ASTFieldVisitor(const CXXRecordDecl *root, BugReporter &br) |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 218 | : Root(root), BR(br) {} |
| 219 | |
| 220 | void Visit(FieldDecl *D); |
| 221 | void ReportError(QualType T); |
| 222 | }; |
| 223 | } // end anonymous namespace |
| 224 | |
Argyrios Kyrtzidis | 9fb9474 | 2011-02-17 21:39:24 +0000 | [diff] [blame] | 225 | static void CheckASTMemory(const CXXRecordDecl *R, BugReporter &BR) { |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 226 | if (!IsPartOfAST(R)) |
| 227 | return; |
| 228 | |
| 229 | for (RecordDecl::field_iterator I = R->field_begin(), E = R->field_end(); |
| 230 | I != E; ++I) { |
| 231 | ASTFieldVisitor walker(R, BR); |
| 232 | walker.Visit(*I); |
| 233 | } |
| 234 | } |
| 235 | |
| 236 | void ASTFieldVisitor::Visit(FieldDecl *D) { |
| 237 | FieldChain.push_back(D); |
| 238 | |
| 239 | QualType T = D->getType(); |
| 240 | |
| 241 | if (AllocatesMemory(T)) |
| 242 | ReportError(T); |
| 243 | |
| 244 | if (const RecordType *RT = T->getAs<RecordType>()) { |
| 245 | const RecordDecl *RD = RT->getDecl()->getDefinition(); |
| 246 | for (RecordDecl::field_iterator I = RD->field_begin(), E = RD->field_end(); |
| 247 | I != E; ++I) |
| 248 | Visit(*I); |
| 249 | } |
| 250 | |
| 251 | FieldChain.pop_back(); |
| 252 | } |
| 253 | |
| 254 | void ASTFieldVisitor::ReportError(QualType T) { |
Dylan Noblesmith | f7ccbad | 2012-02-05 02:13:05 +0000 | [diff] [blame] | 255 | SmallString<1024> buf; |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 256 | llvm::raw_svector_ostream os(buf); |
| 257 | |
| 258 | os << "AST class '" << Root->getName() << "' has a field '" |
| 259 | << FieldChain.front()->getName() << "' that allocates heap memory"; |
| 260 | if (FieldChain.size() > 1) { |
| 261 | os << " via the following chain: "; |
| 262 | bool isFirst = true; |
Chris Lattner | 5f9e272 | 2011-07-23 10:55:15 +0000 | [diff] [blame] | 263 | for (SmallVectorImpl<FieldDecl*>::iterator I=FieldChain.begin(), |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 264 | E=FieldChain.end(); I!=E; ++I) { |
| 265 | if (!isFirst) |
| 266 | os << '.'; |
| 267 | else |
| 268 | isFirst = false; |
| 269 | os << (*I)->getName(); |
| 270 | } |
| 271 | } |
| 272 | os << " (type " << FieldChain.back()->getType().getAsString() << ")"; |
| 273 | os.flush(); |
| 274 | |
| 275 | // Note that this will fire for every translation unit that uses this |
| 276 | // class. This is suboptimal, but at least scan-build will merge |
| 277 | // duplicate HTML reports. In the future we need a unified way of merging |
| 278 | // duplicate reports across translation units. For C++ classes we cannot |
| 279 | // just report warnings when we see an out-of-line method definition for a |
| 280 | // class, as that heuristic doesn't always work (the complete definition of |
| 281 | // the class may be in the header file, for example). |
Anna Zaks | 590dd8e | 2011-09-20 21:38:35 +0000 | [diff] [blame] | 282 | PathDiagnosticLocation L = PathDiagnosticLocation::createBegin( |
| 283 | FieldChain.front(), BR.getSourceManager()); |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 284 | BR.EmitBasicReport("AST node allocates heap memory", "LLVM Conventions", |
Anna Zaks | 590dd8e | 2011-09-20 21:38:35 +0000 | [diff] [blame] | 285 | os.str(), L); |
Ted Kremenek | a6b8793 | 2010-02-14 19:09:13 +0000 | [diff] [blame] | 286 | } |
| 287 | |
| 288 | //===----------------------------------------------------------------------===// |
Argyrios Kyrtzidis | 9fb9474 | 2011-02-17 21:39:24 +0000 | [diff] [blame] | 289 | // LLVMConventionsChecker |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 290 | //===----------------------------------------------------------------------===// |
| 291 | |
Argyrios Kyrtzidis | 9fb9474 | 2011-02-17 21:39:24 +0000 | [diff] [blame] | 292 | namespace { |
Argyrios Kyrtzidis | ec8605f | 2011-03-01 01:16:21 +0000 | [diff] [blame] | 293 | class LLVMConventionsChecker : public Checker< |
Argyrios Kyrtzidis | 9fb9474 | 2011-02-17 21:39:24 +0000 | [diff] [blame] | 294 | check::ASTDecl<CXXRecordDecl>, |
| 295 | check::ASTCodeBody > { |
| 296 | public: |
| 297 | void checkASTDecl(const CXXRecordDecl *R, AnalysisManager& mgr, |
| 298 | BugReporter &BR) const { |
John McCall | 5e1cdac | 2011-10-07 06:10:15 +0000 | [diff] [blame] | 299 | if (R->isCompleteDefinition()) |
Argyrios Kyrtzidis | 9fb9474 | 2011-02-17 21:39:24 +0000 | [diff] [blame] | 300 | CheckASTMemory(R, BR); |
Ted Kremenek | 676ca15 | 2010-02-14 19:09:05 +0000 | [diff] [blame] | 301 | } |
Argyrios Kyrtzidis | 9fb9474 | 2011-02-17 21:39:24 +0000 | [diff] [blame] | 302 | |
| 303 | void checkASTCodeBody(const Decl *D, AnalysisManager& mgr, |
| 304 | BugReporter &BR) const { |
| 305 | CheckStringRefAssignedTemporary(D, BR); |
| 306 | } |
| 307 | }; |
Ted Kremenek | 6dd66ed | 2010-02-14 02:45:18 +0000 | [diff] [blame] | 308 | } |
Ted Kremenek | 676ca15 | 2010-02-14 19:09:05 +0000 | [diff] [blame] | 309 | |
Argyrios Kyrtzidis | 9fb9474 | 2011-02-17 21:39:24 +0000 | [diff] [blame] | 310 | void ento::registerLLVMConventionsChecker(CheckerManager &mgr) { |
| 311 | mgr.registerChecker<LLVMConventionsChecker>(); |
Ted Kremenek | 676ca15 | 2010-02-14 19:09:05 +0000 | [diff] [blame] | 312 | } |