[Sanitizer] Parse and produce all sanitizer-relevant arguments in SanitizerArgs.

In particular, make SanitizerArgs responsible for parsing
and passing down to frontend -fsanitize-recover and
-fsanitize-undefined-trap-on-error flags.

Simplify parsing -f(no-)sanitize= flags parsing: get rid of
too complex filterUnsupportedKinds function.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222105 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix regression introduced in r221609.

Before:
  void f() { f(a, c *d); }

After:
  void f() { f(a, c * d); }

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222128 91177308-0d34-0410-b5e6-96231b3b80d8
A small correction for r221884. No functional changes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222130 91177308-0d34-0410-b5e6-96231b3b80d8
Remove VariadicOperatorMatcherInterface as it is redundant with logic from DynTypedMatcher.

Summary:
The generic variadic matcher is faster (one less virtual function call
per match) and doesn't require template instantiations which reduces
compile time and binary size.
Registry.cpp.o generates ~14% less symbols and compiles ~7.5% faster.
The change also speeds up our clang-tidy benchmark by ~2%.

Reviewers: klimek

Subscribers: klimek, cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222131 91177308-0d34-0410-b5e6-96231b3b80d8
Add a couple more examples illustrating why we need vtordisps and how they work

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222133 91177308-0d34-0410-b5e6-96231b3b80d8
Minor readability tweaks to VFTableBuilder.cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222140 91177308-0d34-0410-b5e6-96231b3b80d8
[Reassociate] Update test cases due to r222142.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222144 91177308-0d34-0410-b5e6-96231b3b80d8
Fixing a use of stringstream to use an LLVM helper function. Drive-by fixing header include order. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222151 91177308-0d34-0410-b5e6-96231b3b80d8
Fix the indentation: Nesting level does not match indentation (CID 1254863)



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

Add a missing surrounding brace for doxygen group.  This messes with pair
jumping in vim and is annoying.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222155 91177308-0d34-0410-b5e6-96231b3b80d8
test/Driver/cl-outputs.c: tweak some check prefixes; NFC.

These tests deal with the /o option; rename to better reflect that.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222157 91177308-0d34-0410-b5e6-96231b3b80d8
clang-format: Fix more incorrect pointer detection.

Before:
  Constructor() : a(a), b(c, d *e) {}

After:
  Constructor() : a(a), b(c, d * e) {}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222158 91177308-0d34-0410-b5e6-96231b3b80d8
clang-cl: Allow /Fo without an argument (PR21589)

When it's used without an argument, the default file name is
used. The same goes for /Fe.

Also, allow using /Fo, /Fa and /Fe with multiple inputs if they
don't have an argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222164 91177308-0d34-0410-b5e6-96231b3b80d8
Missing comma in a string array initialization (CID 1254893)

Summary:
We have this error from a while (Wed Jun 15 18:02:42 2011
r133103)

Reviewers: rsmith

Reviewed By: rsmith

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222169 91177308-0d34-0410-b5e6-96231b3b80d8
CodeGen: make a check stricter

When targeting Windows itanium (a MSVC environment), use itanium style
exceptions rather than SEH.  Existing test cases already test this code path.
Applying this change ensures that tests wont break due to a parallel change in
LLVM (to correctly report isMSVCEnvironment).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222179 91177308-0d34-0410-b5e6-96231b3b80d8
Handle use of default member initializers before end of outermost class

Specifically, when we have this situation:
  struct A {
    template <typename T> struct B {
      int m1 = sizeof(A);
    };
    B<int> m2;
  };

We can't parse m1's initializer eagerly because we need A to be
complete.  Therefore we wait until the end of A's class scope to parse
it. However, we can trigger instantiation of B before the end of A,
which will attempt to instantiate the field decls eagerly, and it would
build a bad field decl instantiation that said it had an initializer but
actually lacked one.

Fixed by deferring instantiation of default member initializers until
they are needed during constructor analysis. This addresses a long
standing FIXME in the code.

Fixes PR19195.

Reviewed By: rsmith

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222192 91177308-0d34-0410-b5e6-96231b3b80d8
Make DiagnosticsEngine::takeClient return std::unique_ptr<>

Summary:
Make DiagnosticsEngine::takeClient return std::unique_ptr<>. Updated
callers to store conditional ownership using a pair of pointer and unique_ptr
instead of a pointer + bool. Updated code that temporarily registers clients to
use the non-owning registration (+ removed extra calls to takeClient).

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: cfe-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222193 91177308-0d34-0410-b5e6-96231b3b80d8
Fix an assertion when ending a function definition.

The bug is that ExprCleanupObjects isn't always empty
in a fresh evaluation context.  New evaluation contexts just
track the current depth of the stack.

The assertion will misfire whenever we finish processing
a function body inside an expression that contained an earlier
block literal with non-trivial captures.  That's actually
a lot less likely than you'd think, though, because it has
to be a real function declaration, not just another block.
Mixed block/lambda code would work, as would a template
instantiation or a local class definition.

The code works correctly if the assertion is disabled.

rdar://16356628

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222194 91177308-0d34-0410-b5e6-96231b3b80d8
Debug Info: context field of a global variable is DIScopeRef.

Paired commit with r222195.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222196 91177308-0d34-0410-b5e6-96231b3b80d8
InstrProf: Don't emit coverage for uninstantiated templates

We include unused functions and methods in -fcoverage-mapping so that
we can differentiate between uninstrumented and unused. This can cause
problems for uninstantiated templates though, since they may involve
an incomplete type that can't be mangled. This shows up in things like
libc++'s <unordered_map> and makes coverage unusable.

Avoid the issue by skipping uninstantiated methods of a templated
class.

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