Remove threshold for lifetime marker insertion of named temporaries

Now that TailRecursionElimination has been fixed with r222354, the
threshold on size for lifetime marker insertion can be removed. This
only affects named temporary though, as the patch for unnamed temporaries
is still in progress.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222993 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "Remove threshold for lifetime marker insertion of named temporaries"

Revert r222993 while I investigate some MemorySanitizer failures.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222995 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Formating and code improvement for codegen of 'omp critical' directive.
No functional changes, only code improvements.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223010 91177308-0d34-0410-b5e6-96231b3b80d8
Make the function pointer a template argument instead of a runtime value.

Summary:
Speed up the variadic matchers by removing one indirect call.
Making the function pointer a template arguments allows the compiler to
inline the call instead of doing an runtime call by pointer.
Also, optimize the allOf() case to avoid redundant kind checks.
This speeds up our clang-tidy benchmark by ~2%

Reviewers: klimek

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D6424

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223029 91177308-0d34-0410-b5e6-96231b3b80d8
Update R600 address space map to include generic

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223046 91177308-0d34-0410-b5e6-96231b3b80d8
Add a test for devirtualization of virtual operator calls.

There was no test coverage for this before: Modifiying
EmitCXXOperatorMemberCallee() to not call CanDevirtualizeMemberFunctionCall()
didn't make any test fail.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223056 91177308-0d34-0410-b5e6-96231b3b80d8
Add missing 'break's, found by inspection. No functionality change; the
fallthrough happened to do the right thing in both cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223064 91177308-0d34-0410-b5e6-96231b3b80d8
Use nullptr to silence -Wsentinel when self-hosting on Windows

Richard rejected my Sema change to interpret an integer literal zero in
a varargs context as a null pointer, so -Wsentinel sees an integer
literal zero and fires off a warning. Only CodeGen currently knows that
it promotes integer literal zeroes in this context to pointer size on
Windows.  I didn't want to teach -Wsentinel about that compatibility
hack. Therefore, I'm migrating to C++11 nullptr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223079 91177308-0d34-0410-b5e6-96231b3b80d8
Make -fuse-ld=lld work properly on Windows.

Using lld on Windows requires calling link-lld.exe instead of
lld.exe.  This patch puts this knowledge into clang so that when
using the GCC style clang driver, it can properly delegate to
lld.

Differential Revision: http://reviews.llvm.org/D6428
Reviewed by: Reid Kleckner, Rui Ueyama

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223086 91177308-0d34-0410-b5e6-96231b3b80d8
Perform correct lookup when '__super' is used in class with dependent base.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223090 91177308-0d34-0410-b5e6-96231b3b80d8
[modules] Track how 'header' directives were written in module map files,
rather than trying to extract this information from the FileEntry after the
fact.

This has a number of beneficial effects. For instance, diagnostic messages for
failed module builds give a path relative to the "module root" rather than an
absolute file path, and the contents of the module includes file is no longer
dependent on what files the including TU happened to inspect prior to
triggering the module build.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223095 91177308-0d34-0410-b5e6-96231b3b80d8
Remove special case for aarch64 static vs. PIC code in iOS kernel code.

I added this check a while back but then made a note to myself that it
should be completely unnecessary since iOS always uses PIC code-gen for
aarch64. Since I could never come up with any reason why it would be
necessary, I'm just going to remove it and we'll see if anything breaks.
rdar://problem/13627985

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223097 91177308-0d34-0410-b5e6-96231b3b80d8
Add a test that ensures the Clang driver behaves itself when the PATH
environment variable is changed to strange things out from under it.
Prior to r223099 in LLVM, these test cases would crash in various ways
(assert fails, stack exhaustion, etc.).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223100 91177308-0d34-0410-b5e6-96231b3b80d8
Rely on fewer features of the 'env' command. Darwin only supports '-i'.
I'm explicitly setting LC_ALL=C somewhat for documentation, but
hopefully this also removes some host variation from the test results.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223102 91177308-0d34-0410-b5e6-96231b3b80d8
Try to fix the MSVC build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223105 91177308-0d34-0410-b5e6-96231b3b80d8
CMake: make the regexes used for setting HOST_LINK_VERSION more forgiving (PR21268)

If the output of 'ld -v' didn't match the regexes, CMake would previously error
with a message like:

  CMake Error at tools/clang/CMakeLists.txt:269 (string):
    string sub-command REGEX, mode REPLACE regex "[^0-9]*([0-9.]*).*" matched
    an empty string.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223106 91177308-0d34-0410-b5e6-96231b3b80d8
clang/test/Modules/malformed.cpp REQUIRES shell due to "cd".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223107 91177308-0d34-0410-b5e6-96231b3b80d8
Re-apply "Revert r166370 and r166540 now that Xcode 4.6 has been available for a while."

This reverts commit r176892.

I had reverted this a while back to give Chromium more time to update, and
Nico says it should be OK now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223108 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: precedence-based indentation when breaking before operators.

Before:
  bool value = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
               + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
               + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
               == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                  * bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
                  + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
               && aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                  * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                  > ccccccccccccccccccccccccccccccccccccccccc;

After:
  bool value = aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                       + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                       + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                   == aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                              * bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
                          + bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
               && aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                          * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                      > ccccccccccccccccccccccccccccccccccccccccc;

Not particularly pretty, but can probably help to uncover bugs. And if this
bugs somebody, parentheses can help.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@223111 91177308-0d34-0410-b5e6-96231b3b80d8
Emit warning if define or undef reserved identifier or keyword.

Summary:
This change implements warnings if macro name is identical to a keyword or
reserved identifier. The warnings are different depending on the "danger"
of the operation. Defining macro that replaces a keyword is on by default.
Other cases produce warning that is off by default but can be turned on
using option -Wreserved-id-macro.

This change fixes PR11488.

Reviewers: rnk

Reviewed By: rnk

Subscribers: rnk, cfe-commits

Differential Revision: http://reviews.llvm.org/D6194


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