[OPENMP] Loop canonical form analysis (Sema)

This patch implements semantic analysis to make sure that the loop is in OpenMP canonical form.
This is the form required for 'omp simd', 'omp for' and other loop pragmas.

Differential revision: http://reviews.llvm.org/D3778



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210095 91177308-0d34-0410-b5e6-96231b3b80d8
temporary disable part of a test because it causes clang to leak memory (want to have the sanitizer bot green)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210096 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Refactor indentation behavior for multiple nested blocks.

This fixes a few oddities when formatting multiple nested JavaScript
blocks, e.g.:

Before:
  promise.then(
      function success() {
        doFoo();
        doBar();
      },
      [], function error() {
        doFoo();
        doBaz();
      });
  promise.then([],
               function success() {
                 doFoo();
                 doBar();
               },
               function error() {
    doFoo();
    doBaz();
  });

After:
  promise.then(
      function success() {
        doFoo();
        doBar();
      },
      [],
      function error() {
        doFoo();
        doBaz();
      });
  promise.then([],
               function success() {
                 doFoo();
                 doBar();
               },
               function error() {
                 doFoo();
                 doBaz();
               });

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210097 91177308-0d34-0410-b5e6-96231b3b80d8
Use IntrusiveRefCntPtr's == and != nullptr operators.

This is a partial revert of r210075.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210101 91177308-0d34-0410-b5e6-96231b3b80d8
Fix leak from r210059

Also revert r210096 which temporarily disabled the test while this was being
investigated.

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