Remove AnalysisBasedWarnings.h's dependency on Type.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112027 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/AnalysisBasedWarnings.cpp b/lib/Sema/AnalysisBasedWarnings.cpp
index c95dd14..b57f33d 100644
--- a/lib/Sema/AnalysisBasedWarnings.cpp
+++ b/lib/Sema/AnalysisBasedWarnings.cpp
@@ -380,12 +380,9 @@
S.SourceMgr.isInSystemHeader(D->getLocation()))
return;
- if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(D)) {
- // For function templates, class templates and member function templates
- // we'll do the analysis at instantiation time.
- if (FD->isDependentContext())
- return;
- }
+ // For code in dependent contexts, we'll do this at instantiation time.
+ if (cast<DeclContext>(D)->isDependentContext())
+ return;
const Stmt *Body = D->getBody();
assert(Body);
@@ -406,3 +403,21 @@
if (P.enableCheckUnreachable)
CheckUnreachable(S, AC);
}
+
+void clang::sema::
+AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P,
+ const BlockExpr *E) {
+ return IssueWarnings(P, E->getBlockDecl(), E->getType());
+}
+
+void clang::sema::
+AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P,
+ const ObjCMethodDecl *D) {
+ return IssueWarnings(P, D, QualType());
+}
+
+void clang::sema::
+AnalysisBasedWarnings::IssueWarnings(sema::AnalysisBasedWarnings::Policy P,
+ const FunctionDecl *D) {
+ return IssueWarnings(P, D, QualType());
+}