Chris Lattner
1782da2f84
Add a new -rewrite-test option, which is basically a
...
playground to experiment with some new rewriter approaches. For now
it is probably the most complex version of 'cat' ever invented.
llvm-svn: 57406
2008-10-12 05:29:20 +00:00
Chris Lattner
fc7d4a3bd2
Add a new -dump-raw-tokens option, which allows us to see raw tokens.
...
Rename -dumptokens to -dump-tokens.
llvm-svn: 57405
2008-10-12 05:03:36 +00:00
Chris Lattner
50c9050037
Change how raw lexers are handled: instead of creating them and then
...
using LexRawToken, create one and use LexFromRawLexer. This avoids
twiddling the RawLexer flag around and simplifies some code (even
speeding raw lexing up a tiny bit).
This change also improves the token paster to use a Lexer on the stack
instead of new/deleting it.
llvm-svn: 57393
2008-10-12 01:15:46 +00:00
Steve Naroff
8022c30aaa
Fix/simplify RewriteBlocks::RewriteBlockPointerFunctionArgs().
...
This completes the fix for <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?.
llvm-svn: 57350
2008-10-10 15:33:34 +00:00
Daniel Dunbar
faa4f50b71
Disable blocks support in C++ mode.
...
llvm-svn: 57334
2008-10-10 00:20:52 +00:00
Steve Naroff
35530480c2
Touchup the rewriter to handle the new BlockExpr->BlockDecl dance.
...
llvm-svn: 57299
2008-10-08 17:31:13 +00:00
Steve Naroff
415d3d570a
- Add BlockDecl AST node.
...
- Modify BlockExpr to reference the BlockDecl.
This is "cleanup" necessary to improve our lookup semantics for blocks (to fix <rdar://problem/6272905> clang block rewriter: parameter to function not imported into block?).
Still some follow-up work to finish this (forthcoming).
llvm-svn: 57298
2008-10-08 17:01:13 +00:00
Ted Kremenek
db7f2a74db
Explicitly access the first Decl* referenced by a DeclStmt instead of using "getDecl()." Added a FIXME indicating that the call to RewriteObjCQualifiedInterfaceTypes() is meant to modifying the type-specifier; hopefully this will be a little more clean once DeclGroups contain type specifiers.
...
llvm-svn: 57216
2008-10-06 22:45:07 +00:00
Ted Kremenek
5b6f8ee7b9
Use "DeclStmt::getSolitaryDecl()" when accessing the DeclStmt of an @catch .
...
llvm-svn: 57215
2008-10-06 22:39:38 +00:00
Ted Kremenek
292b3842a0
Use DeclStmt::getSolitaryDecl() instead of DeclStmt::getDecl() when rewriting Objective-c foreach statements.
...
llvm-svn: 57212
2008-10-06 22:16:13 +00:00
Ted Kremenek
53532c1fda
In RewriteFunctionBody, using DeclStmt::decl_iterator to rewrite the Decls in a DeclStmt instead of using getDecl() to fetch the first Decl.
...
Steve: Please review this patch. 'make test' passes, and my cursory scan of the rewriter leads me to believe this doesn't break anything, but I'm not sure.
llvm-svn: 57195
2008-10-06 18:47:09 +00:00
Daniel Dunbar
374b8b4269
Allow -verify to be used with -rewrite-macros.
...
llvm-svn: 57093
2008-10-05 01:38:39 +00:00
Daniel Dunbar
6b57b45b4d
Add dummy -ast-dump support for ObjC category implementations.
...
llvm-svn: 57087
2008-10-05 00:31:15 +00:00
Steve Naroff
8f9be42072
Remove old diag that alerted the user to a limitation we no longer have:-)
...
llvm-svn: 57086
2008-10-05 00:12:46 +00:00
Steve Naroff
02da7667d2
Create a function, eliminating some redundancy between SynthesizeBlockInitExpr() and SynthesizeBlockLiterals().
...
llvm-svn: 57083
2008-10-05 00:06:12 +00:00
Steve Naroff
c7a80a5533
Finish implementing copy/dispose helpers for imported block decls.
...
llvm-svn: 57082
2008-10-04 23:47:37 +00:00
Daniel Dunbar
e773d5ff16
Set exit code properly on "Unexpected program action".
...
llvm-svn: 57080
2008-10-04 23:42:49 +00:00
Steve Naroff
4017d15fed
Add indirection required for byref BlockDeclRefExpr's.
...
llvm-svn: 57063
2008-10-04 18:52:47 +00:00
Steve Naroff
564e97a2de
Handle bookkeeping for imported blocks (in SynthesizeBlockImpl).
...
This code was "lost" with my recent changes to SynthesizeBlockFunc.
llvm-svn: 57056
2008-10-04 18:00:11 +00:00
Steve Naroff
87b9d298b8
Cut/paste error...need to use the expression "name" for member references (or other complex expressions that can embed a block pointer type)
...
llvm-svn: 57054
2008-10-04 17:45:51 +00:00
Steve Naroff
756efbc7f7
Clear the map that associated the rewritten block with it's corresponding BlockExpr.
...
llvm-svn: 57053
2008-10-04 17:10:02 +00:00
Steve Naroff
5f96e4dffc
Moved main control flow functions to bottom of file.
...
Reworked control flow to:
- rewrite the block expr body "in place".
- used Chris's new rewriter hook "getRewritenText" to "lift" the text for later use.
- finally, we do the block expr text replacement.
llvm-svn: 57052
2008-10-04 17:06:23 +00:00
Steve Naroff
3d5a11c622
Remove an old/vacuous if clause.
...
llvm-svn: 57036
2008-10-03 23:00:50 +00:00
Steve Naroff
e3e45a8c43
More fun & games with the block rewriter.
...
llvm-svn: 57028
2008-10-03 20:28:15 +00:00
Steve Naroff
a2d71df5b9
Rewrite global block expressions.
...
llvm-svn: 57004
2008-10-03 15:38:09 +00:00
Steve Naroff
239f6f9b24
- Add a convenience constructor to Type.
...
- Many rewriter modifications.
llvm-svn: 57003
2008-10-03 15:04:50 +00:00
Steve Naroff
7bf080c9cc
Rework SynthesizeBlockImpl() to include a constructor.
...
llvm-svn: 57001
2008-10-03 12:09:49 +00:00
Daniel Dunbar
15619c7e4b
Pass postfix attributes to ActOnFields.
...
llvm-svn: 56992
2008-10-03 02:03:53 +00:00
Steve Naroff
49428dbdd5
Get the right location to insert the synthesized block literals/functions.
...
llvm-svn: 56987
2008-10-03 00:12:09 +00:00
Steve Naroff
ddb1492288
Name changes and some cleanup of preamble.
...
llvm-svn: 56984
2008-10-02 23:30:43 +00:00
Steve Naroff
d40a39626c
Changed Sema::CheckForConstantInitializer to allow global block literals.
...
This commit also includes some name changes in the blocks rewriter (no functionality change).
llvm-svn: 56955
2008-10-02 17:12:56 +00:00
Daniel Dunbar
d03c02873a
(llvm up) If the target triple is unspecified, automatically set the
...
OS version part to that of the host on darwin.
llvm-svn: 56943
2008-10-02 01:21:33 +00:00
Daniel Dunbar
4dd154663e
Drop code to validate OS part of target triple on darwin, too fragile.
...
llvm-svn: 56941
2008-10-02 00:26:24 +00:00
Daniel Dunbar
106ab3bb42
Fix help for --suppress-system-warnings
...
llvm-svn: 56878
2008-09-30 20:49:53 +00:00
Chris Lattner
97d749464d
Handle minor version numbers in __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
...
like "10.3.9"
llvm-svn: 56873
2008-09-30 20:30:12 +00:00
Chris Lattner
b5c15e8228
Finish handling of -mmacosx-version-min. If you now do something like:
...
clang -mmacosx-version-min=10.4.9 ...
you'll end up with a target triple like "i686-apple-darwin8.9".
llvm-svn: 56871
2008-09-30 20:16:56 +00:00
Chris Lattner
29c54dd6b9
start handling 'mmacosx-version-min', this is not complete yet.
...
llvm-svn: 56828
2008-09-30 01:13:12 +00:00
Chris Lattner
b03dc76499
clean up a bunch of fixme's I added, by moving
...
DirectoryLookup::DirType into SourceManager.h
llvm-svn: 56692
2008-09-26 21:18:42 +00:00
Chris Lattner
71efd8159e
fit in 80 cols.
...
llvm-svn: 56687
2008-09-26 20:05:14 +00:00
Daniel Dunbar
e778131386
Make clang preprocessed output a bit more like gcc output.
...
llvm-svn: 56636
2008-09-26 01:13:35 +00:00
Steve Naroff
4efed31acf
Fix a couple harmless warnings when compiling optimized with gcc (reported by mrs@apple.com).
...
llvm-svn: 56591
2008-09-24 22:46:45 +00:00
Steve Naroff
c792570eb1
Fix some const-ness to keep the VisualStudio C++ compiler happy.
...
llvm-svn: 56560
2008-09-24 17:22:34 +00:00
Steve Naroff
92559af851
RewriteBlocks::RewriteBlockPointerDecl(): Handle TypedefDecl's and VarDecl's uniformly.
...
llvm-svn: 56500
2008-09-23 21:15:53 +00:00
Steve Naroff
87930ca38f
Teach block rewriter to replace '^' with '*' in VarDecls.
...
Since we don't have DeclGroup's and location information for types, there is some fancy footwork to do this fairly reliably.
O.K...it's a kludge. One day, we can use this as motivation to do this more gracefully:-)
llvm-svn: 56499
2008-09-23 19:24:41 +00:00
Ted Kremenek
f0673e4eb6
Change implementation of NSError** coding-style check to be invoked at the end of the retain/release analysis.
...
llvm-svn: 56312
2008-09-18 21:25:13 +00:00
Steve Naroff
9779e92fa4
Add driver support for invoking block rewriter.
...
Also tweaked the create function to take an explicit output file.
llvm-svn: 56305
2008-09-18 14:10:13 +00:00
Ted Kremenek
fc3abeb1e5
Implemented one of the checks requested in PR 2600:
...
"Method accepting NSError** argument should have non-void return value to indicate that an error occurred."
Test case written, but the header needs to be delta-debugged reduced. Will commit shortly.
llvm-svn: 56297
2008-09-18 06:33:41 +00:00
Steve Naroff
43bafa78b3
Remove BlockStmtExpr.
...
Block literals are now represented by the concrete BlockExpr class.
This is cleanup (removes a FIXME).
No functionality change.
llvm-svn: 56288
2008-09-17 18:37:59 +00:00
Steve Naroff
2da868e9c2
Add support for rewriting blocks...
...
llvm-svn: 56266
2008-09-17 00:13:27 +00:00
Ted Kremenek
2d470fc0ba
Patch by Csaba Hruska!
...
"Here is a patch what replaces std::ostream with llvm::raw_ostream. This patch
covers the AST library, but ignores Analysis lib."
llvm-svn: 56185
2008-09-13 05:16:45 +00:00
Daniel Dunbar
84b70f7f0f
Add --suppress-system-warnings (on by default, use =0 to disable)
...
- For investigating warnings in system headers / builtins.
- Currently also enables the behavior that allows silent redefinition
of types in system headers. Conceptually these are separate but I
didn't feel it was worth two options (or changing LangOptions).
llvm-svn: 56163
2008-09-12 18:10:20 +00:00
Steve Naroff
4adbe3116e
Fix <rdar://problem/6210791> clang ObjC rewriter: @try / @catch block with no @finally does not call objc_exception_try_exit.
...
Need a couple tweaks to RewriteObjCTryStmt(). Need to deal with implicit finally clauses (to make sure objc_exception_try_exit is called). Also fixed a related bug where we need to generate an implicit @catch else clause (to again make sure objc_exception_try_exit is called).
llvm-svn: 56104
2008-09-11 15:29:03 +00:00
Argyrios Kyrtzidis
e7092bafc2
LangOptions.C99 should be false in C++.
...
llvm-svn: 56092
2008-09-11 04:21:06 +00:00
Douglas Gregor
e972aa471d
Add support for expected-note to Clang's -verify option
...
llvm-svn: 56089
2008-09-11 02:46:36 +00:00
Steve Naroff
fac18fe2ee
Fix <rdar://problem/6197841> try, finally with no catch stops the exception from being propagated
...
llvm-svn: 56004
2008-09-09 19:59:12 +00:00
Nico Weber
b0920374ca
rename libclangSEMA to libclangSema
...
llvm-svn: 55887
2008-09-07 17:09:06 +00:00
Ted Kremenek
2147570258
Change struct forward declarations and definitions to use unique RecordDecls, as opposed to creating a single RecordDecl and reusing it.
...
This change effects both RecordDecls and CXXRecordDecls, but does not effect EnumDecls (yet).
The motivation of this patch is as follows:
- Capture more source information, necessary for refactoring/rewriting clients.
- Pave the way to resolve ownership issues with RecordDecls with the forthcoming
addition of DeclGroups.
Current caveats:
- Until DeclGroups are in place, we will leak RecordDecls not explicitly
referenced by the AST. For example:
typedef struct { ... } x;
The RecordDecl for the struct will be leaked because the TypedefDecl doesn't
refer to it. This will be solved with DeclGroups.
- This patch also (temporarily) breaks CodeGen. More below.
High-level changes:
- As before, TagType still refers to a TagDecl, but it doesn't own it. When
a struct/union/class is first referenced, a RecordType and RecordDecl are
created for it, and the RecordType refers to that RecordDecl. Later, if
a new RecordDecl is created, the pointer to a RecordDecl in RecordType is
updated to point to the RecordDecl that defines the struct/union/class.
- TagDecl and RecordDecl now how a method 'getDefinition()' to return the
TagDecl*/RecordDecl* that refers to the TagDecl* that defines a particular
enum/struct/class/union. This is useful from going from a RecordDecl* that
defines a forward declaration to the RecordDecl* that provides the actual
definition. Note that this also works for EnumDecls, except that in this case
there is no distinction between forward declarations and definitions (yet).
- Clients should no longer assume that 'isDefinition()' returns true from a
RecordDecl if the corresponding struct/union/class has been defined.
isDefinition() only returns true if a particular RecordDecl is the defining
Decl. Use 'getDefinition()' instead to determine if a struct has been defined.
- The main changes to Sema happen in ActOnTag. To make the changes more
incremental, I split off the processing of enums and structs et al into two
code paths. Enums use the original code path (which is in ActOnTag) and
structs use the ActOnTagStruct. Eventually the two code paths will be merged,
but the idea was to preserve the original logic both for comparison and not to
change the logic for both enums and structs all at once.
- There is NO CHAINING of RecordDecls for the same RecordType. All RecordDecls
that correspond to the same type simply have a pointer to that type. If we
need to figure out what are all the RecordDecls for a given type we can build
a backmap.
- The diff in CXXRecordDecl.[cpp,h] is actually very small; it just mimics the
changes to RecordDecl. For some reason 'svn' marks the entire file as changed.
Why is CodeGen broken:
- Codegen assumes that there is an equivalence between RecordDecl* and
RecordType*. This was true before because we only created one RecordDecl* for
a given RecordType*, but it is no longer true. I believe this shouldn't be too
hard to change, but the patch was big enough as it is.
I have tested this patch on both the clang test suite, and by running the static analyzer over Postgresql and a large Apple-internal project (mix of Objective-C and C).
llvm-svn: 55839
2008-09-05 17:16:31 +00:00
Daniel Dunbar
98e0e535bd
Workaround gcc bug causing crash on our preprocessed outputs.
...
- gcc is not happy if we start a preprocessed file with
#line 1 "XXX" 1
- Workaround by making sure file starts with a simple #line change.
Also, factored WriteLineInfo out.
Also, fixed bug where FileType was not being correctly updated.
llvm-svn: 55825
2008-09-05 03:22:57 +00:00
Ted Kremenek
47923c7e59
Remove "NextDecl" from RecordDecl. This change touches many files that where RecordDecl or CXXRecordDecl was constructed, always with an argument of 'NULL' for the previous declaration.
...
The motivation behind this change is that chaining the RecordDecls is simply unnecessary. Once we create multiple RecordDecls for the same struct/union/class, clients that care about all the declarations of the same struct can build a back map by seeing which Decls refer to the same RecordType.
llvm-svn: 55821
2008-09-05 01:34:33 +00:00
Ted Kremenek
5047f71f3e
Output "ANALYZE:" diagnostics to STDOUT instead of STDERR.
...
llvm-svn: 55750
2008-09-04 00:02:50 +00:00
Ted Kremenek
b44763456c
Following gcc's behavior, only enable trigraphs if '-trigraphs' or '-ansi' is
...
specified, or -std is set to a conforming mode.
llvm-svn: 55738
2008-09-03 21:22:16 +00:00
Daniel Dunbar
9a0ea046db
Add newline to end of file.
...
llvm-svn: 55525
2008-08-29 03:45:59 +00:00
Ted Kremenek
2eb49f295d
Always print out the function we're analyzing.
...
llvm-svn: 55488
2008-08-28 18:34:41 +00:00
Ted Kremenek
803e7e1e47
Ubigraph visualization: represent cached nodes with a different style.
...
llvm-svn: 55463
2008-08-28 05:02:09 +00:00
Ted Kremenek
266ec3fb4e
Automatically execute ubiviz.
...
Cleanup ubigraph files when don't drawing the graphs.
llvm-svn: 55459
2008-08-28 03:54:51 +00:00
Ted Kremenek
c8288b408a
Ubigraph-rendered ExplodedGraphs now have arrows and are oriented downward.
...
llvm-svn: 55446
2008-08-27 22:46:55 +00:00
Ted Kremenek
d461d7ad7e
Added Ubigraph visualization for the static analyzer (this is pretty alpha quality).
...
llvm-svn: 55442
2008-08-27 22:31:43 +00:00
Daniel Dunbar
3b4fdb0951
Rename ObjCPropertyImplDecl::PropertyImplKind (consistency)
...
- Change enum name to Kind.
- Change enum constants to English strings.
Also, fix getPropertyImplementation (which probably should be renamed)
llvm-svn: 55354
2008-08-26 04:47:31 +00:00
Zhongxing Xu
9470a96b18
Moved HTMLDiagnostics to lib/Driver.
...
llvm-svn: 55274
2008-08-24 02:33:36 +00:00
Chris Lattner
a2e25e5e72
adjust to changes in various APIs from LLVM. We can't print
...
an APInt directly to an ostream now, so add some hacks. It would
be better to switch all of the bugreport (and friends) stuff over
to raw_ostream.
llvm-svn: 55264
2008-08-23 22:23:37 +00:00
Daniel Dunbar
b8767ac183
Add TargetInfo::useNeXTRuntimeAsDefault
...
- Used to autoselect runtime when neither -fnext-runtime nor
-fgnu-runtime is specified.
- Default impl is false, all darwin targets set it to true.
llvm-svn: 55231
2008-08-23 08:43:39 +00:00
Nico Weber
ed9b4100a8
Move most of HeaderSearch initialization to libDriver.
...
For example, adding the default system include paths in clients is now as
simple as
InitHeaderSearch init(headers);
init.AddDefaultSystemIncludePaths(langopts);
init.Realize();
llvm-svn: 55174
2008-08-22 09:25:22 +00:00
Chris Lattner
433a2ce988
improve pretty printing of objc method declaration,
...
patch contributed by Benjamin Stiglitz!
llvm-svn: 55170
2008-08-22 06:59:15 +00:00
Steve Naroff
b2fc05227c
RewriteObjC::RewriteObjCSynchronizedStmt(): Make sure the sync expr is cast to "id".
...
This fixes <rdar://problem/6163088> clang ObjC rewriter: @synchronized ([foo class]) {} does not cast properly.
llvm-svn: 55118
2008-08-21 13:03:03 +00:00
Steve Naroff
ad7013b1e6
Fix crasher in RewriteObjC::RewriteObjCSynchronizedStmt(). Can't depend on the source locations of the sync expression (since it may have been rewritten.
...
Fixes <rdar://problem/6156363> clang ObjC rewriter: rewriting attached file causes assertion failure: invalid FileID
llvm-svn: 54986
2008-08-19 13:04:19 +00:00
Chris Lattner
cdceb08ca2
Use raw_ostream to output an unsigned.
...
llvm-svn: 54973
2008-08-19 04:23:15 +00:00
Argyrios Kyrtzidis
3bab3d21f9
Add ExplicitCastExpr to replace the current CastExpr, and have ImplicitCastExpr and ExplicitCastExpr derive from a common base class (CastExpr):
...
Expr
-> CastExpr
-> ExplicitCastExpr
-> ImplicitCastExpr
llvm-svn: 54955
2008-08-18 23:01:59 +00:00
Chris Lattner
286e5e6c61
printing with an unspecified dest means to print to stdout.
...
llvm-svn: 54872
2008-08-17 07:09:08 +00:00
Chris Lattner
b52817bff0
don't delete a variable on the stack
...
llvm-svn: 54871
2008-08-17 07:07:01 +00:00
Chris Lattner
7459c86a29
simplify this code a bit more.
...
llvm-svn: 54864
2008-08-17 03:54:39 +00:00
Chris Lattner
068529a243
remove global variables for output stream.
...
llvm-svn: 54861
2008-08-17 03:12:02 +00:00
Chris Lattner
b5a92f8648
Switch to shared raw_ostream code instead of having it be clang specific.
...
This also helps the eventual distcc project.
llvm-svn: 54858
2008-08-17 01:47:12 +00:00
Ted Kremenek
e4d923383a
Fix typo.
...
llvm-svn: 54774
2008-08-14 03:45:07 +00:00
Daniel Dunbar
3ad53483fb
Add LangOptions::NeXTRuntime.
...
- Wired to -fnext-runtime and -fgnu-runtime options.
- Defaults to GNU, no autoselection for NeXT.
Emit NeXT OBJC_IMAGE_INFO marker.
llvm-svn: 54651
2008-08-11 21:35:06 +00:00
Daniel Dunbar
fb3043d627
Add -fexceptions to Driver
...
- Maps to LangOptions.Exceptions
- Currently always off, should autoselect based on language.
Update CodeGen to set unwind attribute on functions definitions based
on LangOptions.Exceptions.
- Still need to set attributes appropriately on calls.
llvm-svn: 54643
2008-08-11 17:36:14 +00:00
Daniel Dunbar
221fa94e40
More #include cleaning
...
- Drop Expr.h,RecordLayout.h from ASTContext.h (for DeclBase.h and
SourceLocation.h)
- Move ASTContext constructor into implementation
llvm-svn: 54627
2008-08-11 04:54:23 +00:00
Nico Weber
4c3116437c
* Remove isInSystemHeader() from DiagClient, move it to SourceManager
...
* Move FormatError() from TextDiagnostic up to DiagClient, remove now
empty class TextDiagnostic
* Make DiagClient optional for Diagnostic
This fixes the following problems:
* -html-diags (and probably others) does now output the same set of
warnings as console clang does
* nothing crashes if one forgets to call setHeaderSearch() on
TextDiagnostic
* some code duplication is removed
llvm-svn: 54620
2008-08-10 19:59:06 +00:00
Nico Weber
e4919cc2bf
Do not crash with -serialize.
...
This happened because seralization was done in the constructor, and at that time the TranslationUnit is no longer valid.
llvm-svn: 54618
2008-08-10 19:20:05 +00:00
Chris Lattner
6307f19726
rename PreDefinedExpr -> PredefinedExpr
...
llvm-svn: 54605
2008-08-10 01:53:14 +00:00
Nico Weber
7094a5bfa8
do not serialize invalid asts. this fixes bug #2637
...
llvm-svn: 54590
2008-08-09 18:32:11 +00:00
Ted Kremenek
6231e7e4ec
Unbreak SerializationTest and the Rewriter by doing the work in HandleTranslationUnit instead of the destructor.
...
llvm-svn: 54513
2008-08-08 04:15:52 +00:00
Ted Kremenek
dcb5e38927
ParseAST now never releases the passed ASTConsumer. This is the responsibility of the client.
...
The motivation is that clients may either:
(a) query the ASTConsumer object after AST parsing to collect data/etc.
(b) reuse the ASTConsumer.
llvm-svn: 54502
2008-08-08 02:46:37 +00:00
Ted Kremenek
59f3553392
Remove unneeded #includes.
...
llvm-svn: 54478
2008-08-07 18:14:04 +00:00
Ted Kremenek
6b515b5b34
Micro cleanups.
...
llvm-svn: 54477
2008-08-07 18:13:12 +00:00
Ted Kremenek
31691ae862
Fix --html-diags in driver by delaying the construction of an HTMLDiagnosticClient until after we have created the Preprocessor object.
...
llvm-svn: 54472
2008-08-07 17:49:57 +00:00
Matthijs Kooijman
8dab3eec81
Let LLVMCodeGenWriter forward all the methods defined in ASTConsumer, to
...
prevent unexpected surprises later on.
llvm-svn: 54469
2008-08-07 16:04:15 +00:00
Steve Naroff
c884aa8e84
Fix for <rdar://problem/6113807> clang ObjC rewriter: crash rewriting attached file
...
While this is a safe rewriter fix, there is still a need for some discussion (see report for more info).
llvm-svn: 54412
2008-08-06 15:58:23 +00:00
Nico Weber
b5fc3c300a
add a libDriver, for now only move the text diangostics stuff from Driver to there
...
llvm-svn: 54383
2008-08-05 23:33:20 +00:00
Steve Naroff
dd514e01f2
Finish fixing <rdar://problem/5929344> clang ObjC rewriter: "extern int __CFConstantStringClassReference[];" should be extern "C"
...
llvm-svn: 54367
2008-08-05 20:04:48 +00:00
Nuno Lopes
d86aa9340d
fix crash when printing diagnostics with tokens that span through more than one line
...
llvm-svn: 54365
2008-08-05 19:40:20 +00:00
Ted Kremenek
2c674f6dbb
Refactored driver logic for CodeGen into LLVMCodeGenWriter. This ASTConsumer layers on top of LLVMCodeGen (another existing ASTConsumer) to emit bitcode files to disk. This layering takes this logic out of clang.cpp and puts it directly into the ASTConsumer interface. The benefit is that now --emit-llvm works with both serialized ASTs and regular source files.
...
llvm-svn: 54364
2008-08-05 18:50:11 +00:00
Steve Naroff
568bbf73b2
Fix <rdar://problem/6108119> clang ObjC rewriter: if no newline at end of input file, rewriter inserts #define on same line as closing brace
...
llvm-svn: 54363
2008-08-05 18:47:23 +00:00
Daniel Dunbar
1ff1d1fd51
Move AsmLabel into Declarator instead of just a parameter to
...
ActOnDeclarator.
llvm-svn: 54353
2008-08-05 16:28:08 +00:00
Daniel Dunbar
4983df37a7
Add more Parser/Sema support for GCC asm-label extension.
...
- ActOnDeclarator now takes an additional parameter which is the
AsmLabel if used. Its unfortunate that this bubbles up this high,
but we cannot just lump it in as an attribute without mistakenly
*accepting* it as an attribute.
- The actual asm-label itself is, however, encoded as an AsmLabelAttr
on the FunctionDecl.
- Slightly improved parser error recovery on malformed asm-labels.
- CodeGen support still missing...
llvm-svn: 54339
2008-08-05 01:35:17 +00:00
Ted Kremenek
9898028742
Fix regression when invoking the MissingDealloc analysis: disable this check when in -fobjc-gc-only mode.
...
llvm-svn: 54319
2008-08-04 17:14:10 +00:00
Daniel Dunbar
f4693e289a
Add more output to clang -parse-print-callbacks
...
- Just added prints for all the action functions. Ideally this would
be extended to print all the information for the actions.
llvm-svn: 54259
2008-08-01 00:41:12 +00:00
Ted Kremenek
8cf5045012
Fix regression in range highlighting in HTML output.
...
llvm-svn: 54181
2008-07-29 23:35:38 +00:00
Steve Naroff
873bd8497a
Fix incomplete implementation for rewriting protocol refs.
...
<rdar://problem/6108127> clang ObjC rewriter: no translation of id <proto>
llvm-svn: 54163
2008-07-29 18:15:38 +00:00
Chris Lattner
3f6cd0bc76
remove some unneeded calls to getCanonicalType
...
llvm-svn: 54106
2008-07-26 22:36:27 +00:00
Chris Lattner
f08932928c
comment out #pragma mark and #warning directives.
...
llvm-svn: 54020
2008-07-25 16:37:06 +00:00
Chris Lattner
b9c34de5c4
rewrite handling of the raw token stream in -rewrite-macros to lex
...
everything up front into a vector. This makes it easier to scan around
the stream when needed.
llvm-svn: 54019
2008-07-25 16:29:12 +00:00
Steve Naroff
29788347b2
Fix RewriteObjC::RewriteObjCThrowStmt() to respect whitespace between the @ and throw.
...
This fixes <rdar://problem/5988388> clang ObjC rewriter: mystery 'w' inserted in exception throw.
llvm-svn: 54017
2008-07-25 15:41:30 +00:00
Steve Naroff
6c79f97037
Fix Sema::ActOnClassMessage() to pass through the identifier for "super".
...
This fixes a critical rewriter bug (<rdar://problem/6096760> clang ObjC rewriter: 'self' not expected value in class method called with 'super').
Also added a couple FIXME's since I'm not happy with my fix to Sema. It would be nicer if the super handling for class/instance messages was the same (based on PreDefinedExpr).
llvm-svn: 53994
2008-07-24 19:44:33 +00:00
Ted Kremenek
1c0c06bb9c
"This patch adds paths for Fedora 9 in clang.cpp and support for two preprocessor options in ccc."
...
Patch by Zhongxing Xu!
llvm-svn: 53976
2008-07-24 03:49:15 +00:00
Ted Kremenek
c99332c5a6
Modified HTMLDiagnostics to also perform syntax highlighting for errors in header files.
...
llvm-svn: 53965
2008-07-23 23:18:15 +00:00
Ted Kremenek
3b28f4911c
Add prototype implementation of unused ivar check.
...
llvm-svn: 53942
2008-07-23 00:45:26 +00:00
Ted Kremenek
1f352db96a
Moved registration of basic path-sensitive checks from GRSimpleVals.cpp to GRExprEngineInternalChecks.cpp.
...
llvm-svn: 53909
2008-07-22 16:21:24 +00:00
Chris Lattner
388f6e97e1
unindent this function by using an early exit, not functionality change.
...
llvm-svn: 53877
2008-07-21 21:33:21 +00:00
Chris Lattner
390d39ac7e
move two more lists of protocols over to use ObjCList<ObjCProtocolDecl>,
...
simplifying code along the way and fixing a problem and memory leak or two.
llvm-svn: 53876
2008-07-21 21:32:27 +00:00
Steve Naroff
f0ff879881
RewriteObjC::RewriteObjCForCollectionStmt() needs to handle bodies with a single statement.
...
Fixes <rdar://problem/6084870> clang ObjC rewriter: for-in enumeration in 1 line produces output with error.
llvm-svn: 53858
2008-07-21 18:26:02 +00:00
Chris Lattner
d004505b74
introduce a new ObjCList templated class and start moving
...
various objc lists over to it. First up, the protocol list
on ObjCInterfaceDecl.
llvm-svn: 53856
2008-07-21 18:19:38 +00:00
Daniel Dunbar
155ed24359
Prevent clang from emitting output when input has errors
...
+ test case
<rdar://problem/6080040>
http://llvm.org/bugs/show_bug.cgi?id=2280
llvm-svn: 53756
2008-07-18 16:38:05 +00:00
Steve Naroff
97adf60418
RewriteObjC::SynthMessageExpr(): Fix super rewrite (a fairly recent regression).
...
Fixes <rdar://problem/6046663> clang ObjC rewriter: Regression in handling of 'super' in latest build.
llvm-svn: 53703
2008-07-16 22:35:27 +00:00
Steve Naroff
d7ebc05476
Remove a FIXME from RewriteObjC::RewriteObjCSynchronizedStmt().
...
llvm-svn: 53696
2008-07-16 19:47:39 +00:00
Steve Naroff
8dd1525b9a
RewriteObjC::Initialize(): add function decls used by @synchronized.
...
This fixes <rdar://problem/6040143> clang ObjC rewriter: @synchronized keyword inserts undeclared objc functions.
llvm-svn: 53695
2008-07-16 18:58:11 +00:00
Steve Naroff
de7d0f69ba
Two fixes:
...
- Make sure ObjCIvarDecl propagates the bitfield width.
- RewriteObjC::SynthesizeIvarOffsetComputation(): Avoid using the __OFFSETOF__ mumbo jumbo for bitfields (since it isn't legal C). This fixes <rdar://problem/5986079> clang ObjC rewriter: bitfields and ivar access don't mix.
llvm-svn: 53694
2008-07-16 18:22:22 +00:00
Steve Naroff
ce2dca186b
RewriteObjC::RewriteObjCTryStmt():Don't synthesize a catch begin if there are 0 catch clauses.
...
This fixes <rdar://problem/5987211> clang ObjC rewriter: @try / @finally block produces unbalanced output.
llvm-svn: 53679
2008-07-16 15:31:30 +00:00
Steve Naroff
b067bbd019
Teach RewriteObjC::RewriteObjCMethodDecl() to deal with pointer to function return types.
...
This fixes <rdar://problem/6034961> clang ObjC rewriter: rewriting methods with function pointer return values does not work
llvm-svn: 53678
2008-07-16 14:40:40 +00:00
Ted Kremenek
fd7efdf20d
Provide an "Analysis Scope" for Analyses so checks can either be run on code declarations (bodies) or Objective-C @implementation blocks.
...
llvm-svn: 53584
2008-07-15 00:46:02 +00:00
Ted Kremenek
3063b73773
Break off declaration of Analysis enum into Analyses.def. The driver options in
...
clang.cpp now #include these definitions to create the command line options, and
AnalysisConsumer #includes this file to generate the switch statement to create
actions.
Renamed -check-objc-methodsigs to -warn-objc-methodsigs.
The "missing -dealloc" check is now optional: -warn-objc-missing-dealloc
llvm-svn: 53575
2008-07-14 23:41:13 +00:00
Ted Kremenek
3bfb314c25
Add new check: -check-objc-methodsigs. This check scans methods in
...
ObjCImplementationDecls and sees if a ancestor class defines a method with the
same selector but with a different type signature. Right now it just compares
return types, and mainly looks at differences in primitive values. The checking
will be expanded in the future.
llvm-svn: 53482
2008-07-11 22:40:47 +00:00
Ted Kremenek
79ab0fa913
In a report-XXXXX.html, make the title include the name of the file with the bug. Patch by Jean-Daniel Dupas!
...
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-July/002166.html
llvm-svn: 53184
2008-07-07 18:31:05 +00:00
Nuno Lopes
88b1d0ee42
add gentoo stable gcc headers path so that all tests pass here (CPATH isnt enough..)
...
llvm-svn: 53143
2008-07-05 17:15:18 +00:00
Ted Kremenek
e66ca6f35a
For the -dealloc checker, check the LangOptions to determine whether or not the code is compiled with GC.
...
llvm-svn: 53098
2008-07-03 14:35:01 +00:00
Ted Kremenek
1d3c797c90
Have BugReporter::getCFG and BugReporter::getLiveVariables returns pointers instead of references, because they can both fail
...
on functions we cannot construct full CFGs for yet.
llvm-svn: 53081
2008-07-03 05:26:14 +00:00
Ted Kremenek
0e7d25233e
Added static analysis check to see if a subclass of NSObject implements -dealloc, and whether or not that implementation calls [super dealloc].
...
llvm-svn: 53075
2008-07-03 04:29:21 +00:00
Ted Kremenek
c7efb536d5
Unify the code path for the Dead Stores checker to always use the BugReporter interface.
...
llvm-svn: 53054
2008-07-02 23:16:33 +00:00
Ted Kremenek
b1d0118a1a
Refactored some of the BugReporter interface so that data such as the ASTContext&, PathDiagnosticClient*, can be provided by an external source.
...
Split BugReporter into BugReporter and GRBugReporter so checkers not based on GRExprEngine can still use the BugReporter mechanism.
llvm-svn: 53048
2008-07-02 21:24:01 +00:00
Ted Kremenek
125d4a3b2d
GRExprEngine now expects the LiveVariables information to be provided by its creator.
...
This allows an optimization in AnalysisConsumer where the same LiveVariables information is used between multiple analyses.
llvm-svn: 53046
2008-07-02 20:13:38 +00:00
Ted Kremenek
d8ca1f6dd9
Added version of CheckDeadStores that accepts a client-provided LiveVariables object.
...
Modified the DeadStores logic in AnalysisConsumer.cpp to use the LiveVariables object created by the AnalysisManager.
llvm-svn: 53043
2008-07-02 18:39:20 +00:00
Ted Kremenek
f992cfb4ab
Moved logic for -dump-cfg and -view-cfg into AnalysisConsumer.
...
Renamed -dump-cfg to -cfg-dump, and -view-cfg to -cfg-view. This naming better matches the same options for asts (e.g. -ast-dump).
llvm-svn: 53041
2008-07-02 18:23:21 +00:00
Ted Kremenek
bdbe6130f4
Move -dump-live-variables logic to AnalysisConsumer.
...
llvm-svn: 53039
2008-07-02 18:11:29 +00:00
Ted Kremenek
71ac83246f
Migrate CheckerConsumer diagnostics to the new AnalysisConsumer interface.
...
Remove CheckerConsumer.
llvm-svn: 53029
2008-07-02 16:49:11 +00:00
Ted Kremenek
becec2cbbc
Move logic for "-checker-simple" to the new AnalysisConsumer interface.
...
llvm-svn: 53028
2008-07-02 16:35:50 +00:00
Ted Kremenek
8e631a0267
Migrated driver logic for running the CF retain/release checker over to the new AnalysisConsumer interface.
...
llvm-svn: 53002
2008-07-02 00:44:58 +00:00
Ted Kremenek
f0413bfcda
Added AnalysisConsumer, a meta-level ASTConsumer class to drive various
...
analyses. This potentially is the primordial origins of a Clang-equivalent
"PassManager".
The new AnalysisConsumer interface allows multiple analyses to be run from a
single invocation of Clang.
Migrated the logic of "-warn-dead-stores" and "-warn-uninit-values" to use the
new AnalysisConsumer interface. The new interface results in a significant code
reduction to incorporate an analysis into the Driver.
Updated a test case to (correctly) acknowledge that it contains a dead store
(this check wasn't being performed because it was previously masked by
-warn-uninit-values).
llvm-svn: 52996
2008-07-02 00:03:09 +00:00
Matthijs Kooijman
0fb56e50b1
Make clang work on 32 bit powerpc linux.
...
Patch by Nick Lewycky!
llvm-svn: 52777
2008-06-26 08:39:30 +00:00
Matthijs Kooijman
70574af7d8
Link in LLVMAnalysis after LLVMCodeGen, since the latter depends on the former
...
since LLVM r52748.
llvm-svn: 52776
2008-06-26 08:37:29 +00:00
Chris Lattner
d46944d639
a temporary minimal hack to get clang building after the getStringValue changes in llvm mainline.
...
llvm-svn: 52753
2008-06-26 04:05:20 +00:00
Ted Kremenek
675a6e6dfa
Patch by Anders Bergh:
...
'There's not much to say about this patch, it just adds the Arch Linux
gcc 4.3.1 header paths for i686 and amd64. The patch was generated
using "svn diff" with clang at revision 52660. The paths aren't
distribution-specific, so they should work for all Linux distributions
using the default(?) names like "i686-pc-linux-gnu".'
llvm-svn: 52665
2008-06-24 03:33:47 +00:00
Chris Lattner
0f2b471730
Implement printing for ObjCClassDecl's, patch by Jean-Daniel Dupas!
...
llvm-svn: 52598
2008-06-21 21:40:20 +00:00
Chris Lattner
a9b3cae8fd
Switch 'super' from being a weird cast thing to being a predefined expr node.
...
Patch by David Chisnall with objc rewriter and stmtdumper updates from me.
llvm-svn: 52580
2008-06-21 18:04:54 +00:00
Ted Kremenek
c64511152a
Updated call to dead stores to use proper arguments.
...
llvm-svn: 52560
2008-06-20 21:55:29 +00:00
Chris Lattner
5696e7badf
Change self/_cmd to be instances of ImplicitParamDecl instead of ParmVarDecl.
...
Patch by David Chisnall!
llvm-svn: 52422
2008-06-17 18:05:57 +00:00
Argyrios Kyrtzidis
351008da17
Allow -parse-noop -verify options to be used together.
...
llvm-svn: 52249
2008-06-13 12:15:34 +00:00
Argyrios Kyrtzidis
554a07bab3
-Changes to TagDecl:
...
Added TagKind enum.
Added getTagKind() method.
Added convenience methods: isEnum(), isStruct(), isUnion(), isClass().
-RecordDecl/CXXRecordDecl::Create() accept a TagKind enum instead of a DeclKind one.
llvm-svn: 52160
2008-06-09 23:19:58 +00:00
Eli Friedman
8233993fc6
Get -serialize working again, plus a bit of minor cleanup.
...
llvm-svn: 52152
2008-06-09 20:02:51 +00:00
Ted Kremenek
92611db88f
Use a common SourceManager when processing multiple files. This allows us to cache the contents of source files already loaded from disk.
...
llvm-svn: 52066
2008-06-06 22:42:39 +00:00
Ted Kremenek
3ad519441f
Fix crash when running with multiple source files. This can be improved.
...
llvm-svn: 52032
2008-06-06 01:47:30 +00:00
Ted Kremenek
b147ad1051
Moved LangOptions from TranslationUnit to ASTContext. This induced a variety of cleanups in some ASTConsumers.
...
llvm-svn: 51943
2008-06-04 15:55:15 +00:00
Chris Lattner
f4fee9e1e5
make rewrite macros insert a space when commenting out macros where the token didn't
...
lead with a space.
llvm-svn: 51896
2008-06-03 06:10:17 +00:00
Steve Naroff
f611964230
Fix <rdar://problem/5976164> clang ObjC rewriter: for ... in enumeration inserts undeclared function (objc_enumerationMutation should be in preamble)
...
llvm-svn: 51880
2008-06-02 20:23:21 +00:00
Chris Lattner
d3f3231a07
Two identifiers are not the same unless they have the same identifier info.
...
llvm-svn: 51827
2008-05-31 22:01:01 +00:00
Ted Kremenek
380df93fd6
Added "InitializeTU" to ASTConsumer. This is used by Sema::ParseAST to pass a
...
TranslationUnit object instead of an ASTContext. By default it calls
Initialize(ASTConstext& Context) (to match with the current interface used by
most ASTConsumers).
Modified the ObjC-Rewriter to use InitializeTU, and to tell the TranslationUnit
to not free its Decls. This is a workaround for: <rdar://problem/5966749>
llvm-svn: 51825
2008-05-31 20:11:04 +00:00
Steve Naroff
cd92aebd1f
Fix <rdar://problem/5917992> clang ObjC rewriter: #end from #if statement lost in translation.
...
Some fancy footwork to accommodate embedded preprocessor directives within an interface.
llvm-svn: 51815
2008-05-31 14:15:04 +00:00
Steve Naroff
930e099b90
Fix <rdar://problem/5969777> clang ObjC rewriter: #imported file name mysteriously commented out
...
This fix involved tightening up needToScanForQualifiers(), which predated ObjCQualifiedIdType.
It also includes a minor tweak to the code that searches for the beginning of the qualified type. If the AST contained the correct beginning of the declaration (i.e. the beginning of the declaration specifiers), this code would be more robust. Since it doesn't, we apply an adhoc heuristic. Note that DeclSpec contains this info...we just don't propagate it to the AST (at present).
llvm-svn: 51812
2008-05-31 05:02:17 +00:00
Steve Naroff
a6141f0780
Hack RewriteObjC::RewriteObjCStringLiteral() to include the filename in the generated code (replacing any non-alphanumeric characters with "_"). This allows header files to contain ObjCStringLiterals.
...
llvm-svn: 51811
2008-05-31 03:35:42 +00:00
Ted Kremenek
a3774667d3
Correctly preserve the order between -F and -I options.
...
llvm-svn: 51803
2008-05-31 00:27:00 +00:00
Ted Kremenek
6bb6d9f197
Use llvm: 🆑 :desc for description of the -Wimplicit-function-declaration option.
...
Patch by Holger Schurig!
llvm-svn: 51774
2008-05-30 16:42:02 +00:00
Eli Friedman
35c01c6f2d
Fix crash with -serialize (reported to cfe-dev). The issue was
...
essentially that we were destroying the declarations twice.
(Note that we don't use -serialize directly in the testsuite, only
SerializeTest.)
llvm-svn: 51768
2008-05-30 11:28:30 +00:00
Chris Lattner
8c80070de2
Implement support for -w, which silences all warnings. PR2384.
...
llvm-svn: 51683
2008-05-29 15:36:45 +00:00
Chris Lattner
34873d2134
give location info to another paren expr.
...
llvm-svn: 51646
2008-05-28 16:38:23 +00:00
Chris Lattner
37f5b7d39c
minor changes, collect the range of an expr before rewriting the subexprs
...
no functionality change.
llvm-svn: 51497
2008-05-23 20:40:52 +00:00
Steve Naroff
fd16687b9a
Make sure method definitions get output with -ast-dump.
...
llvm-svn: 51494
2008-05-23 18:50:58 +00:00
Ted Kremenek
0954b4564e
Update driver include paths to work on darwin10.
...
llvm-svn: 51431
2008-05-22 15:26:22 +00:00
Dan Gohman
1627ae7c48
Explicitly #include Support/Streams.h when using llvm::cout and friends.
...
llvm-svn: 51391
2008-05-21 20:19:16 +00:00
Eli Friedman
b158b4a47b
Fix the destruction "properly" in the sense that we actually destroy the
...
ASTs. This is a hack, but I haven't considered how we really
want to do this.
llvm-svn: 51364
2008-05-21 05:33:10 +00:00
Steve Naroff
ad91868aa6
Fix rewriter bug <rdar://problem/5929344> clang ObjC rewriter: "extern int __CFConstantStringClassReference[];" should be extern "C".
...
Have clang predefine OBJC_NEW_PROPERTIES (which is what gcc does).
llvm-svn: 51163
2008-05-15 21:12:10 +00:00
Chris Lattner
14196c099f
Implement -rewrite-macros, which is a crazy macro expander that expands
...
macros but doesn't expand #includes, remove comments, remove #defines
etc.
For example:
----
#include <stdio.h>
#define bbaa
#define funclike(x) x "a" x "b" x
bbaa bbaa
#if 1
funclike("gar")
foo /*blah*/ bar
bar
#endif
#if 0
funclike()
#endif
----
rewrites to:
----
#include <stdio.h>
#define bbaa
#define funclike(x) x "a" x "b" x
/*bbaa bbaa*/
#if 1
"gar" "a" "gar" "b" "gar"/*funclike*//*("gar")*/
foo /*blah*/ bar
bar
#endif
#if 0
/*funclike()*/
#endif
----
llvm-svn: 50925
2008-05-10 00:02:33 +00:00
Chris Lattner
664ef65981
make #if 0 code compile, even though it still isn't very useful.
...
llvm-svn: 50920
2008-05-09 22:43:24 +00:00
Steve Naroff
d30f8c5b54
Fix <rdar://problem/5924225> clang ObjC rewriter: objc_exception_throw declaration in preamble does not match objc/objc-exception.h.
...
llvm-svn: 50915
2008-05-09 21:17:56 +00:00
Steve Naroff
2e4e385a58
Make sure the prototype for objc_msgSend_fpret() returns a double.
...
llvm-svn: 50873
2008-05-08 22:02:18 +00:00
Steve Naroff
b1c02371cd
Fix <rdar://problem/5879237> clang objc rewriter: ivars not accessible in structure generated for class
...
llvm-svn: 50862
2008-05-08 17:52:16 +00:00
Sanjiv Gupta
15cb669039
Added -g command line options to clang for generating source level debug information. This patch currently enables generation of line number debug information (stoppoints) and region begin/end debug information. The new files CGDebugInfo.h and CGDebugInfo.cpp implements the debug info manager class CGDebugInfo.
...
llvm-svn: 50848
2008-05-08 08:54:20 +00:00
Sanjiv Gupta
cd13ef01a2
Remove the ending "." from clang options descriptions.
...
llvm-svn: 50847
2008-05-08 08:28:14 +00:00
Chris Lattner
3c04ff00c2
start implementation of a macro rewriter, this is currently just stubbed out.
...
llvm-svn: 50845
2008-05-08 06:52:13 +00:00
Steve Naroff
30ac2225ee
Fix <rdar://problem/5887874> clang ObjC rewriter: Use a different name for 'offsetof' macro
...
llvm-svn: 50832
2008-05-07 21:23:49 +00:00
Fariborz Jahanian
ec6e4c8096
This patch introduces declaration of getter methods for ObjC2's
...
properties. Couple of property tests will fail with this patch.
Will fix them next.
llvm-svn: 50818
2008-05-07 17:43:59 +00:00
Steve Naroff
cab93d58c3
Fix <rdar://problem/5908598> clang ObjC rewriter: typo in #pragma at end
...
llvm-svn: 50790
2008-05-07 00:06:16 +00:00
Ted Kremenek
e6d2419351
Improve HTMLDiagnostics by understanding the "Below" hint.
...
llvm-svn: 50783
2008-05-06 23:42:18 +00:00
Steve Naroff
29ce4e5d78
Fix <rdar://problem/5879237> clang objc rewriter: ivars not accessible in structure generated for class
...
llvm-svn: 50781
2008-05-06 23:20:07 +00:00
Fariborz Jahanian
eeb7fae063
Print ObjC methods of ObjC classes.
...
llvm-svn: 50779
2008-05-06 23:14:25 +00:00
Steve Naroff
ac81a5aad5
Fix <rdar://problem/5888515> clang ObjC rewriter: Use objc.h for declarations instead of putting them in the preamble?
...
llvm-svn: 50774
2008-05-06 22:45:19 +00:00
Steve Naroff
13e74879b0
Fix <rdar://problem/5881225> clang ObjC Rewriter: Protocol structure defined twice when two interfaces use it in same file
...
llvm-svn: 50767
2008-05-06 18:26:51 +00:00
Fariborz Jahanian
09367d68ff
Patch to refactor setter/getter names of property attributes into Selector
...
(was IdentifierInfo * before). This will make method declartations whole
lot easier.
llvm-svn: 50747
2008-05-06 18:09:04 +00:00
Chris Lattner
00e2607de2
Add support for -Wimplicit-function-declaration, rdar://5907433
...
llvm-svn: 50672
2008-05-05 21:18:06 +00:00
Fariborz Jahanian
8d91686b0d
percolate @optional/@required protocols down to ASTs for
...
properties declared in the protocol.
llvm-svn: 50662
2008-05-05 18:51:55 +00:00
Chris Lattner
de977c0a5c
Fix PR2281: these two warnings should be promoted to error on
...
pedantic error. Perhaps I should add a class of 'extension' that is
'extension that warns by default', which would be cleaner.
llvm-svn: 50633
2008-05-04 23:52:02 +00:00
Ted Kremenek
5f56cbbf7d
Output better paths to display in bug reports and compute a common
...
prefix for all files.
llvm-svn: 50592
2008-05-02 22:04:53 +00:00
Ted Kremenek
789942cfda
When running the reference count checker twice (GC and non-GC mode), only emit
...
basic warnings (dead stores, null dereferences) on the first pass.
llvm-svn: 50584
2008-05-02 18:01:49 +00:00