Граф коммитов

8836 Коммитов

Автор SHA1 Сообщение Дата
Steve Naroff 4262a07621 - Generate error for protocol qualifiers on 'Class'.
- Generate error for protocol qualifiers on non-ObjC types.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65333 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 18:53:24 +00:00
Steve Naroff d461777e23 Revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65244.
Remove support for "Class<P>". Will be making this an error.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65332 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 18:36:16 +00:00
Chris Lattner 01011d4e4d Add copy assignment operator, caught by doug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65331 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 18:17:44 +00:00
Ted Kremenek f9a8e2e1cf Add more boilerplate logic to more accurately reason about autorelease pools.
This doesn't change the current functionality, but better codifies the
autorelease pool stack itself.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65328 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 17:45:03 +00:00
Daniel Dunbar 9834ffbe54 Add low level support for generating invoke instead of calls.
- No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65325 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 17:26:39 +00:00
Ted Kremenek 4634735e0a Fix 80 col. violations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65322 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 16:54:00 +00:00
Ted Kremenek 6ad315a4be Per Chris L.'s suggestion, use getAsFunctionType() instead of getDesguaredType(). Constify some pointers along the way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65321 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 16:51:39 +00:00
Steve Naroff 279d896d49 Remove isSuperExpr(), which ignores any casts on 'super'.
I don't think casting super makes any sense (since it won't effect method lookup).
Will discuss with other offline and decide what to do.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65317 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 15:40:48 +00:00
Eli Friedman 91110ee24e A few small improvements to Evaluate for stuff I noted in FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65305 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 04:23:56 +00:00
Ted Kremenek 89e202d6a4 retain/release checker: For now don't track the retain count of NSWindow objects (opt for false negatives).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65304 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 02:51:29 +00:00
Ted Kremenek f0dff4c00e More retain/release naming convention tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65303 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 02:50:20 +00:00
Ted Kremenek 4e83501331 Remove typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65302 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 02:42:56 +00:00
Ted Kremenek 022a3c4e9e '[NSAutoreleasePool addObject:]' has an 'autorelease' effect, not a DoNothing effect.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65301 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 02:31:16 +00:00
Steve Naroff d526c2f2ef Sema::ActOnInstanceMessage(): Tighen up the lookup rules for handling messages to 'Class'. Also improve "super" handling.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65300 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 02:25:40 +00:00
Ted Kremenek d3d4f57f35 Add test case for PR 2599.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65299 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-23 01:29:25 +00:00
Steve Naroff ac1337d331 Minor cleanup, replace bool with qual_empty().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65293 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 19:41:00 +00:00
Steve Naroff 0de21fd85d Contains the following (related to problems found while investigting <rdar://problem/6497631> Message lookup is sometimes different than gcc's).
- Implement instance/class overloading in ObjCContainerDecl (removing a FIXME). This involved hacking NamedDecl::declarationReplaces(), which took awhile to figure out (didn't realize replace was the default).
- Changed Sema::ActOnInstanceMessage() to remove redundant warnings when dealing with protocols. For now, I've omitted the "protocol" term in the diagnostic. It simplifies the code flow and wan't always 100% accurate (e.g. "Foo<Prot>" looks in the class interface, not just the protocol).
- Changed several test cases to jive with the above changes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 19:35:57 +00:00
Anders Carlsson 66b4151246 Make sure to reset the DidCallStackSave variable before emitting a compound statement. Fixes PR3649.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65291 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 18:44:21 +00:00
Fariborz Jahanian 44baa8abba More objc gc work. Match gcc's treatment of ivar access
true a local pointer to objective-c object in generating
write barriers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65290 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 18:40:18 +00:00
Mike Stump 6eef49819d Copy some clenaups from Eli to code that I copied. :-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65286 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 13:55:31 +00:00
Mike Stump 20733cd4fd Cleanp code with some recent suggestions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65285 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 13:27:11 +00:00
Eli Friedman 2217c87bdc A bit of Evaluate cleanup. Also, a full audit of what's missing that
someone would reasonably expect Evaluate to handle for C/ObjC.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65284 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 11:46:18 +00:00
Ted Kremenek b9166420e0 Update to checker-0.162 (fixed header issue in tar.bz2 package).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65283 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 08:50:06 +00:00
Ted Kremenek 0e24facb96 Reverted back to checker-0.161 because of a header issue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65281 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 08:42:49 +00:00
Ted Kremenek 94b29c1ee9 Updated checker build.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65280 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 08:38:12 +00:00
Daniel Dunbar 245f5534a5 x86_64 ABI: Actually, we can always pass things we want to pass in
memory using Indirect; this was a holdover from when CGCall wasn't as
robust.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65278 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 08:17:51 +00:00
Daniel Dunbar 8e111c77e4 ccc: Remove unknown host warning, it was breaking gcc's configure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65276 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 08:15:14 +00:00
Eli Friedman c91b7d9216 Fix test to be legal on 64-bit systems.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65270 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 07:40:57 +00:00
Ted Kremenek 61d2e4a299 Fix regression in naming convention derivation: a method only follows the copy 'rule' if it doesn't already start with 'init', etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65269 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 07:32:24 +00:00
Eli Friedman ddd2b6e1e7 Eliminate a bunch of code which should be dead.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65267 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 07:29:04 +00:00
Daniel Dunbar 775e43b3bd x86_64 ABI: Make sure to pass vectors that we want to pass in memory
as byval. Otherwise LLVM will have its own opinion about where to put
things.

We now pass all gcc dg.compat tests on x86_64.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65266 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 07:22:25 +00:00
Eli Friedman 578a97249c Throw the switch to exclusively use Evaluate (along with the small
helper isConstantInitializer) to check whether an initializer is 
constant.  This passes tests, but it's possible that it'll cause 
regressions with real-world code.

Future work:
1. The diagnostics obtained this way are lower quality at the moment; 
some work both here and in Evaluate is needed for accurate diagnostics.
2. We probably need some extra code when we're in -pedantic mode so we 
can strictly enforce the rules in C99 6.6p7.
3. Dead code cleanup (this should wait until after 2, because we might 
want to re-use some of the code).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65265 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 06:45:27 +00:00
Daniel Dunbar e28099bf30 x86_64 ABI: Pass 32-bit vectors as Integer to match gcc. We don't care
about these much but <2 x i16> shows up in the gcc test suite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65264 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 04:48:22 +00:00
Daniel Dunbar 0f1730d220 ABITestGen: Use explicit list of vector types instead of just a list
of sizes. Turns out we don't care very much about vector types that
don't map to the hardware.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65263 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 04:17:53 +00:00
Daniel Dunbar 0af9929e1b x86_64 ABI: Classify <1 x i64> as INTEGER (match gcc not llvm-gcc).
Also, make sure to pass <1 x i64> as i64 (not <1 x i64>, which doesn't
quite work yet in the backend).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 04:16:10 +00:00
Eli Friedman 4bdf08770e Enhance Evaluate to handle ObjC qualified id and class types; as far as
I know, these follow the exact same rules as pointers, so I just made 
them use the same codepath.  Someone more familiar with ObjC should 
double-check this, though.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65261 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 04:02:33 +00:00
Eli Friedman c508203a27 Fix for PR3433: map __alignof__ to preferred alignment. (This was
partially done in r65258.)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65260 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 03:31:23 +00:00
Eli Friedman 9c2f06b373 Last part of PR3254: use the same alignment computation in Sema and
CodeGen.  I'm not sure whether this actually makes any visible 
difference, but it's better to be consistent anyway.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65259 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 03:23:43 +00:00
Eli Friedman dcdafb6a70 Improvements to ASTContext::getDeclAlignInBytes; fixes the testcase in
PR3254 and part of PR3433.

The isICE changes are necessary to keep the computed results 
consistent with Evaluate.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65258 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 02:56:25 +00:00
Steve Naroff 8b1527b7b9 Remove debugging statement.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65257 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 02:19:47 +00:00
Anders Carlsson 6032979a5d Match gcc and always perform array/function conversion for asm input exprs. Fixes PR3641.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65256 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 02:11:23 +00:00
Anders Carlsson 559a833304 Correctly encode incomplete and variable length arrays. Fixes PR3639.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65255 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 01:38:57 +00:00
Daniel Dunbar 9ff1c0784c ccc: Remove temporary files used in compilation, and remove
compilation results on failures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65254 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 01:23:52 +00:00
Eli Friedman 85c3515516 Sanity fix for PR3642: if we're treating a diagnostic as an error, it's
required to actually be an error for correctness.  The attached testcase 
now gives an error instead of mysteriously crashing.

Now, it's possible we actually want to support the given usage, but I 
haven't looked at the relevant code closely.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65253 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-22 00:20:44 +00:00
Daniel Dunbar 8d7d6e9a48 Force arch for these test cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65252 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-21 23:45:41 +00:00
Fariborz Jahanian 643887ab8d local array of objects are non-gc'able.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65251 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-21 23:37:19 +00:00
Steve Naroff f7f52e7bf5 More work to integrate newly added ObjCQualifiedClassType into the type system.
This is necessary 'plumbing' to fix <rdar://problem/6497631> Message lookup is sometimes different than gcc's.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65248 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-21 21:17:01 +00:00
Daniel Dunbar adcf5b389a Put compiler headers in <prefix>/lib/clang/1.0/include (vs
<prefix>/Headers, gross).


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65247 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-21 20:52:41 +00:00
Steve Naroff 15509f4fe7 Add support for GCC ObjC extension "Class<protocol>". Sigh.
Found while researching <rdar://problem/6497631> Message lookup is sometimes different than gcc's.

Will never be seen in user code. Needed to pass dejagnu testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65244 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-21 20:17:11 +00:00
Mike Stump d6840002c3 The blocks ABI is wrong, add a FIXME.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65243 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-21 20:07:44 +00:00