Don't leak MacroArgs when using code completion, PR19688.

MacroArgs are owned by TokenLexer, and when a TokenLexer is destroyed, it'll
call its MacroArgs's destroy() method.  destroy() only appends the MacroArg to
Preprocessor's MacroArgCache list, and Preprocessor's destructor then calls
deallocate() on all MacroArgs in that list.  This method then ends up freeing
the MacroArgs's memory.

In a code completion context, Parser::cutOffParsing() gets called when a code
completion token is hit, which changes the type of the current token to
tok::eof.  eof tokens aren't always ConsumeToken()ed, so
Preprocessor::HandleEndOfFile() isn't always called, and that function is
responsible for popping the macro stack.

Due to this, Preprocessor::CurTokenLexer can be non-NULL when
~Preprocessor runs.  It's a unique_ptr, so it ended up being destructed after
~Preprocessor completed, and its MacroArgs thus got added to the freelist after
the code freeing things on the freelist had already completed.  The fix is to
explicitly call reset() before the freelist processing happens.  (See the bug
for more notes.)


git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@208438 91177308-0d34-0410-b5e6-96231b3b80d8
Add the ability to use logical expressions for capability attributes. This is to allow requirements to be expressed not just in terms of lists, but in terms of logical expressions. Eg)

void foo(void) __attribute__((requires_capability((FlightControl || Worker) && !Logger)));

This is WIP code.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@208439 91177308-0d34-0410-b5e6-96231b3b80d8
Amending r208439 to remove buildLExpr; this code isn't strictly required yet, and fixes a dead code warning.

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