clang-format: [Java] Fix breaking after annotations.

Before:
  @Annotation1 // comment
  @Annotation2 class C {}

After:
  @Annotation1 // comment
  @Annotation2
  class C {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222825 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Improve cast detection.

Before:
  a[b >> 1] = (byte)(c() << 4);

After:
  a[b >> 1] = (byte) (c() << 4);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222827 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Improve formatting of throws declarations.

Before:
  public void doSoooooooooo() throws LoooooooooongException,
      LooooooooooongException {}

After:
  public void doSoooooooooo()
      throws LoooooooooongException, LooooooooooongException {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222829 91177308-0d34-0410-b5e6-96231b3b80d8
[OpenCL] Generic address space has been added in OpenCL v2.0.

To support it in the frontend, the following has been added:  
- generic address space type attribute;
- documentation for the OpenCL address space attributes;
- parsing of __generic(generic) keyword;
- test code for the parser and diagnostics.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222831 91177308-0d34-0410-b5e6-96231b3b80d8
[OpenCL] Generic address space parsing and diagnostics test (forgotten previously)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222832 91177308-0d34-0410-b5e6-96231b3b80d8
[OpenCL] Implemented restrictions for pointer conversions specified in OpenCL v2.0.

OpenCL v2.0 s6.5.5 restricts conversion of pointers to different address spaces:
- the named address spaces (__global, __local, and __private) => __generic - implicitly converted;
- __generic => named - with an explicit cast;
- named <=> named - disallowed;
- __constant <=> any other - disallowed.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222834 91177308-0d34-0410-b5e6-96231b3b80d8
Adding an explicit triple to this test to get it to pass all build bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222837 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Tweak -style=Chromium for Java files.

For Java, don't do any of the deviations from Google Style that Chromium style
does for C++.

Chromium's Java follows Android Java style [1], which is roughly Google Java
style with an indent of 4 and a continuation indent of 8.

1: https://source.android.com/source/code-style.html



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222839 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Don't line-wrap package declarations.

This fixes llvm.org/PR21677.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222843 91177308-0d34-0410-b5e6-96231b3b80d8
Fix buildbot failure on LLP64 platforms like MSVC x86_64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222848 91177308-0d34-0410-b5e6-96231b3b80d8
[analyzer] Indented code within the DisplayHelp sub.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222851 91177308-0d34-0410-b5e6-96231b3b80d8
OpenCL: fix test for lack of names in release builds

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222853 91177308-0d34-0410-b5e6-96231b3b80d8
When checking for uninitialized values, do not confuse "std::move" with every
other function named "move".


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222863 91177308-0d34-0410-b5e6-96231b3b80d8
[c++1z] Remove terse range-based for loops; they've been removed from
consideration for C++17 for now. Update C++ status page to match.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222865 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Don't use column layout with AlignAfterOpenBrackets.

This fixes llvm.org/PR21676.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222886 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [JS] Make Closure module detection more narrow.

Before:
  var MyLongClassName = goog.module.get('my.long.module.name.followedBy.MyLongClassName');

After:
  var MyLongClassName =
      goog.module.get('my.long.module.name.followedBy.MyLongClassName');

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222888 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [JS] new and delete are valid function names.

Before:
  someObject.new ();
  someObject.delete ();

After:
  someObject.new();
  someObject.delete();

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222890 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [JS] Try not to break in container literals.

Before:
  var obj = {
    fooooooooo:
        function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); }
  };

After:
  var obj = {
    fooooooooo: function(x) {
      return x.zIsTooLongForOneLineWithTheDeclarationLine();
    }
  };

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222892 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [JS] Contract fewer functions to a single line.

Before:
  var someVariable =
      function(x) { return x.zIsTooLongForOneLineWithTheDeclarationLine(); };

After:
  var someVariable = function(x) {
    return x.zIsTooLongForOneLineWithTheDeclarationLine();
  };

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222893 91177308-0d34-0410-b5e6-96231b3b80d8
Sphinx does not have a lexer for OpenCL, so falling back to C for the language on the code block. Also fixing an indentation warning. NFC to the content of the documentation itself.

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