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
Eli Friedman
d88c8a104f
Add target property for whether thread-local storage is supported.
...
Let me know if I messed up for some target. Note that for Windows, we
should be able to support it (MSVC supports "__declspec(thread)"), but
I'm pretty sure LLVM doesn't know how to generate the correct code.
llvm-svn: 69552
2009-04-19 21:38:35 +00:00
Chris Lattner
a0b1f76d10
reject invalid stuff in the STDC namespace.
...
llvm-svn: 69551
2009-04-19 21:25:37 +00:00
Chris Lattner
958ee04368
stub out STDC #pragmas.
...
llvm-svn: 69550
2009-04-19 21:20:35 +00:00
Daniel Dunbar
f5e9b1f5d0
Forward f[no-]dollars-in-identifiers to clang, when specified.
...
llvm-svn: 69549
2009-04-19 21:20:32 +00:00
Sebastian Redl
0753c6f591
Bring member pointer operands of the conditional operator to a common type. We're getting there ...
...
llvm-svn: 69548
2009-04-19 21:15:26 +00:00
Chris Lattner
21656f22db
basic support for -Wunknown-pragmas, more coming.
...
llvm-svn: 69547
2009-04-19 21:10:26 +00:00
Daniel Dunbar
8281bdeb4d
Forward -fno-diagnostics-fixit-info to clang-cc.
...
llvm-svn: 69546
2009-04-19 21:09:34 +00:00
Eli Friedman
4f856744e5
PR3853: Add CodeGen support for __thread.
...
llvm-svn: 69545
2009-04-19 21:05:03 +00:00
Chris Lattner
1c1a00cf51
move token paste poisoning diagnostics to after the instantiation loc
...
for a token is set, this makes the diagnostic "expanded from stack" work
for this diagnostic. Add a testcase for PR3918.
llvm-svn: 69544
2009-04-19 20:29:42 +00:00
Eli Friedman
d5c0eeda72
Add more thorough/correct checking for invalid __thread specifiers.
...
llvm-svn: 69542
2009-04-19 20:27:55 +00:00
Eli Friedman
fe92e701aa
Silence gcc warning.
...
llvm-svn: 69541
2009-04-19 20:21:56 +00:00
Chris Lattner
da4ebb8921
Fix PR3918: Invalid use of __VA_ARGS__ not diagnosed,
...
by rejecting invalid poisoned tokens in the token
pasting path.
llvm-svn: 69536
2009-04-19 20:06:32 +00:00
Sebastian Redl
3b7ef5e374
Another piece of the conditional operator puzzle. We'll want to use FindCompositePointerType in some other places, too.
...
llvm-svn: 69534
2009-04-19 19:26:31 +00:00
Chris Lattner
249c38bb02
Fix PR4006, incorrect handling of __VA_ARGS__ when it was the first token
...
in a function-like macro body. This has the added bonus of moving some
function-like macro specific code out of the object-like macro codepath.
llvm-svn: 69530
2009-04-19 18:26:34 +00:00
Chris Lattner
6df41af7fb
actually just do this on all x86 targets, it won't hurt
...
non-glibc ones.
llvm-svn: 69528
2009-04-19 17:32:33 +00:00
Chris Lattner
4997b8ef98
Define __NO_MATH_INLINES on linux/x86 so that we don't get inline
...
functions in glibc header files that use FP Stack inline asm which the
backend can't deal with (PR879).
This "fixes" PR3970 for linux. Other affected systems should do similar
things. Maybe this should just go to the general i386/x86-64 sections?
llvm-svn: 69527
2009-04-19 17:29:50 +00:00
Chris Lattner
29d34cabc5
implement compiler support for -fno-diagnostics-fixit-info,
...
rdar://6805442
llvm-svn: 69525
2009-04-19 07:44:08 +00:00
Chris Lattner
5f65cc8215
silence a warning, it isn't clear what the right answer is here,
...
will talk to steve.
llvm-svn: 69519
2009-04-19 06:59:18 +00:00
Chris Lattner
96adcd5e74
silence a warning, I need to talk to Devang about this code.
...
llvm-svn: 69517
2009-04-19 06:50:29 +00:00
Chris Lattner
b433b279f3
Fix rdar://6804402 - crash on objc implementations declared with
...
@class but no implementation. This was broken in all 3 runtime
impls.
llvm-svn: 69512
2009-04-19 06:02:28 +00:00
Chris Lattner
4e1f0c6757
rearrange #include order.
...
llvm-svn: 69511
2009-04-19 05:30:08 +00:00
Chris Lattner
45542ea107
run the jump checker on blocks, even though they don't have gotos,
...
they do allow switches.
llvm-svn: 69510
2009-04-19 05:28:12 +00:00
Chris Lattner
9fecd743ca
add a new Sema::CurFunctionNeedsScopeChecking bool that is used to avoid
...
calling into the jump checker when a function or method is known to contain
no VLAs or @try blocks.
llvm-svn: 69509
2009-04-19 05:21:20 +00:00
Chris Lattner
1a1fdbd75d
move jump scope checking and related code out into its own file, SemaDecl.cpp is
...
already too large.
llvm-svn: 69505
2009-04-19 04:46:21 +00:00
Daniel Dunbar
9a7a78b0ae
Fix bug in computation of ivar offsets for (adjacent) bitfields.
...
- The confusing IRgen bitfield interface is partly to blame here;
fixing the functional error for now, cleanups to the interface to
follow.
llvm-svn: 69503
2009-04-19 02:03:42 +00:00
Chris Lattner
cd3bb8f7e4
revert david's patch, which causes a testsuite failure.
...
llvm-svn: 69501
2009-04-19 01:33:30 +00:00
Chris Lattner
cc6892e336
rewrite an O(N^2) algorithm to be O(n).
...
llvm-svn: 69500
2009-04-19 01:32:00 +00:00
Chris Lattner
c67540501f
second half of indirect jump checking: make sure that any
...
address taken labels are in function scope
llvm-svn: 69499
2009-04-19 01:16:06 +00:00
Chris Lattner
0bf2dd2ed4
First half of jump scope checking for indirect goto.
...
llvm-svn: 69498
2009-04-19 01:05:26 +00:00
Chris Lattner
34d9a51892
Add location info for indirect goto.
...
llvm-svn: 69497
2009-04-19 01:04:21 +00:00
Daniel Dunbar
bf90b33665
Reuse ObjcIvarOffsetVariable instead of duplicating code.
...
- No functionality change (but added a FIXME).
llvm-svn: 69496
2009-04-19 00:44:02 +00:00
Daniel Dunbar
a106052090
Remove some unnecessary complexity.
...
- No functionality change.
llvm-svn: 69495
2009-04-19 00:31:15 +00:00
Chris Lattner
c1b96c3590
"This patch fixes message sends to super in class methods for the GNU runtime (currently an instance method lookup is being performed)."
...
Patch by David Chisnall!
llvm-svn: 69493
2009-04-18 23:12:40 +00:00
Chris Lattner
f7fcb516de
reimplement DeclStmt handling so that we correctly handle intermixed
...
VLA's and statement expressions.
llvm-svn: 69491
2009-04-18 23:01:20 +00:00
Chris Lattner
508253d64b
the scope checker does work with objc methods, add testcase.
...
llvm-svn: 69487
2009-04-18 22:37:38 +00:00
Chris Lattner
b6e368235a
I didn't understand how @catches were chained. Now that I get it, fix
...
the scope checker to not think @catches are nested in each other, eliminating
some bogus notes.
llvm-svn: 69486
2009-04-18 22:35:34 +00:00
Chris Lattner
bf78da7b36
Fix PR3917: the location of a #line directive is the location of the first _.
...
llvm-svn: 69485
2009-04-18 22:29:33 +00:00
Chris Lattner
93017cc12a
Change Preprocessor::AdvanceToTokenCharacter to stop at
...
the first real character of a token. For example, advancing
to byte 3 of foo\
bar
should stop at the b, not the \.
llvm-svn: 69484
2009-04-18 22:28:58 +00:00