blob: 39da1b14d4a926277b1c6767a62ba4775b135863 [file] [log] [blame]
Ted Kremenek918fe842010-03-20 21:06:02 +00001//=- AnalysisBasedWarnings.h - Sema warnings based on libAnalysis -*- 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 AnalysisBasedWarnings, a worker object used by Sema
11// that issues warnings based on dataflow-analysis.
12//===----------------------------------------------------------------------===//
13
14#ifndef LLVM_CLANG_SEMA_ANALYSIS_WARNINGS_H
15#define LLVM_CLANG_SEMA_ANALYSIS_WARNINGS_H
16
17namespace clang { namespace sema {
18
19class AnalysisBasedWarnings {
20 Sema &S;
21 // The warnings to run.
22 unsigned enableCheckFallThrough : 1;
23 unsigned enableCheckUnreachable : 1;
24
25public:
26
27 AnalysisBasedWarnings(Sema &s);
28 void IssueWarnings(const Decl *D, QualType BlockTy = QualType());
29
30 void disableCheckFallThrough() { enableCheckFallThrough = 0; }
31};
32
33}} // end namespace clang::sema
34
35#endif