Douglas Gregor
5481d329a3
AST import for CStyleCastExpr. With this, we can import Cocoa.h into an empty context
...
llvm-svn: 96648
2010-02-19 01:32:14 +00:00
Douglas Gregor
d8552cdc96
AST import for sizeof and alignof expressions
...
llvm-svn: 96647
2010-02-19 01:24:23 +00:00
Douglas Gregor
52f820ead4
AST import for DeclRefExprs
...
llvm-svn: 96646
2010-02-19 01:17:02 +00:00
Fariborz Jahanian
ad238e2bde
XFAIL until I can fugure out how test check for a pattern when
...
clang is built optimized.
llvm-svn: 96645
2010-02-19 01:11:52 +00:00
Douglas Gregor
f0bc0d22d3
XFAIL some of the c-index-test tests on Windows, where they are failing inexplicably
...
llvm-svn: 96644
2010-02-19 01:10:48 +00:00
Douglas Gregor
c74247eddd
AST import of parenthesized expressions, unary operators, binary
...
operators, and compound assignment operators.
llvm-svn: 96643
2010-02-19 01:07:06 +00:00
Ted Kremenek
445a603c78
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.
llvm-svn: 96642
2010-02-19 00:42:33 +00:00
Douglas Gregor
70127c1dcf
Use a little binary header in serialized diagnostics to help the deserializer skip over noise in the stream
...
llvm-svn: 96641
2010-02-19 00:40:40 +00:00
Fariborz Jahanian
aef662206b
Patch removes IVars list from ObjCInterfaceDecl and
...
instead relies on their DeclContext for iteration, etc.
llvm-svn: 96638
2010-02-19 00:31:17 +00:00
Blaine Garst
5421a83e4a
remove unused function & enumerations
...
llvm-svn: 96635
2010-02-19 00:24:37 +00:00
Douglas Gregor
6cb5ba4c4f
Teach ASTUnit to keep track of temporary files, then delete them when
...
the ASTUnit itself is destroyed. Fixes <rdar://problem/7649385>.
llvm-svn: 96628
2010-02-18 23:35:40 +00:00
Douglas Gregor
1e21cc7d19
Re-apply my diagnostics-capture patch for CIndex, with some tweaks to
...
try to address the msvc failures.
llvm-svn: 96624
2010-02-18 23:07:20 +00:00
Ted Kremenek
66f2d6ba7b
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.
llvm-svn: 96623
2010-02-18 23:05:16 +00:00
Ted Kremenek
e21102523a
Revert "Sort visitor methods so we can easily tell what's implemented."
...
This reverts commit 4383e04c75731f8695b8355783f9966ac56b0926.
llvm-svn: 96622
2010-02-18 22:36:18 +00:00
Ted Kremenek
aaaf2bfffb
Revert "Tidy up order of switch statement. No functionality change."
...
This reverts commit 95575005fc6409df98e6e079caf324308f62171b.
llvm-svn: 96620
2010-02-18 22:32:43 +00:00
Douglas Gregor
9773e3d077
Revert my CIndex diagnostic changes (r96603, 96606, 96607), which were
...
breaking the msvc9 builder for unknown reasons.
llvm-svn: 96618
2010-02-18 22:27:07 +00:00
John McCall
334ce7c1c4
Revert the ctor/dtor alias optimization for now; the buildbots can detect
...
some failure here that I can't.
llvm-svn: 96612
2010-02-18 21:31:48 +00:00
Fariborz Jahanian
ffcfecdc1f
Fixed a crash specific to blocks in c++ uncovered by an internal
...
test suite.
llvm-svn: 96608
2010-02-18 20:31:02 +00:00
Douglas Gregor
81d53769b5
Introduce debugging/testing hook clang_enableStackTraces() into
...
CIndex, so that c-index-test to use it to call
lvm::sys::PrintStackTraceOnErrorSignal().
llvm-svn: 96607
2010-02-18 20:22:25 +00:00
Douglas Gregor
707cf72cb8
Resurrect the displayDiagnostics parameter to clang_createIndex(), and
...
display captured diagnostics when we can't return an invalid
CXTranslationUnit.
llvm-svn: 96606
2010-02-18 20:11:31 +00:00
John McCall
5c60a6f597
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.
llvm-svn: 96605
2010-02-18 19:59:28 +00:00
Douglas Gregor
06dcf0375b
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.
llvm-svn: 96603
2010-02-18 19:08:21 +00:00
Ted Kremenek
fcb3db7d68
Tidy up order of switch statement. No functionality change.
...
llvm-svn: 96602
2010-02-18 18:52:18 +00:00
Ted Kremenek
7dff4163aa
Sort visitor methods so we can easily tell what's implemented.
...
llvm-svn: 96600
2010-02-18 18:47:08 +00:00
Ted Kremenek
0e2930979d
Change cursor behavior for attributes to have them visited as part of recursing
...
to the children of a Decl.
llvm-svn: 96599
2010-02-18 18:47:01 +00:00
Anders Carlsson
f8b53536ed
Attempt to fix the 32-bit test failures.
...
llvm-svn: 96595
2010-02-18 18:20:49 +00:00
Daniel Dunbar
1c32596e56
tests: Tweak %clangxx definition to something which should be more portable.
...
llvm-svn: 96593
2010-02-18 18:10:26 +00:00
Douglas Gregor
33cdd81064
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.
llvm-svn: 96592
2010-02-18 18:08:43 +00:00
Anders Carlsson
e5faca7cda
Fix another bug and add another class.
...
llvm-svn: 96590
2010-02-18 17:32:33 +00:00
Anders Carlsson
aa7444cd7d
Add another class from cxx-vtable-ex.html
...
llvm-svn: 96588
2010-02-18 17:28:16 +00:00
Anders Carlsson
8847d9e40a
More work on vcall offsets.
...
llvm-svn: 96587
2010-02-18 17:26:40 +00:00
Anders Carlsson
664b7d026e
Add tests from the Itanium C++ ABI spec.
...
llvm-svn: 96586
2010-02-18 17:07:24 +00:00
Anders Carlsson
78277c7705
Start stubbing out vcall offset handling.
...
llvm-svn: 96585
2010-02-18 17:00:09 +00:00
Anders Carlsson
5a7654a9d8
Store the base offset of the final overrider in the OverriderInfo struct, to be used for vcall offsets.
...
llvm-svn: 96582
2010-02-18 16:29:24 +00:00
Anders Carlsson
c8316a2e08
Remove some dead code.
...
llvm-svn: 96581
2010-02-18 16:24:20 +00:00
Benjamin Kramer
26d19c59f8
Try to fix the auroraux buildbot. I suspect it has a "#define SEC" somewhere.
...
llvm-svn: 96577
2010-02-18 13:02:13 +00:00
Ted Kremenek
6ab9aa02e3
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.
llvm-svn: 96571
2010-02-18 05:46:33 +00:00
Charles Davis
9fcead75ee
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.)
llvm-svn: 96570
2010-02-18 04:56:59 +00:00
Charles Davis
cb9572e7b3
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.
llvm-svn: 96568
2010-02-18 04:39:19 +00:00
Douglas Gregor
44272ca356
Add some spacing in the code-completion results for a return statement
...
llvm-svn: 96567
2010-02-18 04:06:48 +00:00
Douglas Gregor
4db30233a8
Teach CMake to put the CIndex header into the Xcode/MSVC project
...
llvm-svn: 96566
2010-02-18 04:01:41 +00:00
John McCall
89b12b34f6
Extract out function-body code generation into its own method. No functionality
...
change.
llvm-svn: 96564
2010-02-18 03:17:58 +00:00
Ted Kremenek
bff31437ef
Start adding cursor kinds for attributes, with first exposing
...
IBActionAttr and IBOutletAttr respectively.
llvm-svn: 96563
2010-02-18 03:09:07 +00:00
Ted Kremenek
1f672829fb
Change the behavior of ibaction attributes to be attached to methods, not ivars.
...
llvm-svn: 96562
2010-02-18 03:08:58 +00:00
Douglas Gregor
623421d385
AST import for character literals
...
llvm-svn: 96557
2010-02-18 02:21:22 +00:00
Douglas Gregor
8661a72b48
AST import for forward declarations of Objective-C protocols
...
llvm-svn: 96555
2010-02-18 02:12:22 +00:00
Douglas Gregor
06537af873
Implement import of forward declarations of Objective-C classes
...
llvm-svn: 96554
2010-02-18 02:04:09 +00:00
Charles Davis
fea4845609
Allow redefinitions of extern inline functions in GNU89 mode, just as GCC
...
does. Fixes PR5253.
llvm-svn: 96553
2010-02-18 02:00:42 +00:00
Douglas Gregor
84c51c3581
AST import of Objective-C categories.
...
llvm-svn: 96551
2010-02-18 01:47:50 +00:00
Fariborz Jahanian
f50679151b
__typeof should be able to handle block pointer types when
...
rewriting. Fixes radar 7659483.
llvm-svn: 96549
2010-02-18 01:20:22 +00:00