Disable -Wtautological-constant-out-of-range-compare in template instantiations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193887 91177308-0d34-0410-b5e6-96231b3b80d8
Disable -Wtautological-compare in template instantiations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193888 91177308-0d34-0410-b5e6-96231b3b80d8
ObjectiveC. Define a new cc1 flag 
-fobjc-subscripting-legacy-runtime which is off 
by default and on only when using ObjectiveC
legacy runtime. Use this flag to allow
array and dictionary subscripting and disallow
objectiveC pointer arithmatic in ObjectiveC
legacy runtime. // rdar://15363492


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193889 91177308-0d34-0410-b5e6-96231b3b80d8
Add non-type template parameter test for disabled -Wtautological-compare
warning in template specializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193890 91177308-0d34-0410-b5e6-96231b3b80d8
Preload module maps in normal user directories, too.

... in case someone decides to -I/usr/include <rdar://problem/15235948>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193893 91177308-0d34-0410-b5e6-96231b3b80d8
Wraps lazily generated builtins in an extern "C" context

Differential Revision: http://llvm-reviews.chandlerc.com/D2082

Adds a lang_c LinkageSpecDecl to lazily generated builtins. This enforces correct 
behavior for builtins in a variety of cases without special treatment elsewhere within 
the compiler (special treatment is removed by the patch). It also allows for C++ 
overloads of builtin functions, which Microsoft uses in their headers e.g. 
_InterlockedExchangeAdd is an extern C builtin for the long type but an inline wrapper 
for int type.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193896 91177308-0d34-0410-b5e6-96231b3b80d8
Improves compatibility with cl.exe when laying out array fields

Differential Revision: http://llvm-reviews.chandlerc.com/D2090

Clang was "improperly" over-aligning arrays with sizes are not a multiple of 
their alignment. 
This behavior was removed in microsoft 32 bit mode.

In addition, after examination of ASTContext::getTypeInfoImpl, a redundant code block in 
MicrosoftRecordLayoutBuilder::getAdjustedFieldInfo was deleted.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193898 91177308-0d34-0410-b5e6-96231b3b80d8
Fixes lit test that doesn't fail on windows

long in linux 64 is 64 bits but is always 32 bits on windows.  The lit test was modified 
to use long long instead of long and check for 64-bit mangling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193901 91177308-0d34-0410-b5e6-96231b3b80d8
Adding triple to lit test fixed in r193901



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193902 91177308-0d34-0410-b5e6-96231b3b80d8
Change the other -Wtautological-compare warnings to not trigger in template
specializations.  Also switch to -Wuninitialized for a test case that depended
on a warning firing in template specializations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193906 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/CodeGenCXX/builtins.cpp: Fix for -Asserts.

  - Don't seek "entry:" It dosen't appear with -Asserts.
  - Take care that Codegen'ed Instruction(s) wouldn't have name(s) in -Asserts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193908 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: trim trailing whitespace in Sema::ActOnLastBitfield


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193916 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Properly indent statements in Sema::ActOnLastBitfield


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193917 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Flexible array members were introduced in C99, diagnose their use in C++

The declaration of a flexible array member was correctly diagnosed as an
extension in C89 mode but not in C++.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193918 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Cleanup and simplify anonymous union diagnostics

The determination of which diagnostics would be issued for certain
anonymous unions started to get a little ridiculous.  Clean this up by
inverting the condition-tree's logic from dialect -> issue to
issue -> diagnostic.

As part of this cleanup, move ext_c99_flexible_array_member from
DiagnosticParseKinds.td to DiagnosticSemaKinds.td because it's driven by
Sema, not Parse.

Also, the liberty was taken to edit ext_c99_flexible_array_member to
match other, similar, diagnostics.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193919 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Disallow derived classes with virtual bases from having flexible array members

Flexible array members only work out if they are the last field of a
record, however virtual bases would give us many situations where the
flexible array member would overlap with the virtual base fields.

It is unlikely in the extreme that this behavior was intended by the
user so raise a diagnostic instead of accepting.  This is will not
reject conforming code because flexible array members are an extension
in C++ mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193920 91177308-0d34-0410-b5e6-96231b3b80d8
Remove a stray tab character from warn_objc_root_class_missing


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193921 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Remove stray whitespace around Sema::CheckBaseSpecifier


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193922 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Disallow inheriting from classes with flexible array members

Flexible array members inherently index off of the end of their parent
type.

We shouldn't allow this type to be used as a base, virtual or otherwise,
because indexing off the end may find us inside of another base or the
derived types members.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193923 91177308-0d34-0410-b5e6-96231b3b80d8
Add test case for r193923


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