Use bitfilds.

On a 32 bit build this moves LinkageSpecDecl from 52 to 48 bytes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180601 91177308-0d34-0410-b5e6-96231b3b80d8
C++1y: support simple variable assignments in constexpr functions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180603 91177308-0d34-0410-b5e6-96231b3b80d8
Implement C++1y decltype(auto).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180610 91177308-0d34-0410-b5e6-96231b3b80d8
Comment parsing: -fparse-all-comments: recognize empty line comments

In -fparse-all-comments mode empty '//' comments were recognized as
RCK_Invalid, and were not merged with next and previous lines.

Patch by Amin Shali.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180625 91177308-0d34-0410-b5e6-96231b3b80d8
Documentation: improve description of make_shared transformation, as suggested by David Blaikie


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180627 91177308-0d34-0410-b5e6-96231b3b80d8
[driver] Implement the -fdebug-compilation-dir in a way that is compatible with
gcc.  No test case included as I'm having problems finding a test case where
the inode/dev don't match.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180628 91177308-0d34-0410-b5e6-96231b3b80d8
document parsing. When a sub-class (c++ Objective-C) missing 
a comment, grab the first comment found in its class
heirarchy. Also, when a category is mossing a comment,
grab comment of its primary class. // rdar://13647476


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180629 91177308-0d34-0410-b5e6-96231b3b80d8
ArrayRefize code. No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180632 91177308-0d34-0410-b5e6-96231b3b80d8
[frontend] Make -chain-include work when used with modules.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180633 91177308-0d34-0410-b5e6-96231b3b80d8
[Modules] Fix an issue where the reconstructed redeclaration chain was incomplete, missing the definition from a module.

-Make sure that a deserialized external decl gets added to the TU scope.
-When associating an identifier with a set of decls, use the most recent local ones,
  if they exist, otherwise associating decls from modules (that came after a local one)
  will lead to an incomplete reconstructed re-declaration chain.

rdar://13712705

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180634 91177308-0d34-0410-b5e6-96231b3b80d8
[PCH/modules] Require the preprocessing record option to match the used PCH, if modules are enabled.

The preprocessing record becomes important when modules are enabled, since it is used to calculate the
module cache hash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180635 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Consolidate BoolAssignmentChecker tests by using two RUN lines.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180637 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Model casts to bool differently from other numbers.

Casts to bool (and _Bool) are equivalent to checks against zero,
not truncations to 1 bit or 8 bits.

This improved reasoning does cause a change in the behavior of the alpha
BoolAssignment checker. Previously, this checker complained about statements
like "bool x = y" if 'y' was known not to be 0 or 1. Now it does not, since
that conversion is well-defined. It's hard to say what the "best" behavior
here is: this conversion is safe, but might be better written as an explicit
comparison against zero.

More usefully, besides improving our model of booleans, this fixes spurious
warnings when returning the address of a local variable cast to bool.

<rdar://problem/13296133>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180638 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] An ObjC for-in loop runs 0 times if the collection is nil.

In an Objective-C for-in loop "for (id element in collection) {}", the loop
will run 0 times if the collection is nil. This is because the for-in loop
is implemented using a protocol method that returns 0 when there are no
elements to iterate, and messages to nil will result in a 0 return value.

At some point we may want to actually model this message send, but for now
we may as well get the nil case correct, and avoid the false positives that
would come with this case.

<rdar://problem/13744632>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180639 91177308-0d34-0410-b5e6-96231b3b80d8
Move helper classes into anonymous namespaces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180642 91177308-0d34-0410-b5e6-96231b3b80d8
[libclang] Introduce clang_Module_getASTFile function that returns the module file where a module object came from.

rdar://13743084

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180643 91177308-0d34-0410-b5e6-96231b3b80d8
In the ASTImporter, when checking whether two
structs are compatible, check whether the fields
of the structs have the same name.  This prevents
erroneous coalescing of (in particular) anonymous
structs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180644 91177308-0d34-0410-b5e6-96231b3b80d8
documenttion parsing. Provide a c-index test
and limit comment extraction to public c++
bases. // rdar://13647476


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180646 91177308-0d34-0410-b5e6-96231b3b80d8
Fix an assertion hit in Sema::CheckObjCMethodOverrides.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180651 91177308-0d34-0410-b5e6-96231b3b80d8
[driver] Use the llvm equivalent of getcwd().  Hopefully, this makes the Windows
bots recover.
rdar://12237559

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