Bugfix in template instantiation in CXXPseudoDestructorExpr.
Fix for clang crash when instantiating a template with qualified lookup for members in non-class types.
Differential Revision: http://reviews.llvm.org/D5769


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219897 91177308-0d34-0410-b5e6-96231b3b80d8
PR21246: DebugInfo: Emit the appropriate type (cv qualifiers, reference-ness, etc) for non-type template parameters

Plumb through the full QualType of the TemplateArgument::Declaration, as
it's insufficient to only know whether the type is a reference or
pointer (that was necessary for mangling, but insufficient for debug
info). This shouldn't increase the size of TemplateArgument as
TemplateArgument::Integer is still longer by another 32 bits.

Several bits of code were testing that the reference-ness of the
parameters matched, but this seemed to be insufficient (various other
features of the type could've mismatched and wouldn't've been caught)
and unnecessary, at least insofar as removing those tests didn't cause
anything to fail.

(Richard - perchaps you can hypothesize why any of these checks might
need to test reference-ness of the parameters (& explain why
reference-ness is part of the mangling - I would've figured that for the
reference-ness to be different, a prior template argument would have to
be different). I'd be happy to add them in/beef them up and add test
cases if there's a reason for them)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219900 91177308-0d34-0410-b5e6-96231b3b80d8
specify dwarf version for Solaris

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219901 91177308-0d34-0410-b5e6-96231b3b80d8
Frontend: Fix some underscore-then-capital UB

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219903 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [ObjC] Fix method expression detection.

Before:
  return (a)[foo bar : baz];

After:
  return (a)[foo bar:baz];

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219919 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix behavior with comments before conditional expressions

Before:
  SomeFunction(aaaaaaaaaaaaaaaaa,
               // comment.
                   ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa
                                     : bbbbbbbbbbbbbbbbbbbb);

After:
  SomeFunction(aaaaaaaaaaaaaaaaa,
               // comment.
               ccccccccccccccccc ? aaaaaaaaaaaaaaaaaaaa : bbbbbbbbbbbbbbbbbbbb);

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219921 91177308-0d34-0410-b5e6-96231b3b80d8
OpenCL: Add -ffake-address-space-map to a test

The ensures there is an explicit address space id in the output.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219928 91177308-0d34-0410-b5e6-96231b3b80d8
OpenCL: Emit global variables in the constant addr space as constant globals

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219929 91177308-0d34-0410-b5e6-96231b3b80d8
tests: move test to more appropriate location

The test is a C++ semantic analysis test, move it to SemaCXX from Sema.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219932 91177308-0d34-0410-b5e6-96231b3b80d8
[AArch64] Enable A53 erratum workaround (835769) by default for Android targets

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219933 91177308-0d34-0410-b5e6-96231b3b80d8
Use array_lengthof; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219935 91177308-0d34-0410-b5e6-96231b3b80d8
Remove one of SanitizerBlacklist::isIn() overloads. NFC.

The final goal is to get rid of all the rest overloads that
accept LLVM objects (llvm::Function and llvm::GlobalVariable),
and pass in source-level entities instead.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219937 91177308-0d34-0410-b5e6-96231b3b80d8
Use iterators and algorithms to possibly make this code a bit tidier

(also, the code executed once the element was found was split half
inside the loop and half after it - now put it all together after the
find operation)

I'm a bit concerned that this code is rather untested (commenting out
this whole function and running check-clang doesn't fail any tests)...

And I wish I had polymorphic lambdas.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219938 91177308-0d34-0410-b5e6-96231b3b80d8
Fix code to follow the "Don’t use else after a return" rule.

Summary:
Fix code to follow the "Don’t use else after a return" rule.
This is a followup from rL219792.

Reviewers: alexfh

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219939 91177308-0d34-0410-b5e6-96231b3b80d8
Switching to range-based for loops; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219940 91177308-0d34-0410-b5e6-96231b3b80d8
Speculatively fix GCC 4.7 build after r219938

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219941 91177308-0d34-0410-b5e6-96231b3b80d8
Fixing comment grammar; NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219942 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Follow up to r219736, also test/demonstrate that we emit the constant value in this case as well.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219952 91177308-0d34-0410-b5e6-96231b3b80d8
No longer emit diagnostics about unused results (comparisons, etc) from unevaluated contexts. Fixes PR18571.

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