Commit Graph

12196 Commits

Author SHA1 Message Date
Chris Lattner 6968641ac5 rename -fprint-source-range-info -> -fdiagnostics-print-source-range-info.
Temporarily accept both of them, I'll rip out the old one after awhile.

llvm-svn: 69662
2009-04-21 05:34:31 +00:00
Chris Lattner 1f02e054a9 Fix PR4027 + rdar://6808859, we were rejecting implicit casts of
aggregates even though we already accept explicit ones.  Easy fix.

llvm-svn: 69661
2009-04-21 05:19:11 +00:00
Chris Lattner 16f11c7319 downgrade from extwarn to warning.
llvm-svn: 69660
2009-04-21 04:54:03 +00:00
Chris Lattner d6e97af74a improve MacroInfo to track the source range of the macro definition,
patch by Alexei Svitkine!

llvm-svn: 69659
2009-04-21 04:46:33 +00:00
Chris Lattner a9aeea9f27 use of predefined identifiers like __func__ at global scope warn in sema,
but crashed codegen.  Fix this to report the name of the llvm function.
This fixes rdar://6808051

llvm-svn: 69658
2009-04-21 04:41:23 +00:00
Chris Lattner 92b29b2f9f make "in included from" and "in instatiation from" messages respect
-fno-show-location, patch by Alexei Svitkine (PR4024)

llvm-svn: 69657
2009-04-21 03:57:54 +00:00
Chris Lattner cd6d4b105a add a preprocessor callback function for #undef, patch by
Alexei Svitkine!

llvm-svn: 69656
2009-04-21 03:42:09 +00:00
Anders Carlsson 6f2878360c Add a CXXDestroyExpr. Add classof member functions to CXXTempVarDecl.
llvm-svn: 69654
2009-04-21 02:22:11 +00:00
Sanjiv Gupta f09cb95236 Use an APInt of target int size to detect overflow while parsing multichars.
So 'abc' on i16 platforms will warn but not on i32 platforms.

llvm-svn: 69653
2009-04-21 02:21:29 +00:00
Anders Carlsson 21d30b41fc Add the beginnings of a CXXTempVarDecl class.
llvm-svn: 69652
2009-04-21 01:57:48 +00:00
Daniel Dunbar e000df6882 Remove unnused variable.
llvm-svn: 69650
2009-04-21 01:32:46 +00:00
Daniel Dunbar 9ebf9516af Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things
when we need them -- which is exactly what some code was already
doing!
 - No intended functionality change.

llvm-svn: 69648
2009-04-21 01:19:28 +00:00
Daniel Dunbar 50b5c4ccaa Revert 69646, that was the precise inverse of what I wanted to commit.
llvm-svn: 69647
2009-04-21 01:19:10 +00:00
Daniel Dunbar 9df980b876 Kill ASTContext::[gs]etFieldForDecl, instead we just lookup things
when we need them -- which is exactly what some code was already
doing!
 - No intended functionality change.

llvm-svn: 69646
2009-04-21 01:18:01 +00:00
Mike Stump 3214d12325 Fixup codegen for write barriers for block variables. Radar 6786715
llvm-svn: 69642
2009-04-21 00:51:43 +00:00
Daniel Dunbar be9dae80b3 Remove LateBoundIVars() runtime interface, it is unused.
llvm-svn: 69641
2009-04-21 00:49:20 +00:00
Daniel Dunbar e03f005d30 Assert on a few conditions that (I believe) should hold
w.r.t. ASTContext::[gs]etFieldDecl, and the Field argument to
EmitObjCValueForIvar).

llvm-svn: 69639
2009-04-21 00:41:40 +00:00
Daniel Dunbar 712e4dee26 Look at the TMP environment variable as well.
llvm-svn: 69638
2009-04-21 00:25:10 +00:00
Daniel Dunbar 44ea0b2e0e Update this (non-default) test case.
llvm-svn: 69636
2009-04-20 23:53:56 +00:00
Fariborz Jahanian 80c9ce2c4a ObjC2's Ivar bitmap layout work. No change in functionality.
llvm-svn: 69629
2009-04-20 22:03:45 +00:00
Daniel Dunbar f07e9893a9 Mark TypeForDecl mutable.
- Let the const propogation begin.

llvm-svn: 69628
2009-04-20 21:52:34 +00:00
Chris Lattner f4c68741d4 fix the second half of PR4006 and rdar://6807000 by treating
() as being either zero arguments or one empty argument depending
on situation.

llvm-svn: 69627
2009-04-20 21:08:10 +00:00
Douglas Gregor e84a9daa16 Write the identifier table into the PCH file as an on-disk hash table
that also includes the contents of the IdentifierInfo itself (the
various fields and flags, along with the chain of identifiers visible
at the top level that have that name).

We don't make any use of the hash table yet, except that our
identifier ID -> string mapping points into the hash table now.

llvm-svn: 69625
2009-04-20 20:36:09 +00:00
Anders Carlsson 9603143c5d Fix tyop in SSSE3 header (6808876).
llvm-svn: 69623
2009-04-20 20:31:10 +00:00
Daniel Dunbar c35694da21 Also look at the TEMP environment variable as a place to put temporary
files.

llvm-svn: 69622
2009-04-20 20:28:21 +00:00
Daniel Dunbar e3f5cfc0b8 Move countInheritedIvars to within striking distance of
GetClassSizeInfo

Reduce nesting in GetInterfaceDeclStructLayout.

Tweak some comments.

No functionality change.

llvm-svn: 69621
2009-04-20 20:18:54 +00:00
Steve Naroff 3390a2935d Fix spelling error.
llvm-svn: 69620
2009-04-20 20:16:02 +00:00
Steve Naroff aac654abeb Add pch reader/writer support for ObjCContainerDecl, ObjCInterfaceDecl, & ObjCIvarDecl.
Next step: Add selector support to PCHWriter::AddDeclarationName().

llvm-svn: 69619
2009-04-20 20:09:33 +00:00
Chris Lattner ddf6ca0355 the __gnuc_inline__ attribute is actually named __gnu_inline__,
PR4023

llvm-svn: 69618
2009-04-20 19:12:28 +00:00
Devang Patel 45dfbd16b0 Add test case to check line number in debug info.
llvm-svn: 69617
2009-04-20 19:07:55 +00:00
Douglas Gregor 35cf42e55e Allow the Info type used in the on-disk hash table generator to have state
llvm-svn: 69616
2009-04-20 19:03:54 +00:00
Daniel Dunbar ab8ce7cddb If defined, use TMPDIR environment variable as location for temporary files.
llvm-svn: 69609
2009-04-20 17:32:49 +00:00
Chris Lattner f9b00eb7dc clean up anonymous bitfield diagnostics, PR4017
llvm-svn: 69608
2009-04-20 17:29:38 +00:00
Douglas Gregor 162dd0245e Introduce the notion of a SemaConsumer, which is an ASTConsumer that
also gets access to the Sema object performing semantic analysis. This
will be used by the PCH writer to serialize Sema state.

No functionality change.

llvm-svn: 69595
2009-04-20 15:53:59 +00:00
Steve Naroff 04f2d14d6a Add pch reader/writer support for ObjCMethodDecl.
Test will be enabled with ObjCInterfaceDecl is added.

llvm-svn: 69594
2009-04-20 15:06:07 +00:00
Zhongxing Xu 2f8198f82a update the doc.
llvm-svn: 69587
2009-04-20 10:09:10 +00:00
Eli Friedman 3a1e692fed Some cleanup and bug-fixing for address-of checking. This causes a couple of
minor accepts-invalid regressions, but we weren't really rejecting them for 
the right reason.  We really need a more general solution to detect all the 
cases of the promotion of arrays with a register storage class.

llvm-svn: 69586
2009-04-20 08:23:18 +00:00
Douglas Gregor 13ad62ced7 Make the on-disk hash table usable with non-file
raw_ostreams. Requires LLVM r69583.

llvm-svn: 69584
2009-04-20 07:36:26 +00:00
Daniel Dunbar be1f26df5d Inline GetFirstIvarInRecord into sole caller.
- No functionality change.

llvm-svn: 69582
2009-04-20 07:18:49 +00:00
Daniel Dunbar 75e909f5e0 Set a bit in IMAGE_INFO to indicate that we don't contain any
@synthesized ivars for superclasses.
 - <rdar://problem/6806371> [clang] Mark code without miscompiled
   @synthesized properties

llvm-svn: 69581
2009-04-20 07:11:47 +00:00
Douglas Gregor 52289d3343 Move the on-disk hash table code into its own header. No functionality change.
llvm-svn: 69580
2009-04-20 07:08:21 +00:00
Daniel Dunbar f5c18461e3 Lift out GetNamedIvarList.
Drop uses of GetFirstInvarInRecord, instead we lookup the ivars we
know are in the record.
 - This is somewhat less efficient, but I need to detangle this code
   first...

llvm-svn: 69579
2009-04-20 06:54:31 +00:00
Daniel Dunbar c040ce459c Make FieldDecl parameter to getObjCEncodingForType... const.
llvm-svn: 69578
2009-04-20 06:37:24 +00:00
Zhongxing Xu 3070210377 Remove loc::FuncVal.
llvm-svn: 69577
2009-04-20 06:35:22 +00:00
Chris Lattner 396b9c380a more stuff.
llvm-svn: 69576
2009-04-20 06:26:18 +00:00
Daniel Dunbar 69a79b1a60 Don't crash in the diagnostic printer if we happen to get passed a
null string / identifier.

llvm-svn: 69575
2009-04-20 06:13:16 +00:00
Chris Lattner 5ed5e9a612 add a bunch of diagnostics options, add one example warning group.
llvm-svn: 69573
2009-04-20 06:00:23 +00:00
Daniel Dunbar caec0238bc Don't emit ivar offsets for unnamed bit fields.
Also, added assertion that the field matches what would be looked up.

llvm-svn: 69572
2009-04-20 05:53:40 +00:00
Chris Lattner bc002ebd03 Add option groups for -Wimplicit-int and -Wimplicit.
remove special case hack for -Werror-implicit-function-declaration

llvm-svn: 69571
2009-04-20 05:45:34 +00:00
Zhongxing Xu ac1294318d get a CodeTextRegion when visiting FunctionDecl reference.
get FunctionDecl with more general utility method.

llvm-svn: 69570
2009-04-20 05:24:46 +00:00