зеркало из https://github.com/microsoft/clang-1.git
Expose C++ methods to GRExprEngine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91506 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
51b939fe14
Коммит
802be99a68
|
@ -14,6 +14,7 @@
|
|||
#include "clang/Frontend/AnalysisConsumer.h"
|
||||
#include "clang/AST/ASTConsumer.h"
|
||||
#include "clang/AST/Decl.h"
|
||||
#include "clang/AST/DeclCXX.h"
|
||||
#include "clang/AST/DeclObjC.h"
|
||||
#include "clang/AST/ParentMap.h"
|
||||
#include "clang/Analysis/Analyses/LiveVariables.h"
|
||||
|
@ -228,6 +229,19 @@ void AnalysisConsumer::HandleTopLevelSingleDecl(Decl *D) {
|
|||
break;
|
||||
}
|
||||
|
||||
case Decl::CXXMethod: {
|
||||
CXXMethodDecl *CXXMD = cast<CXXMethodDecl>(D);
|
||||
|
||||
if (Opts.AnalyzeSpecificFunction.size() > 0 &&
|
||||
Opts.AnalyzeSpecificFunction != CXXMD->getName())
|
||||
return;
|
||||
|
||||
Stmt *Body = CXXMD->getBody();
|
||||
if (Body)
|
||||
HandleCode(CXXMD, Body, FunctionActions);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче