]>
granicus.if.org Git - clang/log
Daniel Dunbar [Mon, 20 Apr 2009 06:54:31 +0000 (06:54 +0000)]
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...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69579
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 20 Apr 2009 06:37:24 +0000 (06:37 +0000)]
Make FieldDecl parameter to getObjCEncodingForType... const.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69578
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 20 Apr 2009 06:35:22 +0000 (06:35 +0000)]
Remove loc::FuncVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69577
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 20 Apr 2009 06:26:18 +0000 (06:26 +0000)]
more stuff.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69576
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 20 Apr 2009 06:13:16 +0000 (06:13 +0000)]
Don't crash in the diagnostic printer if we happen to get passed a
null string / identifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69575
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 20 Apr 2009 06:00:23 +0000 (06:00 +0000)]
add a bunch of diagnostics options, add one example warning group.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69573
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 20 Apr 2009 05:53:40 +0000 (05:53 +0000)]
Don't emit ivar offsets for unnamed bit fields.
Also, added assertion that the field matches what would be looked up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69572
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 20 Apr 2009 05:45:34 +0000 (05:45 +0000)]
Add option groups for -Wimplicit-int and -Wimplicit.
remove special case hack for -Werror-implicit-function-declaration
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69571
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 20 Apr 2009 05:24:46 +0000 (05:24 +0000)]
get a CodeTextRegion when visiting FunctionDecl reference.
get FunctionDecl with more general utility method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 20 Apr 2009 04:37:38 +0000 (04:37 +0000)]
slurp some content from the PTH doc into the user's doc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69569
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 20 Apr 2009 04:23:09 +0000 (04:23 +0000)]
initial skeleton of a user's manual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69568
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 20 Apr 2009 03:54:15 +0000 (03:54 +0000)]
PR3247: Handle a couple of cases where we weren't emitting VLA sizes (and
subsequently crashed).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69567
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 20 Apr 2009 03:21:44 +0000 (03:21 +0000)]
PR3248: Make sure the evaluate the operand of a sizeof when it has a VLA type.
Adapted from patch by Tim Northover.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 20 Apr 2009 02:27:09 +0000 (02:27 +0000)]
As we now have ValueManager as the new value factory, we do not need factory
methods of SVal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69565
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 20 Apr 2009 01:56:54 +0000 (01:56 +0000)]
Hook up -Wunused-value to the unused expression warning. This is
useful for macro-heavy codebases that tend to trigger this warning a
lot.
Note that a make clean is required to get the option working; the
dependencies for DiagnosticGroups.inc appear to be broken.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69564
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 20 Apr 2009 00:37:55 +0000 (00:37 +0000)]
Remove non-const form of lookupFieldDeclForIvar.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69563
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 20 Apr 2009 00:33:43 +0000 (00:33 +0000)]
Comment fixes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69562
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Apr 2009 23:41:48 +0000 (23:41 +0000)]
Lift GetClassSizeInfo out of GenerateClass, add a FIXME.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69561
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 23:16:58 +0000 (23:16 +0000)]
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 :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69560
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 22:34:23 +0000 (22:34 +0000)]
move group twiddling options into Diagnostic.cpp instead of
Warnings.cpp. Warnings.cpp now doesn't need to #include
tblgen produced output directly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69559
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 22:24:10 +0000 (22:24 +0000)]
don't crash on invalid ranges in -fprint-source-range-info
mode, just ignore them as usual.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69558
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 22:07:21 +0000 (22:07 +0000)]
Fix PR4007: clang doesn't know -Werror-foo is the same as -Werror=foo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69557
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 21:55:32 +0000 (21:55 +0000)]
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 :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69556
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 19 Apr 2009 21:53:20 +0000 (21:53 +0000)]
Conditional operator C++ checking complete. What issues remain are in more general code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69555
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 21:50:08 +0000 (21:50 +0000)]
diagnose invalid syntax of STDC pragmas.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69554
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 19 Apr 2009 21:48:33 +0000 (21:48 +0000)]
Print an error for uses of __thread on targets which don't support it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69553
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 19 Apr 2009 21:38:35 +0000 (21:38 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69552
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 21:25:37 +0000 (21:25 +0000)]
reject invalid stuff in the STDC namespace.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69551
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 21:20:35 +0000 (21:20 +0000)]
stub out STDC #pragmas.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69550
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Apr 2009 21:20:32 +0000 (21:20 +0000)]
Forward f[no-]dollars-in-identifiers to clang, when specified.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69549
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 19 Apr 2009 21:15:26 +0000 (21:15 +0000)]
Bring member pointer operands of the conditional operator to a common type. We're getting there ...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69548
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 21:10:26 +0000 (21:10 +0000)]
basic support for -Wunknown-pragmas, more coming.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69547
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Apr 2009 21:09:34 +0000 (21:09 +0000)]
Forward -fno-diagnostics-fixit-info to clang-cc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69546
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 19 Apr 2009 21:05:03 +0000 (21:05 +0000)]
PR3853: Add CodeGen support for __thread.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69545
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 20:29:42 +0000 (20:29 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69544
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 19 Apr 2009 20:29:08 +0000 (20:29 +0000)]
Tests for __thread specifier.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69543
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 19 Apr 2009 20:27:55 +0000 (20:27 +0000)]
Add more thorough/correct checking for invalid __thread specifiers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69542
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sun, 19 Apr 2009 20:21:56 +0000 (20:21 +0000)]
Silence gcc warning.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69541
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 20:18:57 +0000 (20:18 +0000)]
pick a smaller header, one that we control to test this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69540
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 20:16:27 +0000 (20:16 +0000)]
rename test for consistency with other pragma test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69539
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 20:15:59 +0000 (20:15 +0000)]
merge pragma poison tests into one file with -verify mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69538
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 20:10:12 +0000 (20:10 +0000)]
merge two tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69537
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 20:06:32 +0000 (20:06 +0000)]
Fix PR3918: Invalid use of __VA_ARGS__ not diagnosed,
by rejecting invalid poisoned tokens in the token
pasting path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69536
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sebastian Redl [Sun, 19 Apr 2009 19:26:31 +0000 (19:26 +0000)]
Another piece of the conditional operator puzzle. We'll want to use FindCompositePointerType in some other places, too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 18:54:13 +0000 (18:54 +0000)]
convert to -verify mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 18:26:34 +0000 (18:26 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69530
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 17:32:33 +0000 (17:32 +0000)]
actually just do this on all x86 targets, it won't hurt
non-glibc ones.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69528
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 17:29:50 +0000 (17:29 +0000)]
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?
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69527
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 07:44:08 +0000 (07:44 +0000)]
implement compiler support for -fno-diagnostics-fixit-info,
rdar://
6805442
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69525
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 07:32:03 +0000 (07:32 +0000)]
invalid directives can occur in #if 0 code, just pass them
through like other directives PTH doesn't care about. This
should fix rdar://
6804029
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69524
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 07:25:40 +0000 (07:25 +0000)]
make PTH not crash on a null directive (# on its own line)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69523
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 07:15:51 +0000 (07:15 +0000)]
use isNot instead of !is
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69522
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 07:06:52 +0000 (07:06 +0000)]
fix -fdollars-in-identifiers to have a default that is overriden
by the command line option if present.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69521
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 07:00:02 +0000 (07:00 +0000)]
fix rdar://
6804322 by wiring up -fdollars-in-identifiers
with assembler-with-cpp mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69520
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 06:59:18 +0000 (06:59 +0000)]
silence a warning, it isn't clear what the right answer is here,
will talk to steve.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69519
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 06:56:11 +0000 (06:56 +0000)]
convert to -verify mode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69518
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 06:50:29 +0000 (06:50 +0000)]
silence a warning, I need to talk to Devang about this code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69517
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 06:02:28 +0000 (06:02 +0000)]
Fix rdar://
6804402 - crash on objc implementations declared with
@class but no implementation. This was broken in all 3 runtime
impls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69512
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 05:30:08 +0000 (05:30 +0000)]
rearrange #include order.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69511
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 05:28:12 +0000 (05:28 +0000)]
run the jump checker on blocks, even though they don't have gotos,
they do allow switches.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69510
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 05:21:20 +0000 (05:21 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69509
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 05:20:37 +0000 (05:20 +0000)]
test that vlas are checked in an objc method context.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69508
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 04:51:27 +0000 (04:51 +0000)]
apparently gotos aren't allowed at all in blocks. Stub out a testcase for when/if they are.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69507
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 04:48:07 +0000 (04:48 +0000)]
more testcases of variably modified types.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69506
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 04:46:21 +0000 (04:46 +0000)]
move jump scope checking and related code out into its own file, SemaDecl.cpp is
already too large.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69505
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Apr 2009 02:33:12 +0000 (02:33 +0000)]
Some more tweaks to driver documentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69504
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Apr 2009 02:03:42 +0000 (02:03 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69503
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 02:02:45 +0000 (02:02 +0000)]
minor typographical fixes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69502
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 01:33:30 +0000 (01:33 +0000)]
revert david's patch, which causes a testsuite failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69501
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 01:32:00 +0000 (01:32 +0000)]
rewrite an O(N^2) algorithm to be O(n).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69500
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 01:16:06 +0000 (01:16 +0000)]
second half of indirect jump checking: make sure that any
address taken labels are in function scope
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69499
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 01:05:26 +0000 (01:05 +0000)]
First half of jump scope checking for indirect goto.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69498
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 19 Apr 2009 01:04:21 +0000 (01:04 +0000)]
Add location info for indirect goto.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Apr 2009 00:44:02 +0000 (00:44 +0000)]
Reuse ObjcIvarOffsetVariable instead of duplicating code.
- No functionality change (but added a FIXME).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69496
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sun, 19 Apr 2009 00:31:15 +0000 (00:31 +0000)]
Remove some unnecessary complexity.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69495
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 23:12:40 +0000 (23:12 +0000)]
"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!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69493
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 23:07:55 +0000 (23:07 +0000)]
add some testcases that we do not correctly handle.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69492
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 23:01:20 +0000 (23:01 +0000)]
reimplement DeclStmt handling so that we correctly handle intermixed
VLA's and statement expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69491
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 22:56:52 +0000 (22:56 +0000)]
rearrange.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69490
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 22:42:18 +0000 (22:42 +0000)]
add testcases for some more scary/horrible things that work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69488
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 22:37:38 +0000 (22:37 +0000)]
the scope checker does work with objc methods, add testcase.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69487
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 22:35:34 +0000 (22:35 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69486
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 22:29:33 +0000 (22:29 +0000)]
Fix PR3917: the location of a #line directive is the location of the first _.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69485
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 22:28:58 +0000 (22:28 +0000)]
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 \.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69484
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 22:27:02 +0000 (22:27 +0000)]
add a new Lexer::SkipEscapedNewLines method.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69483
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 22:05:41 +0000 (22:05 +0000)]
factor escape newline measuring out into its own helper function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69482
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 21:57:20 +0000 (21:57 +0000)]
remove unneeded scopes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69481
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 21:55:17 +0000 (21:55 +0000)]
forgot to commit this before.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69480
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 21:55:02 +0000 (21:55 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69479
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 21:28:52 +0000 (21:28 +0000)]
reject invalid jumps among pieces of @try blocks. This seems to work
reasonably well except for the problem that @catches are nested within
each other in the AST, giving the ugly diagnostics in L8.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69477
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 21:00:42 +0000 (21:00 +0000)]
unconditionally check for goto correctness. This is because switch
statements don't end up in the LabelMap so we don't have a quick way
to filter them. We could add state to Sema (a "has vla" and "has
jump" bit) to try to filter this out, but that would be sort of gross
and I'm not convinced it is the best way. Thoughts welcome.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69476
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 18 Apr 2009 20:29:27 +0000 (20:29 +0000)]
Use EmitCallArgs in EmitObjCMessageExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69471
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 18 Apr 2009 20:23:29 +0000 (20:23 +0000)]
Test case would allow clang to fail.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69470
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 18 Apr 2009 20:20:22 +0000 (20:20 +0000)]
Make CodeGenFunction::EmitCallArgs a template function that takes a generic "Type Info" parameter. The type info parameter knows how to iterate over its arguments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69469
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 18 Apr 2009 20:18:04 +0000 (20:18 +0000)]
Add functions for iterating over the argument types of an ObjCMethodDecl.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69468
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 20:12:56 +0000 (20:12 +0000)]
merge two tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69466
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 20:10:59 +0000 (20:10 +0000)]
abstract the SwitchStack for blocks just like we do the goto labels.
This fixes a crash on invalid (test10). rdar://
6805469
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69465
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 20:05:34 +0000 (20:05 +0000)]
fix two error paths out of ParseBlockLiteralExpression to
call ActOnBlockError so that CurBlock gets popped. This
fixes a crash on test/block-syntax-error.c when this new
assertion is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69464
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 20:01:55 +0000 (20:01 +0000)]
refactor some code, adding a new getLabelMap() accessor method
so that clients can't poke the function-local one when they really
want the current block label. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69463
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 18 Apr 2009 19:50:02 +0000 (19:50 +0000)]
Improve switch diagnostic to emit the "jump" message on the
specific bad case instead of on the switch. Putting it on the
switch means you don't know what case is the problem. For
example:
scope-check.c:54:3: error: illegal switch case into protected scope
case 2:
^
scope-check.c:53:9: note: jump bypasses initialization of variable length array
int a[x];
^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69462
91177308 -0d34-0410-b5e6-
96231b3b80d8