clang/test/CodeGen/c11atomics.c: Fix testcase for -Asserts since r186054.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186055 91177308-0d34-0410-b5e6-96231b3b80d8
Documentation cleanup for DeclCXX.h:
* Fixing up \brief summaries (adding some, making some briefer);
* Standardizing on \commands, not @commands;
* Update C++0x references to C++11;
* Fix typos and Doxygen warnings.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186056 91177308-0d34-0410-b5e6-96231b3b80d8
Documentation fixes - the rest of DeclCXX.h:
* More \brief additions/fixes;
* Fix some misleading comments about C++11's explicit conversion operators;
* Mark up some \code examples;
* Add \file documentation.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186059 91177308-0d34-0410-b5e6-96231b3b80d8
PR5066: If a declarator cannot have an identifier, and cannot possibly be
followed by an identifier, then diagnose an identifier as being a bogus part of
the declarator instead of tripping over it. Improves diagnostics for cases like

  std::vector<const int *p> my_vec;


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186061 91177308-0d34-0410-b5e6-96231b3b80d8
Keep trailing annotations close to their argument.

Before:
bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa GUARDED_BY(
    aaaaaaaaaaaa);

After:
bool aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    GUARDED_BY(aaaaaaaaaaaa);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186077 91177308-0d34-0410-b5e6-96231b3b80d8
Fix indentation problem for comments in call chains

Before:
SomeObject
    // Calling someFunction on SomeObject
        .someFunction();

After:
SomeObject
    // Calling someFunction on SomeObject
    .someFunction();

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186085 91177308-0d34-0410-b5e6-96231b3b80d8
Improve detection of trailing return types.

Trailing return types can only occur in declaration contexts.

Before:
  void f() { auto a = b -> c(); }

After:
  void f() { auto a = b->c(); }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186087 91177308-0d34-0410-b5e6-96231b3b80d8
ObjectiveC arc[qoi]: When due to change of certain methods'
result type, a diagnostic being issued, issue a 'note' 
mentioning reason behind the unexpected warning.
// rdar://14121570.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186105 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify GetBuiltinNames by hoising the NoBuiltins argument out of it.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186106 91177308-0d34-0410-b5e6-96231b3b80d8
Restore warning to its original text when
certain familiy of methods have the wrong type.
// rdar://14408244


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186111 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Avoid line breaks before the first <<.

This puts a slight penalty on the linebreak before the first "<<", so
that clang-format generally tries to keep things on the first line.

User feedback has shown that this is generally desirable.

Before:
  llvm::outs()
      << "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =" << aaaaaaaaaaaaaaaaaaaaaaaaaaa;

After:
  llvm::outs() << "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ="
               << aaaaaaaaaaaaaaaaaaaaaaaaaaa;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186115 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Break before trailing annotations.

(if they are not function-like).

Before:
  SomeFunction(aaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaa)
      OVERRIDE;

After:
  SomeFunction(aaaaaaaaaaaaaaaaaaaaaa,
               aaaaaaaaaaaaaaaaaaaaaaaa) OVERRIDE;

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186117 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix bug concerning the alignment of "}".

Before:
    int i;  // indented 2 space more than clang-format would use.
    SomeReturnType  // clang-format invoked on this line.
    SomeFunctionMakingLBraceEndInColumn80() {
  }  // This is the indent clang-format would prefer.

After:
    int i;  // indented 2 space more than clang-format would use.
    SomeReturnType  // clang-format invoked on this line.
    SomeFunctionMakingLBraceEndInColumn80() {
    }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186120 91177308-0d34-0410-b5e6-96231b3b80d8
Make CXXBaseSpecifier::getType return unqual type.

Various pieces of code, like base initialization in Sema and RTTI IRGen,
don't properly ignore qualifiers on base classes.  Instead of auditing the
whole codebase, just strip them off in the getter.  (The type as written is
still available in the TypeSourceInfo for code that cares.)

Fixes PR16596.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186125 91177308-0d34-0410-b5e6-96231b3b80d8
Provide a fixit hint for changing '->' to '.' if there is no operator->
defined for a class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186128 91177308-0d34-0410-b5e6-96231b3b80d8
Add the ability to use guarded malloc when running clang's lit tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186135 91177308-0d34-0410-b5e6-96231b3b80d8
Fix crash on zero-argument assignment operator.

Make sure we don't crash when checking whether an assignment operator
without any arguments is a special member.  <rdar://problem/14397774>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186137 91177308-0d34-0410-b5e6-96231b3b80d8
[scan-build] Pass through all -f and -O flags, along with -Wwrite-strings.

These flags control language options and user-visible macros, so it's
important to preserve them when analyzing. Rather than try to keep up
with all the -f flags, we'll pass them all through and then ban the ones
we don't want (like -fsyntax-only).

-Wwrite-strings is really an f-flag in disguise: it implies -fconst-strings.

Patch by Keaton Mowry, modified by me.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186138 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Add support for __builtin_addressof.

...so we don't regress on std::addressof.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@186140 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Break before/between array subscript expressions.

clang-format used to treat array subscript expressions much like
function call (just replacing () with []). However, this is not really
appropriate especially for expressions with multiple subscripts.

Although it might seem counter-intuitive, the most consistent solution
seems to be to always (if necessary) break before a square bracket,
never after it. Also, multiple subscripts of the same expression should
be aligned if they are on subsequent lines.

Before:
  aaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaaaaaaaaaaaaaaa][
      bbbbbbbbbbbbbbbbbbbbbbbbb] = c;
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[
      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa][
      bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb] = ccccccccccc;

After:
  aaaaaaaaaaaaaaaaaaaaaaaaa[aaaaaaaaaaaaaaaaaaaaaaaaa]
                           [bbbbbbbbbbbbbbbbbbbbbbbbb] = c;
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
      [aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa]
      [bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb] = ccccccccccc;

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