[cfe-commits] r161567 - in /cfe/trunk: include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h lib/StaticAnalyzer/Core/CallEvent.cpp lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
Anna Zaks
ganna at apple.com
Wed Aug 8 19:57:02 PDT 2012
Author: zaks
Date: Wed Aug 8 21:57:02 2012
New Revision: 161567
URL: http://llvm.org/viewvc/llvm-project?rev=161567&view=rev
Log:
Unbreak the build.
Declaring "const Decl *Decl" is not a good idea.
Modified:
cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp
cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
Modified: cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h?rev=161567&r1=161566&r2=161567&view=diff
==============================================================================
--- cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h (original)
+++ cfe/trunk/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h Wed Aug 8 21:57:02 2012
@@ -68,12 +68,15 @@
}
};
-struct RuntimeDefinition {
- const Decl *Decl;
- const MemRegion *Reg;
- RuntimeDefinition(): Decl(0), Reg(0) {}
- RuntimeDefinition(const class Decl *D): Decl(D), Reg(0) {}
- RuntimeDefinition(const class Decl *D, const MemRegion *R): Decl(D), Reg(R){}
+class RuntimeDefinition {
+ const Decl *D;
+ const MemRegion *R;
+public:
+ RuntimeDefinition(): D(0), R(0) {}
+ RuntimeDefinition(const Decl *InD): D(InD), R(0) {}
+ RuntimeDefinition(const Decl *InD, const MemRegion *InR): D(InD), R(InR) {}
+ const Decl *getDecl() { return D;}
+ const MemRegion *getReg() {return R;}
};
/// \brief Represents an abstract call to a function or method along a
Modified: cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp?rev=161567&r1=161566&r2=161567&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp Wed Aug 8 21:57:02 2012
@@ -383,7 +383,7 @@
RuntimeDefinition CXXInstanceCall::getRuntimeDefinition() const {
- const Decl *D = SimpleCall::getRuntimeDefinition().Decl;
+ const Decl *D = SimpleCall::getRuntimeDefinition().getDecl();
if (!D)
return RuntimeDefinition();
@@ -513,7 +513,7 @@
}
RuntimeDefinition CXXDestructorCall::getRuntimeDefinition() const {
- const Decl *D = AnyFunctionCall::getRuntimeDefinition().Decl;
+ const Decl *D = AnyFunctionCall::getRuntimeDefinition().getDecl();
if (!D)
return RuntimeDefinition();
Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp?rev=161567&r1=161566&r2=161567&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp Wed Aug 8 21:57:02 2012
@@ -545,10 +545,10 @@
State = InlinedFailedState;
} else if (getAnalysisManager().shouldInlineCall()) {
RuntimeDefinition RD = Call->getRuntimeDefinition();
- const Decl *D = RD.Decl;
+ const Decl *D = RD.getDecl();
if (D) {
// Explore with and without inlining the call.
- const MemRegion *BifurReg = RD.Reg;
+ const MemRegion *BifurReg = RD.getReg();
if (BifurReg &&
getAnalysisManager().IPAMode == DynamicDispatchBifurcate) {
BifurcateCall(BifurReg, *Call, D, Bldr, Pred);
More information about the cfe-commits
mailing list