]> granicus.if.org Git - clang/log
clang
12 years agoInclude clang-check as part of the clang installation.
David Blaikie [Tue, 31 Jul 2012 20:29:59 +0000 (20:29 +0000)]
Include clang-check as part of the clang installation.

This also tidies up a couple of other tools we were (partially) installing:
* c-index-test was being installed but shouldn't be (it's just a clang-dev tool)
* diagtool was being installed in cmake but not make (& shouldn't be installed in either)

Review by Manuel Klimek, Doug Gregor, and Chandler Carruth.

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

12 years agoConsider the visibility of template template arguments. GCC doesn't, but it also
Rafael Espindola [Tue, 31 Jul 2012 19:02:02 +0000 (19:02 +0000)]
Consider the visibility of template template arguments. GCC doesn't, but it also
fails to consider the linkage, which we were already considering.

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

12 years ago[analyzer] Control C++ inlining with a macro in ExprEngineCallAndReturn.cpp.
Jordan Rose [Tue, 31 Jul 2012 18:22:40 +0000 (18:22 +0000)]
[analyzer] Control C++ inlining with a macro in ExprEngineCallAndReturn.cpp.

For now this will stay on, but this way it's easy to switch off if we need
to pull back our support for a while.

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

12 years ago[analyzer] Turn -cfg-add-initializers on by default, and remove the flag.
Jordan Rose [Tue, 31 Jul 2012 18:04:59 +0000 (18:04 +0000)]
[analyzer] Turn -cfg-add-initializers on by default, and remove the flag.

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

12 years ago[analyzer] Don't try to inline if there's no region for a message receiver.
Jordan Rose [Tue, 31 Jul 2012 18:04:53 +0000 (18:04 +0000)]
[analyzer] Don't try to inline if there's no region for a message receiver.

While usually we'd use a symbolic region rather than a straight-up Unknown,
we can still generate unknowns via array subscripts with symbolic indexes.
(And if this ever changes in the future, we still shouldn't crash.)

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

12 years ago[analyzer] Add a FIXME about devirtualization in ctors/dtors.
Jordan Rose [Tue, 31 Jul 2012 18:04:49 +0000 (18:04 +0000)]
[analyzer] Add a FIXME about devirtualization in ctors/dtors.

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

12 years ago-Wformat: better handling of qualifiers on pointer arguments
Hans Wennborg [Tue, 31 Jul 2012 16:37:47 +0000 (16:37 +0000)]
-Wformat: better handling of qualifiers on pointer arguments

Warn about using pointers to const-qualified types as arguments to
scanf. Ignore the volatile qualifier when checking if types match.

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

12 years ago[analyzer] Getting an lvalue for a reference field still requires a load.
Jordan Rose [Tue, 31 Jul 2012 16:34:07 +0000 (16:34 +0000)]
[analyzer] Getting an lvalue for a reference field still requires a load.

This was causing a crash in our array-to-pointer logic, since the region
was clearly not an array.

PR13440 / <rdar://problem/11977113>

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

12 years agoTweak code-completion heuristics deciding between a lambda
Douglas Gregor [Tue, 31 Jul 2012 15:27:48 +0000 (15:27 +0000)]
Tweak code-completion heuristics deciding between a lambda
code-completion and an Objective-C message send, based on Jordan's
feedback.

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

12 years agoThis test actually works on Win32...
Manuel Klimek [Tue, 31 Jul 2012 14:45:10 +0000 (14:45 +0000)]
This test actually works on Win32...

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

12 years agoFixes a segfault in Tooling when using pch's:
Manuel Klimek [Tue, 31 Jul 2012 13:56:54 +0000 (13:56 +0000)]
Fixes a segfault in Tooling when using pch's:
Clear the FileManager's stat cache in between running
translation units, as the stat cache loaded from a pch
is only valid for one compiler invocation.

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

12 years agoRemove deprecated getNameAsCString methods.
Benjamin Kramer [Tue, 31 Jul 2012 11:45:39 +0000 (11:45 +0000)]
Remove deprecated getNameAsCString methods.

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

12 years agoAdd two more .keep files to avoid the missing of empty folders in git repository.
Jiangning Liu [Tue, 31 Jul 2012 10:52:55 +0000 (10:52 +0000)]
Add two more .keep files to avoid the missing of empty folders in git repository.

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

12 years agoAdd two .keep files to avoid the missing of empty folders in git repository.
Jiangning Liu [Tue, 31 Jul 2012 10:24:27 +0000 (10:24 +0000)]
Add two .keep files to avoid the missing of empty folders in git repository.

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

12 years agoAdded -ast-list option to dump filterable AST decl node names.
Alexander Kornienko [Tue, 31 Jul 2012 09:37:40 +0000 (09:37 +0000)]
Added -ast-list option to dump filterable AST decl node names.

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

12 years agoSupport ARM hard float (arm-linux-gnueabihf).
Jiangning Liu [Tue, 31 Jul 2012 08:06:29 +0000 (08:06 +0000)]
Support ARM hard float (arm-linux-gnueabihf).

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

12 years agoFix some minor typos
Sylvestre Ledru [Tue, 31 Jul 2012 06:56:50 +0000 (06:56 +0000)]
Fix some minor typos

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

12 years agoDocument the result type of the matcher functions where
Manuel Klimek [Tue, 31 Jul 2012 06:28:58 +0000 (06:28 +0000)]
Document the result type of the matcher functions where
it's not obvious from the source code.

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

12 years agoIntroduce new queries on ObjCRuntime for how to interpret subscripts
John McCall [Tue, 31 Jul 2012 05:14:30 +0000 (05:14 +0000)]
Introduce new queries on ObjCRuntime for how to interpret subscripts
on object pointers and whether pointer arithmetic on object pointers
is supported.  Make ObjFW interpret subscripts as pseudo-objects.
Based on a patch by Jonathan Schleifer.

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

12 years agoHandle functions with struct arguments or return types and the regparm
Rafael Espindola [Tue, 31 Jul 2012 02:44:24 +0000 (02:44 +0000)]
Handle functions with struct arguments or return types and the regparm
attribute. It is a variation of the x86_64 ABI:

* A struct returned indirectly uses the first register argument to pass the
  pointer.
* Floats, Doubles and structs containing only one of them are not passed in
  registers.
* Other structs are split into registers if they fit on the remaining ones.
  Otherwise they are passed in memory.
* When a struct doesn't fit it still consumes the registers.

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

12 years ago[analyzer] Add a test that messages to super invalidate ivars.
Jordan Rose [Tue, 31 Jul 2012 02:05:30 +0000 (02:05 +0000)]
[analyzer] Add a test that messages to super invalidate ivars.

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

12 years agoAttributes preceding a function declaration are first applied to the return
Rafael Espindola [Tue, 31 Jul 2012 01:54:04 +0000 (01:54 +0000)]
Attributes preceding a function declaration are first applied to the return
type and then propagated to the function. This was failing for destructors,
constructors and constructors templates since they don't have a return type.

Fix that by directly calling processTypeAttrs on the dummy type we use as the
return type in these cases.

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

12 years agoNo longer emitting a PCH file when using -fsyntax-only on a header file. Fixes PR13343.
Aaron Ballman [Tue, 31 Jul 2012 01:21:00 +0000 (01:21 +0000)]
No longer emitting a PCH file when using -fsyntax-only on a header file.  Fixes PR13343.

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

12 years ago[analyzer] Let CallEvent decide what goes in an inital stack frame.
Jordan Rose [Tue, 31 Jul 2012 01:07:55 +0000 (01:07 +0000)]
[analyzer] Let CallEvent decide what goes in an inital stack frame.

This removes explicit checks for 'this' and 'self' from
Store::enterStackFrame. It also removes getCXXThisRegion() as a virtual
method on all CallEvents; it's now only implemented in the parts of the
hierarchy where it is relevant. Finally, it removes the option to ask
for the ParmVarDecls attached to the definition of an inlined function,
saving a recomputation of the result of getRuntimeDefinition().

No visible functionality change!

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

12 years agoExplain why ACC_bottom should never occur in diagnosing ARC casts.
Jordan Rose [Tue, 31 Jul 2012 01:07:43 +0000 (01:07 +0000)]
Explain why ACC_bottom should never occur in diagnosing ARC casts.

This is just a clarification on Fariborz's original patch, per e-mail
discussion. No functionality change.

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

12 years agoWhen we encounter a code-completion token while parsing an ill-formed
Douglas Gregor [Tue, 31 Jul 2012 00:50:07 +0000 (00:50 +0000)]
When we encounter a code-completion token while parsing an ill-formed
lambda-introducer in Objective-C++11, fall back to treating the tokens
as an Objective-C message send to provide those (more likely)
completions. Fixes <rdar://problem/11980263>.

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

12 years agoDon't crash *or* insert a bogus autorelease when emitting a
John McCall [Tue, 31 Jul 2012 00:33:55 +0000 (00:33 +0000)]
Don't crash *or* insert a bogus autorelease when emitting a
this-adjustment thunk in ARC++.

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

12 years ago[analyzer] Handle inlining of instance calls to super.
Anna Zaks [Mon, 30 Jul 2012 23:48:36 +0000 (23:48 +0000)]
[analyzer] Handle inlining of instance calls to super.

Use self-init.m for testing. (It used to have a bunch of failing tests
with dynamic inlining turned on.)

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

12 years ago[analyzer] Only run this test with no IPA
Anna Zaks [Mon, 30 Jul 2012 23:48:31 +0000 (23:48 +0000)]
[analyzer] Only run this test with no IPA

The inlinable portion of the test relies on attributes/instead of the
function implementation.

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

12 years agoPR13479: If we see the definition of an out-of-line destructor in C++11, be
Richard Smith [Mon, 30 Jul 2012 23:48:14 +0000 (23:48 +0000)]
PR13479: If we see the definition of an out-of-line destructor in C++11, be
sure to update the exception specification on the declaration as well as the
definition. If we're building in -fno-exceptions mode, nothing else will
trigger it to be updated.

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

12 years ago[analyzer] Perform post-call checks for all inlined calls.
Jordan Rose [Mon, 30 Jul 2012 23:39:47 +0000 (23:39 +0000)]
[analyzer] Perform post-call checks for all inlined calls.

Previously, we were only checking the origin expressions of inlined calls.
Checkers using the generic postCall and older postObjCMessage callbacks were
ignored. Now that we have CallEventManager, it is much easier to create
a CallEvent generically when exiting an inlined function, which we can then
use for post-call checks.

No test case because we don't (yet) have any checkers that depend on this
behavior (which is why it hadn't been fixed before now).

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

12 years agoExtend the ',' versus ';' diagnostic for -Wvexing-parse to cover the with-arguments...
Richard Smith [Mon, 30 Jul 2012 21:42:05 +0000 (21:42 +0000)]
Extend the ',' versus ';' diagnostic for -Wvexing-parse to cover the with-arguments case as well as the no-arguments case.

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

12 years agoImprovements to vexing-parse warnings. Make the no-parameters case more
Richard Smith [Mon, 30 Jul 2012 21:30:52 +0000 (21:30 +0000)]
Improvements to vexing-parse warnings. Make the no-parameters case more
accurate by asking the parser whether there was an ambiguity rather than trying
to reverse-engineer it from the DeclSpec. Make the with-parameters case have
better diagnostics by using semantic information to drive the warning,
improving the diagnostics and adding a fixit.

Patch by Nikola Smiljanic. Some minor changes by me to suppress diagnostics for
declarations of the form 'T (*x)(...)', which seem to have a very high false
positive rate, and to reduce indentation in 'warnAboutAmbiguousFunction'.

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

12 years agoobjective-c arc: ARC IRGen correctly assumes result
Fariborz Jahanian [Mon, 30 Jul 2012 20:52:48 +0000 (20:52 +0000)]
objective-c arc: ARC IRGen correctly assumes result
type of generated call to super dealloc is 'void'
and asserts if user's dealloc is not of 'void type.
This rule must be enforced in clang front-end (with a
fixit) if this is not the case, instead of asserting in CodeGen.
// rdar://11987838

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

12 years ago[analyzer] Very simple ObjC instance method inlining
Anna Zaks [Mon, 30 Jul 2012 20:31:29 +0000 (20:31 +0000)]
[analyzer] Very simple ObjC instance method inlining

- Retrieves the type of the object/receiver from the state.
- Binds self during stack setup.
- Only explores the path on which the method is inlined (no
bifurcation to explore the path on which the method is not inlined).

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

12 years ago[analyzer] fixup for adding of the "dynamic" ipa option
Anna Zaks [Mon, 30 Jul 2012 20:31:24 +0000 (20:31 +0000)]
[analyzer] fixup for adding of the "dynamic" ipa option

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

12 years agoMark ObjCInterfaceDecl::lookupPrivateMethod as const.
Anna Zaks [Mon, 30 Jul 2012 20:31:21 +0000 (20:31 +0000)]
Mark ObjCInterfaceDecl::lookupPrivateMethod as const.

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

12 years ago[analyzer] Add -analyzer-ipa=dynamic option for inlining dynamically
Anna Zaks [Mon, 30 Jul 2012 20:31:18 +0000 (20:31 +0000)]
[analyzer] Add -analyzer-ipa=dynamic option for inlining dynamically
dispatched methods.

Disabled by default for now.

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

12 years ago[analyzer] Only allow CallEvents to be created by CallEventManager.
Jordan Rose [Mon, 30 Jul 2012 20:22:09 +0000 (20:22 +0000)]
[analyzer] Only allow CallEvents to be created by CallEventManager.

This ensures that it is valid to reference-count any CallEvents, and we
won't accidentally try to reclaim a CallEvent that lives on the stack.
It also hides an ugly switch statement for handling CallExprs!

There should be no functionality change here.

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

12 years ago[analyzer] Remove declaration of refactored evalObjCMessage method.
Jordan Rose [Mon, 30 Jul 2012 20:22:03 +0000 (20:22 +0000)]
[analyzer] Remove declaration of refactored evalObjCMessage method.

No functionality change.

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

12 years agoDo not warn on correct use of the '%n' format specifier.
Matt Beaumont-Gay [Mon, 30 Jul 2012 20:21:58 +0000 (20:21 +0000)]
Do not warn on correct use of the '%n' format specifier.

While '%n' can be used for evil in an attacker-controlled format string, there
isn't any acute danger in using it in a literal format string with an argument
of the appropriate type.

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

12 years ago[analyzer] Introduce a CallEventManager to keep a pool of CallEvents.
Jordan Rose [Mon, 30 Jul 2012 20:21:55 +0000 (20:21 +0000)]
[analyzer] Introduce a CallEventManager to keep a pool of CallEvents.

This allows us to get around the C++ "virtual constructor" problem
when we'd like to create a CallEvent from an ExplodedNode, an inlined
StackFrameContext, or another CallEvent. The solution has three parts:

- CallEventManager uses a BumpPtrAllocator to allocate CallEvent-sized
  memory blocks. It also keeps a cache of freed CallEvents for reuse.
- CallEvents all have protected copy constructors, along with cloneTo()
  methods that use placement new to copy into CallEventManager-managed
  memory, vtables intact.
- CallEvents owned by CallEventManager are now wrapped in an
  IntrusiveRefCntPtr. Going forwards, it's probably a good idea to create
  ALL CallEvents through the CallEventManager, so that we don't accidentally
  try to reclaim a stack-allocated CallEvent.

All of this machinery is currently unused but will be put into use shortly.

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

12 years agoMove comment from member operator() to class.
Dmitri Gribenko [Mon, 30 Jul 2012 19:47:34 +0000 (19:47 +0000)]
Move comment from member operator() to class.

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

12 years agoComment parser: don't crash on a completely empty \param followed by a block
Dmitri Gribenko [Mon, 30 Jul 2012 18:05:28 +0000 (18:05 +0000)]
Comment parser: don't crash on a completely empty \param followed by a block
command

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

12 years agoc-index-test: remove dead store. Found by Clang static analyzer!
Dmitri Gribenko [Mon, 30 Jul 2012 18:00:35 +0000 (18:00 +0000)]
c-index-test: remove dead store.  Found by Clang static analyzer!

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

12 years agoLexer: remove dead stores. Found by Clang static analyzer!
Dmitri Gribenko [Mon, 30 Jul 2012 17:59:40 +0000 (17:59 +0000)]
Lexer: remove dead stores.  Found by Clang static analyzer!

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

12 years agoComment dumper: silence a warning by not casting away const
Dmitri Gribenko [Mon, 30 Jul 2012 17:52:50 +0000 (17:52 +0000)]
Comment dumper: silence a warning by not casting away const

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

12 years agoAdd missing include for Linux buildbot
Dmitri Gribenko [Mon, 30 Jul 2012 17:49:32 +0000 (17:49 +0000)]
Add missing include for Linux buildbot

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

12 years agoAdd an assert to ParamCommandComment::getParamIndex() -- it should not be
Dmitri Gribenko [Mon, 30 Jul 2012 17:38:19 +0000 (17:38 +0000)]
Add an assert to ParamCommandComment::getParamIndex() -- it should not be
called unless index is valid.

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

12 years agoMake -Wformat check the argument type for %n.
Hans Wennborg [Mon, 30 Jul 2012 17:11:32 +0000 (17:11 +0000)]
Make -Wformat check the argument type for %n.

This makes Clang check that the corresponding argument for "%n" in a
format string is a pointer to int.

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

12 years agoComment parser: add one more test
Dmitri Gribenko [Mon, 30 Jul 2012 16:52:51 +0000 (16:52 +0000)]
Comment parser: add one more test

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

12 years agoUpdate source location in test.
Benjamin Kramer [Mon, 30 Jul 2012 16:51:34 +0000 (16:51 +0000)]
Update source location in test.

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

12 years agoUse the location of the copy assignment when diagnosing classes that are nontrivial...
Benjamin Kramer [Mon, 30 Jul 2012 16:41:40 +0000 (16:41 +0000)]
Use the location of the copy assignment when diagnosing classes that are nontrivial because of it.

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

12 years agoFix ambiguity detection in GetBestOverloadCandidateSimple.
Benjamin Kramer [Mon, 30 Jul 2012 15:53:26 +0000 (15:53 +0000)]
Fix ambiguity detection in GetBestOverloadCandidateSimple.

When performing the simplistic overload resolution for single-argument methods,
don't check the best overload for ambiguity with itself when the best overload
doesn't happen to be the first one.

Fixes PR13480.

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

12 years agoFix dynamic object linker for ARM GNUEABIHF.
Jiangning Liu [Mon, 30 Jul 2012 11:05:56 +0000 (11:05 +0000)]
Fix dynamic object linker for ARM GNUEABIHF.

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

12 years agoFix for ASTMatchFinder to visit a functions parameter declarations.
Daniel Jasper [Mon, 30 Jul 2012 05:03:25 +0000 (05:03 +0000)]
Fix for ASTMatchFinder to visit a functions parameter declarations.

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

12 years agoProvide correct linker command line options on FreeBSD 8 (GNU ld 2.15) and on newer...
David Chisnall [Sun, 29 Jul 2012 15:24:44 +0000 (15:24 +0000)]
Provide correct linker command line options on FreeBSD 8 (GNU ld 2.15) and on newer FreeBSD (GNU ld 2.17).

Patch by Dimitry Andric!

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

12 years agoMicrooptimize isOffsetInFileID a bit.
Benjamin Kramer [Sun, 29 Jul 2012 11:12:46 +0000 (11:12 +0000)]
Microoptimize isOffsetInFileID a bit.

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

12 years agoPR13433: In Microsoft mode, don't require function calls within decltype
Richard Smith [Sat, 28 Jul 2012 19:54:11 +0000 (19:54 +0000)]
PR13433: In Microsoft mode, don't require function calls within decltype
expressions to have complete return types (or accessible destructors). If the
return type is required to be complete for some other reason (for instance, if
it is needed by overload resolution), then it will still be required to be
complete. This is apparently required in order to parse a MSVC11 header.

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

12 years agoassert on ACC_bottom when checking for invalid
Fariborz Jahanian [Sat, 28 Jul 2012 18:59:49 +0000 (18:59 +0000)]
assert on ACC_bottom when checking for invalid
CF to ARC conversions.

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

12 years agoAdd a missing testcase for merging the visibility of two declarations used
Rafael Espindola [Sat, 28 Jul 2012 02:51:03 +0000 (02:51 +0000)]
Add a missing testcase for merging the visibility of two declarations used
as arguments of a template.

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

12 years agoComment dumper: print \param parameter index if parameter name is resolved.
Dmitri Gribenko [Sat, 28 Jul 2012 00:35:48 +0000 (00:35 +0000)]
Comment dumper: print \param parameter index if parameter name is resolved.

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

12 years agomore objc-arc: With ACC_bottom, we just provide
Fariborz Jahanian [Sat, 28 Jul 2012 00:11:31 +0000 (00:11 +0000)]
more objc-arc: With ACC_bottom, we just provide
__bride fixit, as it doesn't matter which cast to
use. // rdar://11923822

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

12 years agoobjc-arc: change per Jordy's comments.
Fariborz Jahanian [Fri, 27 Jul 2012 23:55:46 +0000 (23:55 +0000)]
objc-arc: change per Jordy's comments.
// rdar://11923822

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

12 years agoCommentSema.cpp: remove extra semicolon
Dmitri Gribenko [Fri, 27 Jul 2012 23:26:26 +0000 (23:26 +0000)]
CommentSema.cpp: remove extra semicolon

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

12 years agoobjective-c arc: When function calls with known CFCreate naming convention
Fariborz Jahanian [Fri, 27 Jul 2012 22:37:07 +0000 (22:37 +0000)]
objective-c arc: When function calls with known CFCreate naming convention
are cast to retainable types, only suggest CFBridgingRelease/
CFBridgingRetain and not the __bridge casts.
// rdar://11923822

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

12 years agoComment Sema: don't try to typo-correct a \param when function has zero
Dmitri Gribenko [Fri, 27 Jul 2012 21:34:43 +0000 (21:34 +0000)]
Comment Sema: don't try to typo-correct a \param when function has zero
arguments.  Just an optimization, no functional change.

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

12 years agorevert r160839 for now.
Fariborz Jahanian [Fri, 27 Jul 2012 21:34:23 +0000 (21:34 +0000)]
revert r160839 for now.

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

12 years agoImplement resolving of HTML character references (named: &amp;, decimal: &#42;,
Dmitri Gribenko [Fri, 27 Jul 2012 20:37:06 +0000 (20:37 +0000)]
Implement resolving of HTML character references (named: &amp;, decimal: &#42;,
hex: &#x1a;) during comment parsing.

Now internal representation of plain text in comment AST does not contain
character references, but the characters themselves.

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

12 years agoAdd a function to convert a single Unicode code point to a UTF8 sequence.
Dmitri Gribenko [Fri, 27 Jul 2012 20:36:22 +0000 (20:36 +0000)]
Add a function to convert a single Unicode code point to a UTF8 sequence.

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

12 years agoMake -Wformat walk the typedef chain when looking for size_t, etc.
Hans Wennborg [Fri, 27 Jul 2012 19:17:46 +0000 (19:17 +0000)]
Make -Wformat walk the typedef chain when looking for size_t, etc.

Clang's -Wformat fix-its currently suggest using "%zu" for values of
type size_t (in C99 or C++11 mode). However, for a type such as
std::vector<T>::size_type, it does not notice that type is actually
typedeffed to size_t, and instead suggests a format for the underlying
type, such as "%lu" or "%u".

This commit makes the format string fix mechanism walk the typedef chain
so that it notices if the type is size_t, even if that isn't "at the
top".

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

12 years agoConsolidate ObjC lookupPrivateMethod methods from Sema and DeclObjC.
Anna Zaks [Fri, 27 Jul 2012 19:07:44 +0000 (19:07 +0000)]
Consolidate ObjC lookupPrivateMethod methods from Sema and DeclObjC.

Also, fix a subtle bug, which occurred due to lookupPrivateMethod
defined in DeclObjC.h not looking up the method inside parent's
categories.

Note, the code assumes that Class's parent object has the same methods
as what's in the Root class of a the hierarchy, which is a heuristic
that might not hold for hierarchies which do not descend from NSObject.
Would be great to fix this in the future.

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

12 years ago[analyzer] Another false positive in Class method inlining.
Anna Zaks [Fri, 27 Jul 2012 19:07:34 +0000 (19:07 +0000)]
[analyzer] Another false positive in Class method inlining.
We are currently not setting the self object to the calling class object
during inlining nor do we reason about [AAA class].

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

12 years ago[analyzer] Address Jordan's and Fariborz's review of r160768.
Anna Zaks [Fri, 27 Jul 2012 19:07:32 +0000 (19:07 +0000)]
[analyzer] Address Jordan's and Fariborz's review of r160768.

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

12 years agoPreprocessor: add __BYTE_ORDER__ predefined macro
Dylan Noblesmith [Fri, 27 Jul 2012 18:34:31 +0000 (18:34 +0000)]
Preprocessor: add __BYTE_ORDER__ predefined macro

The __BYTE_ORDER__ predefined macro was added in GCC 4.6:
http://gcc.gnu.org/onlinedocs/gcc-4.6.0/cpp/Common-Predefined-Macros.html

It's used like the following:

 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
 ...
 #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
 ...
 #else
 #error insane architecture like the pdp-11
 #endif

There's a similar macro, __FLOAT_WORD_ORDER__, but it looks like it
mainly exist to accommodate fairly obscure architectures and ARM's
old FPA instructions, so it doesn't seem nearly as useful.

The tests are updated to check for the correct(at least, based on
clang's current output) value of the macro on each target. So now the
suite will catch bugs like the one fixed in r157626.

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

12 years ago[scan-build] Fix clang++ pathname
Arnaud A. de Grandmaison [Fri, 27 Jul 2012 17:10:06 +0000 (17:10 +0000)]
[scan-build] Fix clang++ pathname

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

12 years agotest/Preprocessor: add NVPTX predefine tests
Dylan Noblesmith [Fri, 27 Jul 2012 16:37:53 +0000 (16:37 +0000)]
test/Preprocessor: add NVPTX predefine tests

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

12 years agoFix an assertion failure when code completing an auto variable's initialiser.
Peter Collingbourne [Fri, 27 Jul 2012 12:56:09 +0000 (12:56 +0000)]
Fix an assertion failure when code completing an auto variable's initialiser.

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

12 years agoFix PR13394: Erasing from a vector changes the end of the vector, so make sure we...
Benjamin Kramer [Fri, 27 Jul 2012 10:21:08 +0000 (10:21 +0000)]
Fix PR13394: Erasing from a vector changes the end of the vector, so make sure we always have the right end.

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

12 years agoclang/lib: [CMake] Update tblgen'd dependencies.
NAKAMURA Takumi [Fri, 27 Jul 2012 06:18:33 +0000 (06:18 +0000)]
clang/lib: [CMake] Update tblgen'd dependencies.

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

12 years agoclang/lib: [CMake] Reformat, alphabetize lists.
NAKAMURA Takumi [Fri, 27 Jul 2012 06:18:12 +0000 (06:18 +0000)]
clang/lib: [CMake] Reformat, alphabetize lists.

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

12 years agolibclang, examples: [CMake] Add dependencies to tblgen'd headers.
NAKAMURA Takumi [Fri, 27 Jul 2012 06:17:56 +0000 (06:17 +0000)]
libclang, examples: [CMake] Add dependencies to tblgen'd headers.

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

12 years agoclang/CMakeLists.txt: Move "examples" after building lib and tools.
NAKAMURA Takumi [Fri, 27 Jul 2012 06:17:48 +0000 (06:17 +0000)]
clang/CMakeLists.txt: Move "examples" after building lib and tools.

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

12 years agoFinal piece of core issue 1330: delay computing the exception specification of
Richard Smith [Fri, 27 Jul 2012 04:22:15 +0000 (04:22 +0000)]
Final piece of core issue 1330: delay computing the exception specification of
a defaulted special member function until the exception specification is needed
(using the same criteria used for the delayed instantiation of exception
specifications for function temploids).

EST_Delayed is now EST_Unevaluated (using 1330's terminology), and, like
EST_Uninstantiated, carries a pointer to the FunctionDecl which will be used to
resolve the exception specification.

This is enabled for all C++ modes: it's a little faster in the case where the
exception specification isn't used, allows our C++11-in-C++98 extensions to
work, and is still correct for C++98, since in that mode the computation of the
exception specification can't fail.

The diagnostics here aren't great (in particular, we should include implicit
evaluation of exception specifications for defaulted special members in the
template instantiation backtraces), but they're not much worse than before.

Our approach to the problem of cycles between in-class initializers and the
exception specification for a defaulted default constructor is modified a
little by this change -- we now reject any odr-use of a defaulted default
constructor if that constructor uses an in-class initializer and the use is in
an in-class initialzer which is declared lexically earlier. This is a closer
approximation to the current draft solution in core issue 1351, but isn't an
exact match (but the current draft wording isn't reasonable, so that's to be
expected).

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

12 years ago[analyzer] Look through SubstNonTypeTemplateParmExprs.
Jordan Rose [Fri, 27 Jul 2012 01:15:02 +0000 (01:15 +0000)]
[analyzer] Look through SubstNonTypeTemplateParmExprs.

We were treating this like a CXXDefaultArgExpr, but
SubstNonTypeTemplateParmExpr actually appears when a template is
instantiated, i.e. we have all the information necessary to evaluate it.
This allows us to inline functions like llvm::array_lengthof.

<rdar://problem/11949235>

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

12 years ago[analyzer] Use a stack-based local AGAIN to fix the build for real.
Jordan Rose [Fri, 27 Jul 2012 00:47:52 +0000 (00:47 +0000)]
[analyzer] Use a stack-based local AGAIN to fix the build for real.

It's a good thing CallEvents aren't created all over the place yet.
I checked all the uses this time and the private copy constructor
/really/ shouldn't cause any more problems.

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

12 years ago[analyzer] Use a stack-based local instead of a temporary to fix build.
Jordan Rose [Thu, 26 Jul 2012 23:24:15 +0000 (23:24 +0000)]
[analyzer] Use a stack-based local instead of a temporary to fix build.

Passing a temporary via reference parameter still requires a visible
copy constructor.

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

12 years agoobjc-arc: When objects with known CF semantics are assigned to
Fariborz Jahanian [Thu, 26 Jul 2012 23:17:04 +0000 (23:17 +0000)]
objc-arc: When objects with known CF semantics are assigned to
retainable types in arc, only suggest CFBridgingRelease/
CFBridgingRetain and not the confusing __bridge casts.
// rdar://11923822

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

12 years agoTweak test case to not emit warning.
Ted Kremenek [Thu, 26 Jul 2012 22:32:35 +0000 (22:32 +0000)]
Tweak test case to not emit warning.

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

12 years agoSATestBuild should not ask for non-existent checkers.
Jordan Rose [Thu, 26 Jul 2012 22:31:59 +0000 (22:31 +0000)]
SATestBuild should not ask for non-existent checkers.

- "cocoa" was moved to "osx.cocoa" a long time ago.
- "cplusplus" would be a valid package except we don't have any C++ checkers.

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

12 years agoLook at the preceding CFGBlock for the expression to load from in ExprEngine::VisitGu...
Ted Kremenek [Thu, 26 Jul 2012 22:23:41 +0000 (22:23 +0000)]
Look at the preceding CFGBlock for the expression to load from in ExprEngine::VisitGuardedExpr
instead of walking to the preceding PostStmt node.  There are cases where the last evaluated
expression does not appear in the ExplodedGraph.

Fixes PR 13466.

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

12 years ago[analyzer] CallEvent is no longer a value object.
Jordan Rose [Thu, 26 Jul 2012 21:41:15 +0000 (21:41 +0000)]
[analyzer] CallEvent is no longer a value object.

After discussion, the type-based dispatch was decided to be bad for
maintenance and made it very easy for subtle bugs to creep in. Instead,
we'll just be very careful when we do have to allocate these on the heap.

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

12 years ago[analyzer] Rename Calls.{h,cpp} to CallEvent.{h,cpp}. No functionality change.
Jordan Rose [Thu, 26 Jul 2012 21:39:41 +0000 (21:39 +0000)]
[analyzer] Rename Calls.{h,cpp} to CallEvent.{h,cpp}. No functionality change.

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

12 years ago[analyzer] Don't crash on implicit statements inside initializers.
Jordan Rose [Thu, 26 Jul 2012 20:04:30 +0000 (20:04 +0000)]
[analyzer] Don't crash on implicit statements inside initializers.

Our BugReporter knows how to deal with implicit statements: it looks in
the ParentMap until it finds a parent with a valid location. However, since
initializers are not in the body of a constructor, their sub-expressions are
not in the ParentMap. That was easy enough to fix in AnalysisDeclContext.

...and then even once THAT was fixed, there's still an extra funny case
of Objective-C object pointer fields under ARC, which are initialized with
a top-level ImplicitValueInitExpr. To catch these cases,
PathDiagnosticLocation will now fall back to the start of the current
function if it can't find any other valid SourceLocations. This isn't great,
but it's miles better than a crash.

(All of this is only relevant when constructors and destructors are being
inlined, i.e. under -cfg-add-initializers and -cfg-add-implicit-dtors.)

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

12 years ago[analyzer] Don't crash on array constructors and destructors.
Jordan Rose [Thu, 26 Jul 2012 20:04:25 +0000 (20:04 +0000)]
[analyzer] Don't crash on array constructors and destructors.

This workaround is fairly lame: we simulate the first element's constructor
and destructor and rely on the region invalidation to "initialize" the rest
of the elements.

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

12 years ago[analyzer] Handle C++ member initializers and destructors.
Jordan Rose [Thu, 26 Jul 2012 20:04:21 +0000 (20:04 +0000)]
[analyzer] Handle C++ member initializers and destructors.

This uses CFG to tell if a constructor call is for a member, and uses
the member's region appropriately.

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

12 years ago[analyzer] Use the CFG to see if a constructor is for a local variable.
Jordan Rose [Thu, 26 Jul 2012 20:04:16 +0000 (20:04 +0000)]
[analyzer] Use the CFG to see if a constructor is for a local variable.

Previously we were using ParentMap and crawling through the parent DeclStmt.
This should be at least slightly cheaper (and is also more flexible).

No (intended) functionality change.

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

12 years ago[analyzer] Handle base class initializers and destructors.
Jordan Rose [Thu, 26 Jul 2012 20:04:13 +0000 (20:04 +0000)]
[analyzer] Handle base class initializers and destructors.

Most of the logic here is fairly simple; the interesting thing is that
we now distinguish complete constructors from base or delegate constructors.
We also make sure to cast to the base class before evaluating a constructor
or destructor, since non-virtual base classes may behave differently.

This includes some refactoring of VisitCXXConstructExpr and VisitCXXDestructor
in order to keep ExprEngine.cpp as clean as possible (leaving the details for
ExprEngineCXX.cpp).

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

12 years ago[analyzer] Variables with destructors are live until the destructor is run.
Jordan Rose [Thu, 26 Jul 2012 20:04:08 +0000 (20:04 +0000)]
[analyzer] Variables with destructors are live until the destructor is run.

Test case in the next commit, which enables destructors under certain
circumstances.

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

12 years ago[analyzer] Show paths for destructor calls.
Jordan Rose [Thu, 26 Jul 2012 20:04:05 +0000 (20:04 +0000)]
[analyzer] Show paths for destructor calls.

This modifies BugReporter and friends to handle CallEnter and CallExitEnd
program points that came from implicit call CFG nodes (read: destructors).

This required some extra handling for nested implicit calls. For example,
the added multiple-inheritance test case has a call graph that looks like this:

testMultipleInheritance3
  ~MultipleInheritance
    ~SmartPointer
    ~Subclass
      ~SmartPointer
        ***bug here***

In this case we correctly notice that we started in an inlined function
when we reach the CallEnter program point for the second ~SmartPointer.
However, when we reach the next CallEnter (for ~Subclass), we were
accidentally re-using the inner ~SmartPointer call in the diagnostics.

Rather than guess if we saw the corresponding CallExitEnd based on the
contents of the active path, we now just ask the PathDiagnostic if there's
any known stack before popping off the top path.

(A similar issue could have occured without multiple inheritance, but there
wasn't a test case for it.)

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