Zhongxing Xu | fda7832 | 2009-07-30 09:11:52 +0000 | [diff] [blame] | 1 | //== AnalysisManager.cpp - Path sensitive analysis data manager ----*- 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 implements the AnalysisManager class. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #include "clang/Analysis/PathSensitive/AnalysisManager.h" |
| 15 | #include "clang/Basic/SourceManager.h" |
Zhongxing Xu | fda7832 | 2009-07-30 09:11:52 +0000 | [diff] [blame] | 16 | |
| 17 | using namespace clang; |
| 18 | |
| 19 | void AnalysisManager::DisplayFunction() { |
| 20 | |
| 21 | if (DisplayedFunction) |
| 22 | return; |
| 23 | |
| 24 | DisplayedFunction = true; |
| 25 | |
| 26 | // FIXME: Is getCodeDecl() always a named decl? |
| 27 | if (isa<FunctionDecl>(getCodeDecl()) || |
| 28 | isa<ObjCMethodDecl>(getCodeDecl())) { |
Ted Kremenek | 2376002 | 2009-08-21 23:58:43 +0000 | [diff] [blame] | 29 | const NamedDecl *ND = cast<NamedDecl>(getCodeDecl()); |
Zhongxing Xu | 5032ffe | 2009-08-25 06:51:30 +0000 | [diff] [blame] | 30 | SourceManager &SM = getASTContext().getSourceManager(); |
Benjamin Kramer | 6cb7c1a | 2009-08-23 12:08:50 +0000 | [diff] [blame] | 31 | llvm::errs() << "ANALYZE: " |
| 32 | << SM.getPresumedLoc(ND->getLocation()).getFilename() |
| 33 | << ' ' << ND->getNameAsString() << '\n'; |
Zhongxing Xu | fda7832 | 2009-07-30 09:11:52 +0000 | [diff] [blame] | 34 | } |
| 35 | } |