Revert small change to EmitDeclRefLValue

That small change, although it looked harmless, it made emitting the LValue
on the PHI node without the proper cast. Reverting it fixes PR19841.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209663 91177308-0d34-0410-b5e6-96231b3b80d8
Fix pr19841.cpp on release mode

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209666 91177308-0d34-0410-b5e6-96231b3b80d8
Fix pr19841, bb are also unnamed

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209668 91177308-0d34-0410-b5e6-96231b3b80d8
Objective-C. Fixes an obscuer crash caused by multiple inclusion of
same framework after complaining about duplicate class definition.
// rdar://17024681


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209672 91177308-0d34-0410-b5e6-96231b3b80d8
Add range accessors for captures of a LambdaExpr.

Summary:
This adds LambdaExpr::captures(), LambdaExpr::explicit_captures()
and LambdaExpr::implicit_captures() as simple wrappers over the underlying
*_begin()/*_end() functions.

Reviewers: aaron.ballman

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209679 91177308-0d34-0410-b5e6-96231b3b80d8
Add a test that we don't store stale modtime in modules

The change from r209195 turned out to be important to avoid saving stale
modification time/expected size information in a module file when there
are 3 or more modules in a dependency chain and the bottom one is
rebuilt. So add a test for that.

rdar://problem/17038180

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209682 91177308-0d34-0410-b5e6-96231b3b80d8
Retain isImplicit flag for local variable declarations when instantiating
templates.

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209686 91177308-0d34-0410-b5e6-96231b3b80d8
Don't dllimport/export destructor variants implemented by thunks.

MSVC doesn't export these functions, so trying to import them doesnt' work.
Also, don't let any dll attributes on the CXXDestructorDecl influence the
thunk's linkage -- they should always be linkonce_odr.

This takes care of the FIXME's for this in Nico's tests.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209706 91177308-0d34-0410-b5e6-96231b3b80d8
Move the logic for testing for namespace std into one location.  This check can
be performed by using Decl::isInStdNamespace or DeclContext::isStdNamespace


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209708 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP][C++11] Formatting and make more C++11 compliant of OpenMP sema.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209713 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Reformatting of parsing code for OpenMP constructs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209714 91177308-0d34-0410-b5e6-96231b3b80d8
[OPENMP] Additional checking for local vars in initial values for threadprivate vars


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209716 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Format array and dict literals similar to blocks.

Especially, reduce the amount of indentation if it doesn't increase
readability.

Before:
  NSMutableDictionary* dictionary = [NSMutableDictionary
      dictionaryWithDictionary:@{
                                 aaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaa,
                                 bbbbbbbbbbbbbbbbbb : bbbbb,
                                 cccccccccccccccc : ccccccccccccccc
                               }];

After:
  NSMutableDictionary* dictionary =
      [NSMutableDictionary dictionaryWithDictionary:@{
        aaaaaaaaaaaaaaaaaaaaa : aaaaaaaaaaaaa,
        bbbbbbbbbbbbbbbbbb : bbbbb,
        cccccccccccccccc : ccccccccccccccc
      }];

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209720 91177308-0d34-0410-b5e6-96231b3b80d8
Add 'nonnull' parameter or return attribute when producing an llvm pointer type in a function type where the C++ type is a reference. Update the tests.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209723 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Don't break before a case's colon.

Before (with just the right line length:
  switch (a) {
  case some_namespace::some_constant
      :
    return;
  }

After:
  switch (a) {
  case some_namespace::
      some_constant:
    return;
  }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209725 91177308-0d34-0410-b5e6-96231b3b80d8
Let clang/test/CodeGen/pr19841.cpp tolerant of MS mangler.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209727 91177308-0d34-0410-b5e6-96231b3b80d8
Consolidate some note diagnostics

These note diags have the same message and can be unified further but for now
let's just bring them together.

Incidental change: Display a source range in the final attr diagnostic.

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

It's still XFAIL, but slightly closer to passing.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209729 91177308-0d34-0410-b5e6-96231b3b80d8
Add a PR reference for XFAILed test

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