summaryrefslogtreecommitdiffstats
path: root/lib/Sema/AnalysisBasedWarnings.h
blob: 39da1b14d4a926277b1c6767a62ba4775b135863 (plain)
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
//=- AnalysisBasedWarnings.h - Sema warnings based on libAnalysis -*- 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 AnalysisBasedWarnings, a worker object used by Sema
// that issues warnings based on dataflow-analysis.
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_SEMA_ANALYSIS_WARNINGS_H
#define LLVM_CLANG_SEMA_ANALYSIS_WARNINGS_H

namespace clang { namespace sema {

class AnalysisBasedWarnings {
  Sema &S;
  // The warnings to run.
  unsigned enableCheckFallThrough : 1;
  unsigned enableCheckUnreachable : 1;
  
public:

  AnalysisBasedWarnings(Sema &s);
  void IssueWarnings(const Decl *D, QualType BlockTy = QualType());
  
  void disableCheckFallThrough() { enableCheckFallThrough = 0; }
};
  
}} // end namespace clang::sema

#endif
OpenPOWER on IntegriCloud