Fix usage description of clang-format-diff.py.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197668 91177308-0d34-0410-b5e6-96231b3b80d8
Hosting a call to getAttr so that we don't call it multiple times for the same attribute. Also removes a hasAttr that's not required. No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197675 91177308-0d34-0410-b5e6-96231b3b80d8
Switched code from using hasAttr followed by getAttr to simply call getAttr directly.

No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197676 91177308-0d34-0410-b5e6-96231b3b80d8
Switched code from using hasAttr followed by getAttr to simply call getAttr directly and check the resulting value.

No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197678 91177308-0d34-0410-b5e6-96231b3b80d8
Switching getAttrs calls over to using a specific_attr_iterator. No functional changes intended.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197681 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] check-clang: Deprecate --path, according to r197576.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197686 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] check-clang: Append items to CLANG_TEST_DEPS rather than set. CLANG_TEST_DEPS can be set in parent scope.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197687 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] check-clang: Include ClangUnitTests if it can be built. Check existence of gtest.h then.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197688 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Slightly adapt decision of when to break before <<.

Before:
  Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa) << aaaaaaaaaaaaaaaaaaaaaaaaa(
                                              aaaaaaaaaaaaa);

After:
  Diag(aaaaaaaaaaaaaaaaaaaa, aaaaaaaa)
      << aaaaaaaaaaaaaaaaaaaaaaaaa(aaaaaaaaaaaaa);

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197695 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake][Standalone] Rewrite standalone build based on llvm-config. CLANG_PATH_TO_LLVM_*(s) are deprecated.

Checked on VS10(multiconfig) and some singleconfig builders.

* Assumptions

  - You should specify llvm-config as LLVM_CONFIG.
    CMake could find one in $PATH by default.

  - ENABLE_ASSERTIONS obeys LLVM's.

* Use cases

  a) With LLVM build tree

    Assume llvm-config is in your build tree.
    Everything should work as ever.

  b) With *installed* LLVM

    Assume distributions. The source tree can be optional.

    b1) The source tree is provided on the location `llvm-config --src-root`

      - Test utils, FileCheck &c., are imported and built in the new tree.
      - Gtest is built in the tree if gtest library is not found.
      - Lit is used in $(SRCROOT)/utils/lit/lit.py.

    b2) The source tree is not provided

      - clang and utilities can be built.
      - All tests, unittests and check-clang are invalidated and not built.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197697 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Increase penalty for breaking comments.

Unexpectedly, it seems that people commonly know what they were doing
when writing a comment.

Also, being more conservative about comment breaking has the advantage
of giving more flexibility. If a linebreak within the comment can
improve formatting, the author can add it (after which clang-format
won't undo it). There is no way to override clang-format's behavior if
it breaks a comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197698 91177308-0d34-0410-b5e6-96231b3b80d8
Small simplification: p0 is the same as p.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197700 91177308-0d34-0410-b5e6-96231b3b80d8
check-clang: Suppress LLVM_LIT in add_lit_testsuite, for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197702 91177308-0d34-0410-b5e6-96231b3b80d8
ObjectiveC. Sema test for property, methods 
'section' attribute. // rdar://15450637


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197704 91177308-0d34-0410-b5e6-96231b3b80d8
Removing the SourceLocation unused attribute argument type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197707 91177308-0d34-0410-b5e6-96231b3b80d8
Type attribute do not get an AST node by default, so these statements can be removed (it's inherited automatically from TypeAttr).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197710 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Tweak r197697 to handle CMake finding the wrong llvm-config/tblgen.

- If llvm-config fails, output an error to the user rather than allowing
  errors to cascade.
- Always get llvm-tblgen from llvm-config's bindir.

Turns out my PATH points to a really old version of LLVM; both of these
fell out of trying to make this experience nicer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197714 91177308-0d34-0410-b5e6-96231b3b80d8
No longer leaking Argument objects after calling createArgument. However, since an OwningPtr cannot live in a std::vector yet, there are some manual deletions that have a FIXME attached to them. These will go away once C++11 support is allowed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197715 91177308-0d34-0410-b5e6-96231b3b80d8
Reverting r197715 -- it appears that MSVC is happy with the code, but clang is not.

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