[analyzer] Introduce a CallEventManager to keep a pool of CallEvents.

This allows us to get around the C++ "virtual constructor" problem
when we'd like to create a CallEvent from an ExplodedNode, an inlined
StackFrameContext, or another CallEvent. The solution has three parts:

- CallEventManager uses a BumpPtrAllocator to allocate CallEvent-sized
  memory blocks. It also keeps a cache of freed CallEvents for reuse.
- CallEvents all have protected copy constructors, along with cloneTo()
  methods that use placement new to copy into CallEventManager-managed
  memory, vtables intact.
- CallEvents owned by CallEventManager are now wrapped in an
  IntrusiveRefCntPtr. Going forwards, it's probably a good idea to create
  ALL CallEvents through the CallEventManager, so that we don't accidentally
  try to reclaim a stack-allocated CallEvent.

All of this machinery is currently unused but will be put into use shortly.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@160983 91177308-0d34-0410-b5e6-96231b3b80d8
Do not warn on correct use of the '%n' format specifier.

While '%n' can be used for evil in an attacker-controlled format string, there
isn't any acute danger in using it in a literal format string with an argument
of the appropriate type.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@160984 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Remove declaration of refactored evalObjCMessage method.

No functionality change.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@160985 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Only allow CallEvents to be created by CallEventManager.

This ensures that it is valid to reference-count any CallEvents, and we
won't accidentally try to reclaim a CallEvent that lives on the stack.
It also hides an ugly switch statement for handling CallExprs!

There should be no functionality change here.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@160986 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Add -analyzer-ipa=dynamic option for inlining dynamically
dispatched methods.

Disabled by default for now.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@160988 91177308-0d34-0410-b5e6-96231b3b80d8
Mark ObjCInterfaceDecl::lookupPrivateMethod as const.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@160989 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] fixup for adding of the "dynamic" ipa option

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@160990 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Very simple ObjC instance method inlining

- Retrieves the type of the object/receiver from the state.
- Binds self during stack setup.
- Only explores the path on which the method is inlined (no
bifurcation to explore the path on which the method is not inlined).

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@160991 91177308-0d34-0410-b5e6-96231b3b80d8
objective-c arc: ARC IRGen correctly assumes result
type of generated call to super dealloc is 'void'
and asserts if user's dealloc is not of 'void type.
This rule must be enforced in clang front-end (with a 
fixit) if this is not the case, instead of asserting in CodeGen.
// rdar://11987838


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@160993 91177308-0d34-0410-b5e6-96231b3b80d8