clang-cl: parse (but don't support) the /o flag

Apparently folks run into this (PR17097). The flag is not supported by
MSVC either, but we should parse it so we don't get confused when it occurs.

This changes the clang-cl output for "clang-cl /c /o foo.obj" from:

  clang-cl.exe: error: no such file or directory: '/o'
  clang-cl.exe: error: no such file or directory: 'foo.obj'

to:

  clang-cl.exe: warning: argument unused during compilation: '/o bajs.obj'

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190323 91177308-0d34-0410-b5e6-96231b3b80d8
[docs] Typographical and rewording fixes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190333 91177308-0d34-0410-b5e6-96231b3b80d8
[docs] Fix some finicky Sphinx warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190336 91177308-0d34-0410-b5e6-96231b3b80d8
[docs] Fix Sphinx toctree warning.

Last I heard LSan is getting close to prime-time, but for now keep
LeakSanitizer.rst hidden (especially since it contains so little
content).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190337 91177308-0d34-0410-b5e6-96231b3b80d8
[docs] End users should see just "Clang"

Half the internet has wildly incorrect ideas about what LLVM is (in
particular, many get the impression that LLVM is some magical
cross-platform runtime), so saying "LLVM" near "cross-compilation" in a
user-facing doc might provoke confusion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190338 91177308-0d34-0410-b5e6-96231b3b80d8
[docs] Prominently note modules are experimental.

It was really hard to tell that modules are experimental. This makes it
really clear by

* Noting the experimental status in the title.
* Moving the "warning" above the table of contents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190340 91177308-0d34-0410-b5e6-96231b3b80d8
Modern ObjectiveC translator. Fix translation of 
message sent to aggregate-valued methods. Fix
visibility of trampoline type used in translation 
of such expressions.  // rdar://14932320



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190341 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a crash introduced in r189828.

The predicates in CXXRecordDecl which test various properties of special
members can't be called on incomplete decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190353 91177308-0d34-0410-b5e6-96231b3b80d8
Attribute tablegen now understands that attribute arguments can be optional.  This allows for automated checking of the number of arguments expected vs number of arguments given for attributes.  Greatly reduces the amount of manual checking required.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190368 91177308-0d34-0410-b5e6-96231b3b80d8
Adding a FIXME based on feedback from Richard Smith.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190369 91177308-0d34-0410-b5e6-96231b3b80d8
Attempting to unbreak the makefile-base builds.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190370 91177308-0d34-0410-b5e6-96231b3b80d8
ObjectiveC migrator. Do not infer NS_RETURNS_INNER_POINTER
annotation on methods which return typedef of pointer to 
an incomplete struct type.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190372 91177308-0d34-0410-b5e6-96231b3b80d8
Ignore calling conventions when checking function template specializations

Summary:
Calling conventions are inherited during decl merging.  Before this
change, deduction would fail due to a type mismatch between the template
and the specialization.  This change adjusts the CCs to match before
deduction, and lets the decl merging logic diagnose mismatch or inherit
the CC from the template.

This allows specializations of static member function templates in the
Microsoft C++ ABI.

Reviewers: rsmith

CC: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190377 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: use -fdiagnostics-format=msvc by default

This allows for navigating to errors within the MSVC IDE by clicking
on the diagnostics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190378 91177308-0d34-0410-b5e6-96231b3b80d8
Make -Wunused warning rules more consistent.

This patch does a few different things.

This patch improves unused var diags for const vars: we no longer
unconditionally suppress diagnostics for const vars, instead only suppressing
the diagnostic when the declaration appears to be useful.

This patch also makes us more consistently use whether a variable/function
is declared in the main file to suppress diagnostics where appropriate.

Fixes <rdar://problem/14907887>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190382 91177308-0d34-0410-b5e6-96231b3b80d8
Generate code for the move assignment operator using memcpy, the same as we do
for the copy assignment operator.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190385 91177308-0d34-0410-b5e6-96231b3b80d8
Separate popcnt and sse4.2 feature control somewhat to match gcc behavior.

Enabling sse4.2 will implicitly enable popcnt unless popcnt is explicitly disabled.
Disabling sse4.2 will not disable popcnt if popcnt is explicitly enabled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190387 91177308-0d34-0410-b5e6-96231b3b80d8
Fix minor coding style issue in r190296 pointed out by Richard Smith.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190390 91177308-0d34-0410-b5e6-96231b3b80d8
Fix for PR16752. Second commit.

PR16752: 'mode' attribute for unusual targets doesn't work properly
Description:
Troubles could be happened due to some assumptions in handleModeAttr function (see SemaDeclAttr.cpp).
For example, it assumes that 32 bit integer is 'int', while it could be 16 bit only.
Instead of asking target: 'which type do you want to use for int32_t ?' it just hardcodes general opinion. That doesn't looks pretty correct.
Please consider the next solution:
1. In Basic/TargetInfo add getIntTypeByWidth and getRealTypeByWidth methods. Methods asks target for proper type for given bit width.
2. Fix handleModeAttr according to new methods in TargetInfo.

Fixes:
1st Commit (Done): Add new methods for TargetInfo:
     getRealTypeByWidth and getIntTypeByWidth
  for ASTContext names are almost same(invokes new methods from TargetInfo):
     getIntTypeForBitwidth and getRealTypeForBitwidth

2nd Commit (Current): Fix SemaDeclAttr, handleModeAttr function.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190391 91177308-0d34-0410-b5e6-96231b3b80d8
Rejected 190391, due to failures on clang-x86_64-darwin11-nobootstrap-RAincremental.

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