aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Analysis/Analyses/UninitializedValues.h
blob: b966f3a90ffff7831d51f08cf31a0e5ba5aa4c80 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//= UninitializedValues.h - Finding uses of uninitialized values --*- C++ -*-==//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file defines APIs for invoking and reported uninitialized values
// warnings.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_UNINIT_VALS_H
#define LLVM_CLANG_UNINIT_VALS_H

namespace clang {

class AnalysisContext;
class CFG;  
class DeclContext;
class Expr;
class VarDecl;
  
class UninitVariablesHandler {
public:
  UninitVariablesHandler() {}
  virtual ~UninitVariablesHandler();
  
  virtual void handleUseOfUninitVariable(const Expr *ex,
                                         const VarDecl *vd,
                                         bool isAlwaysUninit) {}
};
  
void runUninitializedVariablesAnalysis(const DeclContext &dc, const CFG &cfg,
                                       AnalysisContext &ac,
                                       UninitVariablesHandler &handler);

}
#endif