clang-format: Understand __attribute__s preceding parameter lists.

Before:
  ReturnType __attribute__((unused))
      function(int i);

After:
  ReturnType __attribute__((unused))
  function(int i);

This fixes llvm.org/PR18632.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200337 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. provide legacy encoding of *id and *Class types
instead of crashing.  // rdar://15824769.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200338 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. Fixes a bug where "new" family attribute
was not being overridden in the category method implementation
resulting in bogus warning. // rdar://15919775


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200342 91177308-0d34-0410-b5e6-96231b3b80d8
Intrin.h: implement __rdtsc and __halt

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200343 91177308-0d34-0410-b5e6-96231b3b80d8
Intrin.h: include setjmp.h to get a jmp_buf definition

This makes sure that the ms-intrin.cpp test passes by providing
a mock setjmp.h as a test input.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200344 91177308-0d34-0410-b5e6-96231b3b80d8
A new conversion warning for when an Objective-C object literal is implicitly
cast into a boolean true value.  This warning will catch code like:

if (@0) {}
if (@"foo") {}


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200356 91177308-0d34-0410-b5e6-96231b3b80d8
Fixing PR18430 by checking that the size of bitfields plus padding does not
grow into the following virtual base.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200359 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: Better error message when trying to compile stdin (PR18640)

We should suggest using /Tc or /Tp to set the input type, instead of
erroneously suggesting -x, which isn't a clang-cl flag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200362 91177308-0d34-0410-b5e6-96231b3b80d8
Extensively comment bitfield layout, rearrange some
code for legibility, and fix a bug with bitfields in packed
ms_structs.

rdar://15926990

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200379 91177308-0d34-0410-b5e6-96231b3b80d8
Short-circuit a couple of queries (and avoid corrupting
the linkage cache) when type-checking static local
variables.

There's a very deep problem here where the linkage of
a declaration can suddenly massively change as soon as
it's given a typedef name; these fixes, while optimizations
in their own right, are really just targeted workarounds.

rdar://15928125

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200380 91177308-0d34-0410-b5e6-96231b3b80d8
Fix crash on unmatched #endif's.

The following snippet would crash:
  #endif
  #if A

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200381 91177308-0d34-0410-b5e6-96231b3b80d8
Cortex-M3 and Cortex-M4 should not enable hwdiv-arm (committing again, with an updated test)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200385 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix formatting of custom proto options.

Before:
  repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {
                              aaaaaaaaaaaaaaaaa : AAAAAAAA
                            }];

After:
  repeated double value = 1
      [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaaa : AAAAAAAA}];

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200405 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: More custom option fixes for protocol buffer files.

Before:
  repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {
                               aaaaaaaaaaaaaaaa : AAAAAAAAAA,
                               bbbbbbbbbbbbbbbb : BBBBBBBBBB
                             }];

After:
  repeated double value = 1
      [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa : AAAAAAAAAA,
                              bbbbbbbbbbbbbbbb : BBBBBBBBBB}];

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200406 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: Diagnose improper application of inheritance keywords

We would previously allow inappropriate inheritance keywords to appear
on class declarations.  We would also allow inheritance keywords on
templates which were not fully specialized; this was divergent from
MSVC.

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200423 91177308-0d34-0410-b5e6-96231b3b80d8
Consolidating several table-generated files containing parser-related string switches into a single file. This reduces build-related complexity by replacing four separate projects (and table-gen instantiations) with a single one.

No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200424 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C [IRGen]. Generator a tail call to objc_getProperty() in 
synthesized getters for performance improvement. 
// rdar://15884113


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200430 91177308-0d34-0410-b5e6-96231b3b80d8
Use an Itanium triple in DWARF debug info tests

This should fix the clang part of the breakage in r200340.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200435 91177308-0d34-0410-b5e6-96231b3b80d8
Actually test that the local static variable from my
test in r200380 gets linkonce_odr linkage.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200437 91177308-0d34-0410-b5e6-96231b3b80d8
Diagnose typedef names for linkage purposes that would change
a previously-computed linkage as an unsupportable error condition.

Per discussion on cfe-commits, this appears to be a
difficult-to-resolve flaw in our implementation approach;
we may pursue this as a language defect, but for now it's
better to diagnose it as unsupported than to produce
inconsistent results (or assertions).  Anything that we can
do to limit how often this diagnostic fires, such as the
changes in r200380, is probably for the best, though.

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