Make unreferenced f-group options anonymous

These were showing up with find-unused-options.sh

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199560 91177308-0d34-0410-b5e6-96231b3b80d8
docs: clarify the role of compiler-builtin type trait primitives

Update the documentation to clarify the intent of clang's built-in type trait
facilities, their relation to user-facing C++ type traits and means to check
for availability.

Also explain that __has_feature() is not currently up to date and should not
generally be used in user code (there's a proposal to provide more consistent
checks via __has_builtin(), see cfe-dev).

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199563 91177308-0d34-0410-b5e6-96231b3b80d8
Harden InitListExpr::isStringLiteralInit() against getInit() returning null.

This led to a crash on invalid code (sorry, no good test case).

Fixes <rdar://problem/15831804>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199571 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix ObjC block as first call parameter formatting.

Before:
  foo (^{ bar(); });
After:
  foo(^{ bar(); });

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199573 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] check-clang requires clang-tblgen. It is not required by anyone when external CLANG_TABLEGEN is specified.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199579 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Better support and testing for protocol buffers.

With this patch, there is dedicated testing for protocol buffers
(https://developers.google.com/protocol-buffers/).

Also some minor tweaks formatting tweaks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199580 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Prune LLVM_TOOLS_DIR and LLVM_LIBS_DIR in clang/test/CMakeLists.txt. They are overridden in configure_lit_site_cfg().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199591 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake][Standalone] Redefine LLVM_RUNTIME_OUTPUT_INTDIR and LLVM_LIBRARY_OUTPUT_INTDIR to point appropriate target directories.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199596 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Deprecate CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.

LLVM_*_OUTPUT_INTDIR should be available everywhere. It was my mistake when I introduced INTDIR stuff.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199597 91177308-0d34-0410-b5e6-96231b3b80d8
PR18544: don't assert that 'operator new' is not declared inside a namespace;
such an assert will fail in invalid code that does so!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199617 91177308-0d34-0410-b5e6-96231b3b80d8
Fix nothrow trait with multiple default constructors

Check all default ctors, not just the first one we see. This brings
__has_nothrow_constructor() in line with the other unary type traits.

A C++ class can have multiple default constructors but clang was only checking
the first one written, presumably due to ambiguity in the GNU specification.

MSVC has the same bug, while g++ has the correct implementation which we now
match.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199618 91177308-0d34-0410-b5e6-96231b3b80d8
MSVC 2013 type trait support

Implement type trait primitives used in the latest edition of the Microsoft
standard C++ library type_traits header.

With this change we can parse much of the Visual Studio 2013 standard headers,
particularly anything that includes <type_traits>.

Fully implemented, available in all language modes:

 * __is_constructible()
 * __is_nothrow_constructible()
 * __is_nothrow_assignable()

Partially implemented, semantic analysis WIP, available as MS extensions:

 * __is_destructible()
 * __is_nothrow_destructible()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199619 91177308-0d34-0410-b5e6-96231b3b80d8
These attributes are no longer "checker-specific."

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199625 91177308-0d34-0410-b5e6-96231b3b80d8
Wire up basic parser/sema support for attribute 'returns_nonnull'.

This attribute is supported by GCC.  More generally it should
probably be a type attribute, but this behavior matches 'nonnull'.

This patch does not include warning logic for checking if a null
value is returned from a function annotated with this attribute.
That will come in subsequent patches.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199626 91177308-0d34-0410-b5e6-96231b3b80d8
PR18551: accepts invalid strong enum to bool when operator! is used

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199627 91177308-0d34-0410-b5e6-96231b3b80d8
Make the Linux support for finding libc++ somewhat less braindead.

Now instead of just looking in the system root for it, we also look
relative to the clang binary's directory. This should "just work" in
almost all cases. I've added test cases accordingly.

This is probably *very* worthwhile to backport to the 3.4 branch so that
folks can check it out, build it, and use that as their host compiler
going forward.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199632 91177308-0d34-0410-b5e6-96231b3b80d8
Add the test trees that were supposed to be part of r199632.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199633 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Apply ADDITIONAL_HEADERS introduced in r199639.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199640 91177308-0d34-0410-b5e6-96231b3b80d8
[ARM] Add ACLE enum/wchar size predefines

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