[cfe-commits] r91506 - /cfe/trunk/lib/Frontend/AnalysisConsumer.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Tue Dec 15 21:29:59 PST 2009
Author: zhongxingxu
Date: Tue Dec 15 23:29:59 2009
New Revision: 91506
URL: http://llvm.org/viewvc/llvm-project?rev=91506&view=rev
Log:
Expose C++ methods to GRExprEngine.
Modified:
cfe/trunk/lib/Frontend/AnalysisConsumer.cpp
Modified: cfe/trunk/lib/Frontend/AnalysisConsumer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/AnalysisConsumer.cpp?rev=91506&r1=91505&r2=91506&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/AnalysisConsumer.cpp (original)
+++ cfe/trunk/lib/Frontend/AnalysisConsumer.cpp Tue Dec 15 23:29:59 2009
@@ -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 @@
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;
}
More information about the cfe-commits
mailing list