Introduce -Wunused-private-field. If enabled, this warning detects
unused private fields of classes that are fully defined in the current
translation unit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158054 91177308-0d34-0410-b5e6-96231b3b80d8
Zap the /Za compiler switch from MSVC projects, the option is considered harmful even by Microsoft people and clang won't build using the MSVC 2012 RC if not removed.

Only 1 minor code change was necessary: can't use cdecl as variable name anymore.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158063 91177308-0d34-0410-b5e6-96231b3b80d8
Add pedantic warning -Wempty-translation-unit (C11 6.9p1).

In standard C since C89, a 'translation-unit' is syntactically defined to have
at least one "external-declaration", which is either a decl or a function
definition. In Clang the latter gives us a declaration as well.

The tricky bit about this warning is that our predefines can contain external
declarations (__builtin_va_list and the 128-bit integer types). Therefore our
AST parser now makes sure we have at least one declaration that doesn't come
from the predefines buffer.

Also, remove bogus warning about empty source files. This doesn't catch source
files that only contain comments, and never fired anyway because of our
predefines.

PR12665 and <rdar://problem/9165548>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158085 91177308-0d34-0410-b5e6-96231b3b80d8
Remove unused private member variables found by clang's new -Wunused-private-field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158086 91177308-0d34-0410-b5e6-96231b3b80d8
Documents linking requirements for libtooling.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158088 91177308-0d34-0410-b5e6-96231b3b80d8
Escape \n and \r in doxycomment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158091 91177308-0d34-0410-b5e6-96231b3b80d8
Add a -rewrite-includes option, which is similar to -rewrite-macros, but only expands #include directives.

Patch contributed by Lubos Lunak (l.lunax@suse.cz).
Review by Matt Beaumont-Gay (matthewbg@google.com).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158093 91177308-0d34-0410-b5e6-96231b3b80d8
Remove the last dead private member in clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158100 91177308-0d34-0410-b5e6-96231b3b80d8
Revert Decl's iterators back to pointer value_type rather than reference value_type

In addition, I've made the pointer and reference typedef 'void' rather than T*
just so they can't get misused. I would've omitted them entirely but
std::distance likes them to be there even if it doesn't use them.

This rolls back r155808 and r155869.

Review by Doug Gregor incorporating feedback from Chandler Carruth.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158104 91177308-0d34-0410-b5e6-96231b3b80d8
Fix Makefile: Options.td depends on CC1Options.td.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158105 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Provide debug descriptions for all memory space regions.

Patch by Guillem Marpons!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158106 91177308-0d34-0410-b5e6-96231b3b80d8
Allow CorrectTypo to add/modify nested name qualifiers to typos that
are otherwise too short to try to correct.

The TODOs added to two of the tests are for existing deficiencies in the
typo correction code that could be exposed by using longer identifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158109 91177308-0d34-0410-b5e6-96231b3b80d8
Whenever we have a BalancedDelimiterTracker, we have a 'nested' scope
where '>' is going to behave as an operator (and not as a '>' closing
a template argument list).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158111 91177308-0d34-0410-b5e6-96231b3b80d8
Switches the RewriterTestContext away from PathV1.
Now the ToolingTests all work on Windows, and they also clean up their temporary directory if they don't crash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158112 91177308-0d34-0410-b5e6-96231b3b80d8
Puts the linktime dependencies into stupid-ld-required order, as proposed by Jordan Rose.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158113 91177308-0d34-0410-b5e6-96231b3b80d8
[objcmt] When in ARC mode, also convert "[[.. alloc] init]" messages to literals,
since the change from +1 to +0 will be handled fine by ARC.

rdar://11606358

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158114 91177308-0d34-0410-b5e6-96231b3b80d8
Fix test/SemaObjC/cocoa-api-usage.m that broke via r158114.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158115 91177308-0d34-0410-b5e6-96231b3b80d8
When doing arithmatic on vla pointer, make sure
to emit vla size to prevent an irgen crash.
// rdar://11485774


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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158119 91177308-0d34-0410-b5e6-96231b3b80d8
[arcmt] At an unbridged cast error, if we're returning a load-of-ivar from a +0 method,
automatically insert a __bridge cast.

radar://11560638

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