]>
granicus.if.org Git - clang/log
Ted Kremenek [Fri, 19 Feb 2010 00:42:33 +0000 (00:42 +0000)]
Change InitListExpr to allocate the array for holding references
to initializer expressions in an array allocated using ASTContext.
This plugs a memory leak when ASTContext uses a BumpPtrAllocator to
allocate memory for AST nodes.
In my mind this isn't an ideal solution; it would be nice to have
a general "vector"-like class that allocates memory using ASTContext,
but whose guts could be separated from the methods of InitListExpr
itself. I haven't gone and taken this approach yet because it isn't
clear yet if we'll eventually want an alternate solution for recylcing
memory using by InitListExprs as we are constructing the ASTs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96642
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 19 Feb 2010 00:40:40 +0000 (00:40 +0000)]
Use a little binary header in serialized diagnostics to help the deserializer skip over noise in the stream
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96641
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 19 Feb 2010 00:31:17 +0000 (00:31 +0000)]
Patch removes IVars list from ObjCInterfaceDecl and
instead relies on their DeclContext for iteration, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96638
91177308 -0d34-0410-b5e6-
96231b3b80d8
Blaine Garst [Fri, 19 Feb 2010 00:24:37 +0000 (00:24 +0000)]
remove unused function & enumerations
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96635
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 23:35:40 +0000 (23:35 +0000)]
Teach ASTUnit to keep track of temporary files, then delete them when
the ASTUnit itself is destroyed. Fixes <rdar://problem/
7649385 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96628
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 23:07:20 +0000 (23:07 +0000)]
Re-apply my diagnostics-capture patch for CIndex, with some tweaks to
try to address the msvc failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96624
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 23:05:16 +0000 (23:05 +0000)]
Allow GNU attributes to appear in an Objective-C method declaration
before the selector name (but after the return type). Among other things,
this allows IBAction to be implemented with an attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96623
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 22:36:18 +0000 (22:36 +0000)]
Revert "Sort visitor methods so we can easily tell what's implemented."
This reverts commit
4383e04c75731f8695b8355783f9966ac56b0926 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96622
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 22:32:43 +0000 (22:32 +0000)]
Revert "Tidy up order of switch statement. No functionality change."
This reverts commit
95575005fc6409df98e6e079caf324308f62171b .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96620
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 22:27:07 +0000 (22:27 +0000)]
Revert my CIndex diagnostic changes (r96603, 96606, 96607), which were
breaking the msvc9 builder for unknown reasons.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96618
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 18 Feb 2010 21:31:48 +0000 (21:31 +0000)]
Revert the ctor/dtor alias optimization for now; the buildbots can detect
some failure here that I can't.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96612
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 18 Feb 2010 20:31:02 +0000 (20:31 +0000)]
Fixed a crash specific to blocks in c++ uncovered by an internal
test suite.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96608
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 20:22:25 +0000 (20:22 +0000)]
Introduce debugging/testing hook clang_enableStackTraces() into
CIndex, so that c-index-test to use it to call
lvm::sys::PrintStackTraceOnErrorSignal().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96607
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 20:11:31 +0000 (20:11 +0000)]
Resurrect the displayDiagnostics parameter to clang_createIndex(), and
display captured diagnostics when we can't return an invalid
CXTranslationUnit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96606
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 18 Feb 2010 19:59:28 +0000 (19:59 +0000)]
Make deleting and complete dtor variants defer to other dtor variants by
calling them as subroutines. This triggers whenever the alias optimization
doesn't, i.e. when the dtor has linkonce linkage or there are virtual bases
or it's the deleting dtor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96605
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 19:08:21 +0000 (19:08 +0000)]
Introduce CIndex API functions for displaying a diagnostic, with some
knobs to control formatting. Eventually, I'd like to merge the
implementation of this code with the TextDiagnosticPrinter, so that
it's easy for CIndex clients to produce beautiful diagnostics like the
clang compiler does.
Use this new function to display diagnostics within c-index-test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96603
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 18:52:18 +0000 (18:52 +0000)]
Tidy up order of switch statement. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96602
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 18:47:08 +0000 (18:47 +0000)]
Sort visitor methods so we can easily tell what's implemented.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96600
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 18:47:01 +0000 (18:47 +0000)]
Change cursor behavior for attributes to have them visited as part of recursing
to the children of a Decl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96599
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 18 Feb 2010 18:20:49 +0000 (18:20 +0000)]
Attempt to fix the 32-bit test failures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96595
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 18 Feb 2010 18:10:26 +0000 (18:10 +0000)]
tests: Tweak %clangxx definition to something which should be more portable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96593
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 18:08:43 +0000 (18:08 +0000)]
Rework how CIndex handles diagnostics. Rather than using a callback,
we attach diagnostics to translation units and code-completion
results, so they can be queried at any time.
To facilitate this, the new StoredDiagnostic class stores a diagnostic
in a serializable/deserializable form, and ASTUnit knows how to
capture diagnostics in this stored form. CIndex's CXDiagnostic is a
thin wrapper around StoredDiagnostic, providing a C interface to
stored or de-serialized diagnostics.
I've XFAIL'd one test case temporarily, because currently we end up
storing diagnostics in an ASTUnit that's never returned to the user
(because it contains errors). I'll introduce a temporary fix for this
soon; the real fix will be to allow us to return and query invalid ASTs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96592
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 18 Feb 2010 17:32:33 +0000 (17:32 +0000)]
Fix another bug and add another class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96590
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 18 Feb 2010 17:28:16 +0000 (17:28 +0000)]
Add another class from cxx-vtable-ex.html
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96588
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 18 Feb 2010 17:26:40 +0000 (17:26 +0000)]
More work on vcall offsets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96587
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 18 Feb 2010 17:07:24 +0000 (17:07 +0000)]
Add tests from the Itanium C++ ABI spec.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96586
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 18 Feb 2010 17:00:09 +0000 (17:00 +0000)]
Start stubbing out vcall offset handling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96585
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 18 Feb 2010 16:29:24 +0000 (16:29 +0000)]
Store the base offset of the final overrider in the OverriderInfo struct, to be used for vcall offsets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96582
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Thu, 18 Feb 2010 16:24:20 +0000 (16:24 +0000)]
Remove some dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96581
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 18 Feb 2010 13:02:13 +0000 (13:02 +0000)]
Try to fix the auroraux buildbot. I suspect it has a "#define SEC" somewhere.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 05:46:33 +0000 (05:46 +0000)]
Add basic cursor traversal for attributes. We currently don't have source
ranges for Attr objects, so lookup by cursor location currently doesn't work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96571
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Thu, 18 Feb 2010 04:56:59 +0000 (04:56 +0000)]
Also don't warn about force_align_arg_pointer on function typedefs. (This will
break if you declare an actual function using that typedef. Come to think of it,
maybe I should make this part of the type.)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Thu, 18 Feb 2010 04:39:19 +0000 (04:39 +0000)]
Two fixes related to force_align_arg_pointer:
- Also recognize __force_align_arg_pointer__.
- Don't warn if it's used on a function pointer typedef.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96568
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 04:06:48 +0000 (04:06 +0000)]
Add some spacing in the code-completion results for a return statement
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96567
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 04:01:41 +0000 (04:01 +0000)]
Teach CMake to put the CIndex header into the Xcode/MSVC project
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96566
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Thu, 18 Feb 2010 03:17:58 +0000 (03:17 +0000)]
Extract out function-body code generation into its own method. No functionality
change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96564
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 03:09:07 +0000 (03:09 +0000)]
Start adding cursor kinds for attributes, with first exposing
IBActionAttr and IBOutletAttr respectively.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 03:08:58 +0000 (03:08 +0000)]
Change the behavior of ibaction attributes to be attached to methods, not ivars.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96562
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 02:21:22 +0000 (02:21 +0000)]
AST import for character literals
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96557
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 02:12:22 +0000 (02:12 +0000)]
AST import for forward declarations of Objective-C protocols
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96555
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 02:04:09 +0000 (02:04 +0000)]
Implement import of forward declarations of Objective-C classes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96554
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Thu, 18 Feb 2010 02:00:42 +0000 (02:00 +0000)]
Allow redefinitions of extern inline functions in GNU89 mode, just as GCC
does. Fixes PR5253.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96553
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 01:47:50 +0000 (01:47 +0000)]
AST import of Objective-C categories.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 18 Feb 2010 01:20:22 +0000 (01:20 +0000)]
__typeof should be able to handle block pointer types when
rewriting. Fixes radar
7659483 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96549
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 18 Feb 2010 00:56:01 +0000 (00:56 +0000)]
Don't diagnose overflow in case statements when the conversion is a
signed<->unsigned conversion with the same bit width. Fixes
<rdar://problem/
7658121 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96545
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 00:06:12 +0000 (00:06 +0000)]
Recognize attributes ns_returns_not_retained and cf_returns_not_retained
in the static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96539
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 00:06:04 +0000 (00:06 +0000)]
Add __has_feature support for attributes ns_returns_not_retained
and cf_returns_not_retained.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96538
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 00:05:58 +0000 (00:05 +0000)]
Sort @includes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96537
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 00:05:52 +0000 (00:05 +0000)]
Sort cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96536
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 18 Feb 2010 00:05:45 +0000 (00:05 +0000)]
Add 'ns_returns_not_retained' and 'cf_returns_not_retained' attributes to
match 'ns_returns_retained' and 'cf_returns_retained' respectively. These
are not yet hooked up to the static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96535
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 17 Feb 2010 23:29:11 +0000 (23:29 +0000)]
For -Wswitch-enum warnings, be sure to look through typedefs of enum
types. Fixes <rdar://problem/
7643909 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96531
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 17 Feb 2010 23:02:29 +0000 (23:02 +0000)]
Hook the "overflow converting case value to switch condition type"
warning into -Wswitch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96529
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 17 Feb 2010 22:40:11 +0000 (22:40 +0000)]
When diagnosing enumerator values outside of the range of 'int', be
sure that we get the "too large" vs. "too small" part of the
diagnostic correct.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96524
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 17 Feb 2010 21:42:34 +0000 (21:42 +0000)]
silence warning in a cleaner way
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96520
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Feb 2010 21:27:48 +0000 (21:27 +0000)]
Alphabetize #includes. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96518
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Feb 2010 21:27:41 +0000 (21:27 +0000)]
Change GNUInlineAttr definition to just use DEF_SIMPLE_ATTR.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96517
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 17 Feb 2010 21:22:52 +0000 (21:22 +0000)]
Implement AST importing of ImplicitParamDecls, despite the sad fact
that we can't test it yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96516
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Feb 2010 21:12:23 +0000 (21:12 +0000)]
Don't make the inclusion of crashtracer information depend on NDEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96515
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 17 Feb 2010 21:01:05 +0000 (21:01 +0000)]
Hopefully make buildbot happy.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96513
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 17 Feb 2010 21:00:34 +0000 (21:00 +0000)]
clang: Add support for s// edit form of QA_OVERRIDE_GCC3_OPTIONS.
- Used to do regex patsubst on arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96512
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 17 Feb 2010 20:32:58 +0000 (20:32 +0000)]
PR5803: clang++: Treat untyped 'C' inputs as C++.
- Patch by Andrzej K. Haczewski, with a tweak by me to emit a 'deprecated'
diagnostic when we do this. We'll see what zee users say.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96511
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 17 Feb 2010 20:31:01 +0000 (20:31 +0000)]
tests: Add '%clangxx' substitution, for 'clang++'
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96510
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 17 Feb 2010 19:54:08 +0000 (19:54 +0000)]
Patch to remove arbitrary imporation of 'self' into
a block without it being used. This causes over release
of objects in certain runtime-senitive apps.
(fixes radar
7581175 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96501
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 17 Feb 2010 19:26:59 +0000 (19:26 +0000)]
Fix test to not force triple, and also to not need stdint.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96499
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 17 Feb 2010 18:11:55 +0000 (18:11 +0000)]
Did not intend to check this in.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96486
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 17 Feb 2010 18:10:54 +0000 (18:10 +0000)]
Use proper lexcial context for newly added ivars.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96484
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 17 Feb 2010 18:02:10 +0000 (18:02 +0000)]
Implement AST merging for Objective-C properties.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96483
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 17 Feb 2010 17:48:25 +0000 (17:48 +0000)]
Make FinalOverriders handle virtual bases correctly. Unfortunately this can't be tested just yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96481
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 17 Feb 2010 17:00:07 +0000 (17:00 +0000)]
Allow for declaration and use of ivars in a stand-alone
implementation (toward radar
7547942 ).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96479
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 17 Feb 2010 16:12:00 +0000 (16:12 +0000)]
AST import for Objective-C protocols
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 17 Feb 2010 08:50:05 +0000 (08:50 +0000)]
In symbol reaper, a variable is live if its stack frame is the parent of the
current stack frame.
When leaving a callee, remove all bindings belonging to that callee.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96473
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 17 Feb 2010 08:46:50 +0000 (08:46 +0000)]
For inline-based inter-procedural analysis, we will have multiple stack space regions. Use a dense map to store them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96472
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 17 Feb 2010 08:45:06 +0000 (08:45 +0000)]
Add a utility method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96471
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Feb 2010 08:08:21 +0000 (08:08 +0000)]
Update checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96470
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 17 Feb 2010 08:07:51 +0000 (08:07 +0000)]
Driver: Tweak freebsd::Link, by Roman Divacky.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96469
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 17 Feb 2010 08:07:44 +0000 (08:07 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96468
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 17 Feb 2010 06:30:02 +0000 (06:30 +0000)]
Handle primary bases in AddVCallOffsets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96461
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 17 Feb 2010 06:24:18 +0000 (06:24 +0000)]
Silence GCC warning by marking an assert-only variable as unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96459
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 17 Feb 2010 06:07:19 +0000 (06:07 +0000)]
First cut at emitting vcall offsets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96455
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Wed, 17 Feb 2010 04:48:01 +0000 (04:48 +0000)]
Do not add functions marked with the unused attribute to the list of unused functions to warn about. Update test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96452
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Wed, 17 Feb 2010 03:52:49 +0000 (03:52 +0000)]
Emit complete constructors and destructors as aliases to base constructors
and destructors when the two entities are semantically identical, i.e. when
the class has no virtual base classes. We only do this for linkage types
for which aliases are supported, i.e. internal and external, i.e. not linkonce.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96451
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 17 Feb 2010 03:11:55 +0000 (03:11 +0000)]
Pass through whether a base is virtual or not.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96449
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Feb 2010 02:37:45 +0000 (02:37 +0000)]
Add IBAction attribute to keep the IBOutlet attribute company.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96447
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Wed, 17 Feb 2010 02:25:52 +0000 (02:25 +0000)]
implement EmitVAArg. pretty much the same way other targets do.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96446
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Wed, 17 Feb 2010 02:17:21 +0000 (02:17 +0000)]
Fix unused function warning to handle used attributes and redeclarations. Update test case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96444
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 17 Feb 2010 02:12:47 +0000 (02:12 +0000)]
Implement AST importing and checking for Objective-C method declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96442
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 17 Feb 2010 02:05:23 +0000 (02:05 +0000)]
Correctly calculate base offsets for 'this' pointer adjustments involving virtual bases. This can't be tested yet due to lack of vcall offsets :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Feb 2010 01:42:24 +0000 (01:42 +0000)]
Convert clang_getCompletionChunkText() to return a CXString.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96439
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Wed, 17 Feb 2010 00:44:47 +0000 (00:44 +0000)]
Revert r95939, as suggested by Alexandre Julliard from the Wine project (and
our own Chris Lattner).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96431
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Feb 2010 00:41:40 +0000 (00:41 +0000)]
Remove trailing spaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96427
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Feb 2010 00:41:32 +0000 (00:41 +0000)]
Change clang_getCursorKindSpelling() to return a CXString
instead of a 'const char *'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96425
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Feb 2010 00:41:20 +0000 (00:41 +0000)]
Change clang_getFileName() to return a 'CXString' instead of 'const char *'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96424
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 17 Feb 2010 00:41:08 +0000 (00:41 +0000)]
Move createCXString() functions out of CIndexer and into the clang::cxstring namespace.
We can much more succinctly refer to these functions this way.
Also change the default behavior of createCXString(StringRef&) to duplicate the
string. This is almost always what we want. The other case is where we pass
a constant c-string, which uses the other version of createCXString().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96423
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 17 Feb 2010 00:34:30 +0000 (00:34 +0000)]
Implement AST importing of Objective-C instance variables.
Check superclasses when merging two Objective-C @interfaces.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96420
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 16 Feb 2010 22:27:50 +0000 (22:27 +0000)]
More rewriter test converted to compile with clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96406
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 16 Feb 2010 22:13:48 +0000 (22:13 +0000)]
With addition of -Wno-address-of-temporary (thank you Doug) we can now
have rewriter test cases which pass the .cpp file through clang
and also test c++ aspect of clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96405
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 16 Feb 2010 22:04:33 +0000 (22:04 +0000)]
IRgen optimization: cache the value of 'this' and 'vtt' instead of
repeatedly reloading from an alloca. We still need to create the alloca
for debug info purposes (although we currently create it in all cases
because of some abstraction boundaries that're hard to break down).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96403
91177308 -0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 16 Feb 2010 21:41:20 +0000 (21:41 +0000)]
Distinguish two lexical blocks at the same level.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96397
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 16 Feb 2010 21:39:57 +0000 (21:39 +0000)]
Introduce a new kind of failed result for isLvalue/isModifiableLvalue
which describes temporary objects of class type in C++. Use this to
provide a more-specific, remappable diagnostic when takin the address
of such a temporary.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96396
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 16 Feb 2010 19:45:20 +0000 (19:45 +0000)]
IRgen: Switch 'retval' to use CreateIRTemp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96376
91177308 -0d34-0410-b5e6-
96231b3b80d8