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
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
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
Fariborz Jahanian
80c9ce2c4a
ObjC2's Ivar bitmap layout work. No change in functionality.
...
llvm-svn: 69629
2009-04-20 22:03:45 +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
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
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
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
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
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
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
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
Eli Friedman
bc633beda4
PR3247: Handle a couple of cases where we weren't emitting VLA sizes (and
...
subsequently crashed).
llvm-svn: 69567
2009-04-20 03:54:15 +00:00
Eli Friedman
3253e189c6
PR3248: Make sure the evaluate the operand of a sizeof when it has a VLA type.
...
Adapted from patch by Tim Northover.
llvm-svn: 69566
2009-04-20 03:21:44 +00:00
Zhongxing Xu
23e1f45664
As we now have ValueManager as the new value factory, we do not need factory
...
methods of SVal.
llvm-svn: 69565
2009-04-20 02:27:09 +00:00
Daniel Dunbar
5d5dbb1754
Remove non-const form of lookupFieldDeclForIvar.
...
llvm-svn: 69563
2009-04-20 00:37:55 +00:00
Daniel Dunbar
ae03226bc6
Comment fixes.
...
llvm-svn: 69562
2009-04-20 00:33:43 +00:00
Daniel Dunbar
554fd79b38
Lift GetClassSizeInfo out of GenerateClass, add a FIXME.
...
- No functionality change.
llvm-svn: 69561
2009-04-19 23:41:48 +00:00
Chris Lattner
504af1177d
implement "#pragma GCC diagnostic". Besides being a nice feature, this
...
will let us test for multiple different warning modes in the same
file in regression tests.
This implements rdar://2362963, a 10-year old feature request :)
llvm-svn: 69560
2009-04-19 23:16:58 +00:00
Chris Lattner
c6fafed04c
move group twiddling options into Diagnostic.cpp instead of
...
Warnings.cpp. Warnings.cpp now doesn't need to #include
tblgen produced output directly.
llvm-svn: 69559
2009-04-19 22:34:23 +00:00
Chris Lattner
3251e3cfaa
don't crash on invalid ranges in -fprint-source-range-info
...
mode, just ignore them as usual.
llvm-svn: 69558
2009-04-19 22:24:10 +00:00
Chris Lattner
df2226839f
Warn about uses of #pragma STDC FENV_ACCESS ON, since we don't
...
support it. I don't know what evaluation method we use for complex
arithmetic, so I don't know whether/if we should warn about use of
CX_LIMITED_RANGE.
This concludes my planned hacking on STDC pragmas, flame away :)
llvm-svn: 69556
2009-04-19 21:55:32 +00:00
Sebastian Redl
8ce189f9ce
Conditional operator C++ checking complete. What issues remain are in more general code.
...
llvm-svn: 69555
2009-04-19 21:53:20 +00:00
Chris Lattner
02ef4e3dba
diagnose invalid syntax of STDC pragmas.
...
llvm-svn: 69554
2009-04-19 21:50:08 +00:00
Eli Friedman
daea3f62b5
Print an error for uses of __thread on targets which don't support it.
...
llvm-svn: 69553
2009-04-19 21:48:33 +00:00