Implicitly expand argument packs when performing template argument
[clang.git] / include / clang / Checker / ManagerRegistry.h
blobebfd28e109308534fdf80b9b5158e5c30f7fca74
1 //===-- ManagerRegistry.h - Pluggable analyzer module registry --*- 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 file defines the ManagerRegistry and Register* classes.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_CLANG_ANALYSIS_MANAGER_REGISTRY_H
15 #define LLVM_CLANG_ANALYSIS_MANAGER_REGISTRY_H
17 #include "clang/Checker/PathSensitive/GRState.h"
19 namespace clang {
21 /// ManagerRegistry - This class records manager creators registered at
22 /// runtime. The information is communicated to AnalysisManager through static
23 /// members. Better design is expected.
25 class ManagerRegistry {
26 public:
27 static StoreManagerCreator StoreMgrCreator;
28 static ConstraintManagerCreator ConstraintMgrCreator;
31 /// RegisterConstraintManager - This class is used to setup the constraint
32 /// manager of the static analyzer. The constructor takes a creator function
33 /// pointer for creating the constraint manager.
34 ///
35 /// It is used like this:
36 ///
37 /// class MyConstraintManager {};
38 /// ConstraintManager* CreateMyConstraintManager(GRStateManager& statemgr) {
39 /// return new MyConstraintManager(statemgr);
40 /// }
41 /// RegisterConstraintManager X(CreateMyConstraintManager);
43 class RegisterConstraintManager {
44 public:
45 RegisterConstraintManager(ConstraintManagerCreator CMC) {
46 assert(ManagerRegistry::ConstraintMgrCreator == 0
47 && "ConstraintMgrCreator already set!");
48 ManagerRegistry::ConstraintMgrCreator = CMC;
53 #endif