Teach SanitizerBlacklist to blacklist by SourceLocation. NFC.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219993 91177308-0d34-0410-b5e6-96231b3b80d8
Appease the buildbots with the special case for non-set variables

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219994 91177308-0d34-0410-b5e6-96231b3b80d8
SanitizerBlacklist: blacklist functions by their source location.

This commit changes the way we blacklist functions in ASan, TSan,
MSan and UBSan. We used to treat function as "blacklisted"
and turned off instrumentation in it in two cases:

1) Function is explicitly blacklisted by its mangled name.
This part is not changed.

2) Function is located in llvm::Module, whose identifier is
contained in the list of blacklisted sources. This is completely
wrong, as llvm::Module may not correspond to the actual source
file function is defined in. Also, function can be defined in
a header, in which case user had to blacklist the .cpp file
this header was #include'd into, not the header itself.
Such functions could cause other problems - for instance, if the
header was included in multiple source files, compiled
separately and linked into a single executable, we could end up
with both instrumented and non-instrumented version of the same
function participating in the same link.

After this change we will make blacklisting decision based on
the SourceLocation of a function definition. If a function is
not explicitly defined in the source file, (for example, the
function is compiler-generated and responsible for
initialization/destruction of a global variable), then it will
be blacklisted if the corresponding global variable is defined
in blacklisted source file, and will be instrumented otherwise.

After this commit, the active users of blacklist files may have
to revisit them. This is a backwards-incompatible change, but
I don't think it's possible or makes sense to support the
old incorrect behavior.

I plan to make similar change for blacklisting GlobalVariables
(which is ASan-specific).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@219997 91177308-0d34-0410-b5e6-96231b3b80d8
trying to fix the new test again, this time for the clang-cmake-armv7-a15 bot

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220002 91177308-0d34-0410-b5e6-96231b3b80d8
AST: Remove dead code from RecordLayoutBuilder

No functionality change intended.

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

It exists to handle the case where base subobjects are character arrays.
This never happens.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220006 91177308-0d34-0410-b5e6-96231b3b80d8
Per comments on PR12350, move DR244 back from 'done' to 'partial' and add tests showing what we get wrong.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220009 91177308-0d34-0410-b5e6-96231b3b80d8
Switch to range-based for loop. No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220014 91177308-0d34-0410-b5e6-96231b3b80d8
PR21215: Support -fmodule-map-file being specified multiple times. Support
loading multiple module map files from the same directory.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220020 91177308-0d34-0410-b5e6-96231b3b80d8
Remove incorrect usage of JoinedOrSeparate.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220023 91177308-0d34-0410-b5e6-96231b3b80d8
Towards PR21289: don't lose track of unexpanded parameter packs with
non-dependent types, in CXXScalarValueInitExprs and in the
nested-name-specifier or template arguments of a DeclRefExpr in particular.


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