forked from OSchip/llvm-project
Fixes for compilation with Microsoft Visual Studio 2010, from Steven Watanabe!
llvm-svn: 103458
This commit is contained in:
parent
6739a89117
commit
10dc8aa581
|
@ -156,7 +156,8 @@ public:
|
||||||
/// represents.
|
/// represents.
|
||||||
DeclContext::lookup_result getLookupResult(ASTContext &Context) {
|
DeclContext::lookup_result getLookupResult(ASTContext &Context) {
|
||||||
if (isNull())
|
if (isNull())
|
||||||
return DeclContext::lookup_result(0, 0);
|
return DeclContext::lookup_result(DeclContext::lookup_iterator(0),
|
||||||
|
DeclContext::lookup_iterator(0));
|
||||||
|
|
||||||
if (hasDeclarationIDs())
|
if (hasDeclarationIDs())
|
||||||
materializeDecls(Context);
|
materializeDecls(Context);
|
||||||
|
|
|
@ -59,7 +59,7 @@ private:
|
||||||
protected:
|
protected:
|
||||||
ProgramPoint(const void* P, Kind k, const LocationContext *l,
|
ProgramPoint(const void* P, Kind k, const LocationContext *l,
|
||||||
const void *tag = 0)
|
const void *tag = 0)
|
||||||
: Data(P, NULL), K(k), L(l), Tag(tag) {}
|
: Data(P, static_cast<const void*>(NULL)), K(k), L(l), Tag(tag) {}
|
||||||
|
|
||||||
ProgramPoint(const void* P1, const void* P2, Kind k, const LocationContext *l,
|
ProgramPoint(const void* P1, const void* P2, Kind k, const LocationContext *l,
|
||||||
const void *tag = 0)
|
const void *tag = 0)
|
||||||
|
|
|
@ -403,8 +403,10 @@ namespace clang {
|
||||||
|
|
||||||
friend class moving::ASTResultMover<Destroyer>;
|
friend class moving::ASTResultMover<Destroyer>;
|
||||||
|
|
||||||
|
#if !(defined(_MSC_VER) && _MSC_VER >= 1600)
|
||||||
ASTOwningResult(ASTOwningResult&); // DO NOT IMPLEMENT
|
ASTOwningResult(ASTOwningResult&); // DO NOT IMPLEMENT
|
||||||
ASTOwningResult& operator =(ASTOwningResult&); // DO NOT IMPLEMENT
|
ASTOwningResult& operator =(ASTOwningResult&); // DO NOT IMPLEMENT
|
||||||
|
#endif
|
||||||
|
|
||||||
void destroy() {
|
void destroy() {
|
||||||
if (Ptr) {
|
if (Ptr) {
|
||||||
|
@ -444,6 +446,19 @@ namespace clang {
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && _MSC_VER >= 1600
|
||||||
|
// Emulated move semantics don't work with msvc.
|
||||||
|
ASTOwningResult(ASTOwningResult &&mover)
|
||||||
|
: ActionInv(mover.ActionInv),
|
||||||
|
Ptr(mover.Ptr) {
|
||||||
|
mover.Ptr = 0;
|
||||||
|
}
|
||||||
|
ASTOwningResult &operator=(ASTOwningResult &&mover) {
|
||||||
|
*this = moving::ASTResultMover<Destroyer>(mover);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/// Assignment from a raw pointer. Takes ownership - beware!
|
/// Assignment from a raw pointer. Takes ownership - beware!
|
||||||
ASTOwningResult &operator=(void *raw) {
|
ASTOwningResult &operator=(void *raw) {
|
||||||
destroy();
|
destroy();
|
||||||
|
|
|
@ -811,12 +811,12 @@ DeclContext::lookup(DeclarationName Name) {
|
||||||
buildLookup(this);
|
buildLookup(this);
|
||||||
|
|
||||||
if (!LookupPtr)
|
if (!LookupPtr)
|
||||||
return lookup_result(0, 0);
|
return lookup_result(lookup_iterator(0), lookup_iterator(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
StoredDeclsMap::iterator Pos = LookupPtr->find(Name);
|
StoredDeclsMap::iterator Pos = LookupPtr->find(Name);
|
||||||
if (Pos == LookupPtr->end())
|
if (Pos == LookupPtr->end())
|
||||||
return lookup_result(0, 0);
|
return lookup_result(lookup_iterator(0), lookup_iterator(0));
|
||||||
return Pos->second.getLookupResult(getParentASTContext());
|
return Pos->second.getLookupResult(getParentASTContext());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1970,7 +1970,7 @@ void GRExprEngine::VisitCall(CallExpr* CE, ExplodedNode* Pred,
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
static std::pair<const void*,const void*> EagerlyAssumeTag
|
static std::pair<const void*,const void*> EagerlyAssumeTag
|
||||||
= std::pair<const void*,const void*>(&EagerlyAssumeTag,0);
|
= std::pair<const void*,const void*>(&EagerlyAssumeTag,static_cast<void*>(0));
|
||||||
|
|
||||||
void GRExprEngine::EvalEagerlyAssume(ExplodedNodeSet &Dst, ExplodedNodeSet &Src,
|
void GRExprEngine::EvalEagerlyAssume(ExplodedNodeSet &Dst, ExplodedNodeSet &Src,
|
||||||
Expr *Ex) {
|
Expr *Ex) {
|
||||||
|
|
Loading…
Reference in New Issue