Commit 85ef47bf authored by Kevin Modzelewski's avatar Kevin Modzelewski

Trying to run on more things now

parent c00c9ac6
......@@ -196,6 +196,9 @@ private:
return false;
auto pointed_to = t->getPointeeType();
while (auto pt = dyn_cast<ParenType>(pointed_to))
pointed_to = pt->getInnerType();
if (isa<BuiltinType>(pointed_to) || isa<FunctionType>(pointed_to))
return false;
......@@ -212,6 +215,13 @@ private:
return NULL;
}
if (isa<UnresolvedLookupExpr>(expr) || isa<CXXUnresolvedConstructExpr>(expr)
|| isa<CXXDependentScopeMemberExpr>(expr) || isa<CXXDependencScopeDeclRefExpr>(expr)) {
// Not really sure about this:
assert(!isRefcountedType(expr->getType()));
return NULL;
}
if (auto unaryop = dyn_cast<UnaryOperator>(expr)) {
handle(unaryop->getSubExpr(), state);
ASSERT(!isRefcountedType(unaryop->getType()), "implement me");
......@@ -243,6 +253,12 @@ private:
return state.createBorrowed();
}
if (auto thisexpr = dyn_cast<CXXThisExpr>(expr)) {
if (!isRefcountedType(thisexpr->getType()))
return NULL;
return state.createBorrowed();
}
if (auto refexpr = dyn_cast<DeclRefExpr>(expr)) {
if (!isRefcountedType(refexpr->getType())) {
return NULL;
......@@ -280,9 +296,17 @@ private:
if (isa<BuiltinType>(ft_ptr)) {
ft = NULL;
} else if (isa<TemplateSpecializationType>(ft_ptr)) {
// Not really sure about this:
ft = NULL;
} else {
ft_ptr->dump();
assert(ft_ptr->isPointerType());
ft = cast<FunctionProtoType>(ft_ptr->getPointeeType());
auto pointed_to = ft_ptr->getPointeeType();
while (auto pt = dyn_cast<ParenType>(pointed_to))
pointed_to = pt->getInnerType();
assert(isa<FunctionProtoType>(pointed_to));
ft = cast<FunctionProtoType>(pointed_to);
}
handle(callee, state);
......@@ -445,8 +469,8 @@ public:
//errs() << filename << '\n';
if (func->getNameInfo().getAsString() != "firstlineno")
return true;
//if (func->getNameInfo().getAsString() != "firstlineno")
//return true;
checkFunction(func);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment