test: simplify test further

Remove the use of an unnecessary function.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219850 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: handle AttributedTypeLocs in C++14 auto deduction

When performing a type deduction from the return type, the FunctionDecl may be
attributed with a calling convention.  In such a case, the retrieved type
location may be an AttributedTypeLoc.  Performing a castAs<FunctionProtoTypeLoc>
on such a type loc would result in an assertion as they are not derived types.

Ensure that we correctly handle the attributed type location by looking through
it to the modified type loc.

Fixes an assertion triggered in C++14 mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219851 91177308-0d34-0410-b5e6-96231b3b80d8
Avoid having "using namespace" for both "clang" and "llvm" namespaces.
This is fragile, as there are classes with the same name in both
namespaces (e.g. llvm::Module and clang::Module).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219855 91177308-0d34-0410-b5e6-96231b3b80d8
Move SanitizerBlacklist object from CodeGenModule to ASTContext.

Soon we'll need to have access to blacklist before the CodeGen
phase (see http://reviews.llvm.org/D5687), so parse and construct
the blacklist earlier.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219857 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: Don't drop thread_local when emitting __thread aliases

CodeGen wouldn't mark the aliasee as thread_local if the aliasee was a
tentative definition.

Even if the definition was already emitted, it would never mark the
alias as thread_local.

This fixes PR21288.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219859 91177308-0d34-0410-b5e6-96231b3b80d8
Moving CGF::EmitAlignmentAssumption to IRBuilder

The functionality contained in CodeGenFunction::EmitAlignmentAssumption has
been moved to IRBuilder (so that it can also be used by LLVM-level code).
Remove this now-duplicate implementation in favor of the IRBuilder code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219877 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] clangBasic: Add Core to LINK_COMPONENTS introduced by r219840.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219880 91177308-0d34-0410-b5e6-96231b3b80d8
DebugInfo: Cleanup testing of non-type template parameters.

Separate out the non-nullable parameters from the nullable ones
(currently only the template template parameter) and demonstrate that
cv-qualifiers aren't preserved for non-null parameters (but are
preserved for null parameters) by adding 'const' to an int* non-type
template parameter.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219883 91177308-0d34-0410-b5e6-96231b3b80d8
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