diff options
author | Dan Gohman <gohman@apple.com> | 2010-07-06 15:23:00 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-07-06 15:23:00 +0000 |
commit | 0ce249911b85e076defd9a895b8197af02091d2d (patch) | |
tree | 051a884ace70ebd929308a3048f206424ceec0e0 | |
parent | d3b6e41ffb6aae6a1efc31b0a9f9050234570841 (diff) | |
download | external_llvm-0ce249911b85e076defd9a895b8197af02091d2d.zip external_llvm-0ce249911b85e076defd9a895b8197af02091d2d.tar.gz external_llvm-0ce249911b85e076defd9a895b8197af02091d2d.tar.bz2 |
Add some more TODO comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107657 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Analysis/Lint.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Analysis/Lint.cpp b/lib/Analysis/Lint.cpp index b1aa4ca..60654e6 100644 --- a/lib/Analysis/Lint.cpp +++ b/lib/Analysis/Lint.cpp @@ -201,6 +201,8 @@ void Lint::visitFunction(Function &F) { // fairly common mistake to neglect to name a function. Assert1(F.hasName() || F.hasLocalLinkage(), "Unusual: Unnamed function with non-local linkage", &F); + + // TODO: Check for irreducible control flow. } void Lint::visitCallSite(CallSite CS) { @@ -224,6 +226,7 @@ void Lint::visitCallSite(CallSite CS) { "argument count", &I); // Check argument types (in case the callee was casted) and attributes. + // TODO: Verify that caller and callee attributes are compatible. Function::arg_iterator PI = F->arg_begin(), PE = F->arg_end(); CallSite::arg_iterator AI = CS.arg_begin(), AE = CS.arg_end(); for (; AI != AE; ++AI) { @@ -361,6 +364,7 @@ void Lint::visitReturnInst(ReturnInst &I) { } // TODO: Check that the reference is in bounds. +// TODO: Check readnone/readonly function attributes. void Lint::visitMemoryReference(Instruction &I, Value *Ptr, unsigned Size, unsigned Align, const Type *Ty, unsigned Flags) { @@ -501,6 +505,8 @@ void Lint::visitAllocaInst(AllocaInst &I) { // This isn't undefined behavior, it's just an obvious pessimization. Assert1(&I.getParent()->getParent()->getEntryBlock() == I.getParent(), "Pessimization: Static alloca outside of entry block", &I); + + // TODO: Check for an unusual size (MSB set?) } void Lint::visitVAArgInst(VAArgInst &I) { |