Trying to fix failing Clang sanitizer test on ARM bots

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220029 91177308-0d34-0410-b5e6-96231b3b80d8
User c-tor name to fix the sanitizer test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220030 91177308-0d34-0410-b5e6-96231b3b80d8
D5775: Fix of assertion failure in case of non-POD unions with bitfields. Patch by Evgeny Astigeevich!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220031 91177308-0d34-0410-b5e6-96231b3b80d8
D5775: The new test case was missing from the preceding commit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220032 91177308-0d34-0410-b5e6-96231b3b80d8
Optimize Type::isStructureOrClassType() by reusing RT->getDecl().

RecordType->getDecl() which maps to TagType::getDecl() is not a simple
accessor but a loop on redecls in getInterestingTagDecl.

isStructureOrClassType() was calling getDecl() three times performing
three times the work actually required. It is optimized by calling 
RT->getDecl() once and reusing the result three times.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220033 91177308-0d34-0410-b5e6-96231b3b80d8
complex long double support for PowerPC


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220034 91177308-0d34-0410-b5e6-96231b3b80d8
Add explicit triple to clang/test/CodeGen/sanitize-address-field-padding.cpp, for now. It's incompatible to ms mangling.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220037 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r219977, "Re-commit r217995 and follow-up patches (r217997, r218011, r218053). These were"

It broke some builders. I guess it'd be reproducible with --vg.

  Failing Tests (3):
      Clang :: CXX/except/except.spec/p1.cpp
      Clang :: SemaTemplate/instantiate-exception-spec-cxx11.cpp
      Clang :: SemaTemplate/instantiate-exception-spec.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220038 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: [Java] Don't break immediately after "throws".

Before:
  public void doSooooooooooooooooooooooooooomething() throws
      LooooooooooooooooooooooooooooongException {}

After:
  public void doSooooooooooooooooooooooooooomething()
      throws LooooooooooooooooooooooooooooongException {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220041 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Prefer breaking before trailing return arrows.

Before:
  auto SomeFunction(
      A aaaaaaaaaaaaaaaaaaaaa) const -> decltype(f(aaaaaaaaaaaaaaaaaaaaa)) {}

After:
  auto SomeFunction(A aaaaaaaaaaaaaaaaaaaaa) const
      -> decltype(f(aaaaaaaaaaaaaaaaaaaaa)) {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220043 91177308-0d34-0410-b5e6-96231b3b80d8
Driver: support detecting driver mode when clang has a version suffix without dash (PR21094)

Clang would previously not get into C++ mode when invoked as 'clang++3.6'
(though clang++-3.6 would work).

I found the previous loop logic in this function confusing; hopefully this
makes it a little clearer.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220052 91177308-0d34-0410-b5e6-96231b3b80d8
Sema: address post-commit review comment

Hoist the IgnoreParens so that we ignore it around attributes as well in order
to future-proof the code.  Addresses Richard's comments for SVN r219974.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220053 91177308-0d34-0410-b5e6-96231b3b80d8
Rename TemplateArgument::getTypeForDecl to getParamTypeForDecl for clarity

Code review feedback from Richard Smith on r219900.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220060 91177308-0d34-0410-b5e6-96231b3b80d8
Move test/CodeGen/sections.c to CodeGenCXX/sections.cpp

The test was running with -xc++. Seems it wants to be a C++ file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220069 91177308-0d34-0410-b5e6-96231b3b80d8
Don't forget to substitute into the qualifier when instantiating the definition
of a member function of a class template that is defined outside the template.
This substitution can actually fail in some weird cases.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220085 91177308-0d34-0410-b5e6-96231b3b80d8
Try to fix parse-progname.c test on Darwin

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220086 91177308-0d34-0410-b5e6-96231b3b80d8
Add support for initializer lists on field initializers for -Wuninitialized


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220087 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the rest of PR21289: a pack expansion that we can't expand yet makes a
template specialization type dependent, even if it has no dependent template
arguments. I've filed a corresponding bug against the C++ standard.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220088 91177308-0d34-0410-b5e6-96231b3b80d8
fix -fsanitize-address-field-padding for the cases with virtual base classes

Summary: Correctly compute the non-virtual size of a class.

Test Plan: Build SPEC 2016 with -fsanitize-address-field-padding

Reviewers: rsmith

Reviewed By: rsmith

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220089 91177308-0d34-0410-b5e6-96231b3b80d8
[ASan] Improve blacklisting of global variables.

This commit changes the way we blacklist global variables in ASan.
Now the global is excluded from instrumentation (either regular
bounds checking, or initialization-order checking) if:

1) Global is explicitly blacklisted by its mangled name.
This part is left unchanged.

2) SourceLocation of a global is in blacklisted source file.
This changes the old behavior, where instead of looking at the
SourceLocation of a variable we simply considered llvm::Module
identifier. This was wrong, as identifier may not correspond to
the file name, and we incorrectly disabled instrumentation
for globals coming from #include'd files.

3) Global is blacklisted by type.
Now we build the type of a global variable using Clang machinery
(QualType::getAsString()), instead of llvm::StructType::getName().

After this commit, the active users of ASan blacklist files
may have to revisit them (this is a backwards-incompatible change).


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