Implements more principled comment parsing.

Changing nextToken() in the UnwrappedLineParser to get the next
non-comment token. This allows us to correctly layout a whole class of
snippets, like:

if /* */(/* */ a /* */) /* */
  f() /* */; /* */
else /* */
  g();

Fixes a bug in the formatter where we would assume there is a previous
non-comment token.
Also adds the indent level of an unwrapped line to the debug output in
the parser.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173168 91177308-0d34-0410-b5e6-96231b3b80d8
Formatter: Remove a fixme klimek fixed in r173168.

Add a few comments to the ObjC test cases.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173169 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a bug in VarDecl::getSourceRange() for static member arrays with an element
type with an implicit initializer expression.

Patch from Will Wilson <will@indefiant.com>!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173170 91177308-0d34-0410-b5e6-96231b3b80d8
Make getDefinitiveDeclContext() actually return a DeclContext, as one
would expect, and clean up the return/break inconsistencies. Thanks,
Sebastian!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173171 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Remove a warning about ms-style inline assembly not being
supported.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173177 91177308-0d34-0410-b5e6-96231b3b80d8
objectiveC (take two): don't warn when in -Wselector mode and
an unimplemented selector is consumed by
"respondsToSelector:". // rdar://12938616


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173179 91177308-0d34-0410-b5e6-96231b3b80d8
Small code change to improve performance
in my last patch, suggested by Argyrios.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173182 91177308-0d34-0410-b5e6-96231b3b80d8
Update docs: nullptr conversion tool landed


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173183 91177308-0d34-0410-b5e6-96231b3b80d8
Split "discards qualifiers" warnings of -Wincompatible-pointer-types into subgroup.

This allows users to promote -Wincompatible-pointer-type warnings to
errors but keep those for "discard qualifiers" as warnings (if they
so desire).

Addresses <rdar://problem/13062738>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173184 91177308-0d34-0410-b5e6-96231b3b80d8
[ms-inline asm] Remove the -fenable-experimental-ms-inline-asm flag.  MS-style
inline assembly can be enable with -fasm-blocks or -fms-extensions alone.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173186 91177308-0d34-0410-b5e6-96231b3b80d8
PowerPC: fix __builtin_eh_return_data_regno return


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173188 91177308-0d34-0410-b5e6-96231b3b80d8
Add x86 requirement to hopefully fix ppc bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173190 91177308-0d34-0410-b5e6-96231b3b80d8
Second attempt to fix ppc bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173193 91177308-0d34-0410-b5e6-96231b3b80d8
Add a triple, per Ben's suggestion.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173198 91177308-0d34-0410-b5e6-96231b3b80d8
Fix compilation on Linux, which defines PATH_MAX in a weird place,
from Saleem Abdulrasool!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173208 91177308-0d34-0410-b5e6-96231b3b80d8
Use the AttributeSet when adding multiple attributes and an Attribute::AttrKind
when adding a single attribute to the function.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173211 91177308-0d34-0410-b5e6-96231b3b80d8
Documentation cleanup: fixing documentation for FrontendAction.
* Fix a typo, s/BeginSourceAction/BeginSourceFile/, so that the documentation
  for FrontendAction::BeginSourceFileAction links correctly to BeginSourceFile;
* Add some basic \file documentation for FrontendAction.h;
* More use of "\brief" instead of repeating the name of the entity being
  documented;
* Stop using Doxygen-style "///" comments in FrontendAction.cpp, as they were
  polluting the documentation for BeginSourceFile;
* Drop incorrect "\see" markup that broke Doxygen's formatting;
* Other minor documentation fixes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173213 91177308-0d34-0410-b5e6-96231b3b80d8
[Driver] Don't remove non-regular files that were outputs.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173215 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Driver/output-file-is-dir.c: This requires shell due to 'cd'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173218 91177308-0d34-0410-b5e6-96231b3b80d8
Make __attribute__((nonnull)) use the general expression evaluator to search for
nulls instead of limiting itself to the language-defined "null pointer
constant".


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