]> granicus.if.org Git - clang/log
clang
15 years agoSome initial Obj-C zero cost EH support.
Daniel Dunbar [Tue, 24 Feb 2009 07:47:38 +0000 (07:47 +0000)]
Some initial Obj-C zero cost EH support.
 - Only handles cases with @try with no @catch blocks, and there are a
   number of problems with the implementation. Nevertheless, this is
   good enough to handled @synchronized correctly, and some other
   basic uses.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65378 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a very primitive clang based multifile 'delta'.
Daniel Dunbar [Tue, 24 Feb 2009 07:42:32 +0000 (07:42 +0000)]
Add a very primitive clang based multifile 'delta'.
 - Interface is more or less like multidelta.

 - Keep in mind it won't work very well; delta is O(N^2) frequently in
   practice. multidelta manages to work because it folds lines to keep
   N small, but this is just working on raw tokens. However, I have a
   fancy pants DAG based delta algorithm which will be the bees knees
   once I get it wired to clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65377 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd a note about an IRgen optimization opportunity.
Daniel Dunbar [Tue, 24 Feb 2009 06:34:04 +0000 (06:34 +0000)]
Add a note about an IRgen optimization opportunity.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65376 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR3635 by handling ## magically
Chris Lattner [Tue, 24 Feb 2009 05:29:33 +0000 (05:29 +0000)]
Fix PR3635 by handling ## magically

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65374 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIn C, when we see a function declaration within a local scope, export
Douglas Gregor [Tue, 24 Feb 2009 04:26:15 +0000 (04:26 +0000)]
In C, when we see a function declaration within a local scope, export
that declaration to global scope so that it can be found from other
scopes. This allows us to diagnose redeclaration errors for external
declarations across scopes. We also warn when name lookup finds such
an out-of-scope declaration. This is part of <rdar://problem/6127293>;
we'll also need to do the same thing for variables.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65373 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrevent accidental copying of CodeGenFunction and CodeGenModule.
Anders Carlsson [Tue, 24 Feb 2009 04:21:31 +0000 (04:21 +0000)]
Prevent accidental copying of CodeGenFunction and CodeGenModule.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65372 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPass the CodeGenModule object to GenerateBlockFunction, instead of *this (which will...
Anders Carlsson [Tue, 24 Feb 2009 04:19:41 +0000 (04:19 +0000)]
Pass the CodeGenModule object to GenerateBlockFunction, instead of *this (which will call the copy constructor).

Also, since we're creating a new CodeGenFunction object for each block function, we don't need to clear the BreakContinueStack.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65371 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnsure that we can't break or continue out of a block.
Mike Stump [Tue, 24 Feb 2009 02:59:30 +0000 (02:59 +0000)]
Ensure that we can't break or continue out of a block.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65370 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoscan-build: Prune off any trailing '/' characters in the output directory path.
Ted Kremenek [Tue, 24 Feb 2009 02:38:02 +0000 (02:38 +0000)]
scan-build: Prune off any trailing '/' characters in the output directory path.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65368 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix <rdar://problem/6611677>: Add basic transfer function support in the static
Ted Kremenek [Tue, 24 Feb 2009 02:23:11 +0000 (02:23 +0000)]
Fix <rdar://problem/6611677>: Add basic transfer function support in the static
analyzer for array subscript expressions involving bases that are vectors. This
solution is probably a hack: it gets the lvalue of the vector instead of an
rvalue like all other types. This should be reviewed (big FIXME in
GRExprEngine).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65366 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix two @synchronized bugs found by inspection: the expression to sychronize on shoul...
Daniel Dunbar [Tue, 24 Feb 2009 01:43:46 +0000 (01:43 +0000)]
Fix two @synchronized bugs found by inspection: the expression to sychronize on should only be evaluated once, and it is evaluated outside the cleanup scope.

Also, lift SyncEnter and SyncExit up in nervous anticipation of x86-64
zero cost EH.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65362 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPTH: Cache *un-cleaned* spellings for literals instead of cleaned spellings.
Ted Kremenek [Tue, 24 Feb 2009 01:26:56 +0000 (01:26 +0000)]
PTH: Cache *un-cleaned* spellings for literals instead of cleaned spellings.
This allows the PTH file to stay 100% in fidelity with the source code and
defines away some weird cosmetic bugs for operations such as '-E' where
maintaining knowledge of the original literal representation is useful.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65361 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove merging of function declarations. Specifically:
Douglas Gregor [Tue, 24 Feb 2009 01:23:02 +0000 (01:23 +0000)]
Improve merging of function declarations. Specifically:

  - When we are declaring a function in local scope, we can merge with
    a visible declaration from an outer scope if that declaration
    refers to an entity with linkage. This behavior now works in C++
    and properly ignores entities without linkage.
  - Diagnose the use of "static" on a function declaration in local
    scope.
  - Diagnose the declaration of a static function after a non-static
    declaration of the same function.
  - Propagate the storage specifier to a function declaration from a
    prior declaration (PR3425)
  - Don't name-mangle "main"

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65360 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPTH: When emitting tokens for literals with cached spellings, change the token
Ted Kremenek [Tue, 24 Feb 2009 00:30:21 +0000 (00:30 +0000)]
PTH: When emitting tokens for literals with cached spellings, change the token
size to that of the *cleaned* spelling. This way 'getSpelling()' for literals in
the Preprocessor just works and doesn't read beyond the bounds of the cached
spelling buffer.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65354 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdated checker build.
Ted Kremenek [Mon, 23 Feb 2009 23:37:29 +0000 (23:37 +0000)]
Updated checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65350 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoccc: Don't remove result files on error when -save-temps is present.
Daniel Dunbar [Mon, 23 Feb 2009 23:37:18 +0000 (23:37 +0000)]
ccc: Don't remove result files on error when -save-temps is present.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65349 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMove PTHStatCache within the anonymous namespace.
Ted Kremenek [Mon, 23 Feb 2009 23:27:54 +0000 (23:27 +0000)]
Move PTHStatCache within the anonymous namespace.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65348 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTidy up 'ExecutionContinues' to distinguish between jumping to the end of a 'method...
Ted Kremenek [Mon, 23 Feb 2009 23:13:51 +0000 (23:13 +0000)]
Tidy up 'ExecutionContinues' to distinguish between jumping to the end of a 'method' or 'funciton'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65346 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFind 'clang' in 'bin' subdirectory instead of 'cbin'.
Ted Kremenek [Mon, 23 Feb 2009 23:01:06 +0000 (23:01 +0000)]
Find 'clang' in 'bin' subdirectory instead of 'cbin'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65343 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTidy up the path diagnostic generation logic in BugReporter and remove a case where...
Ted Kremenek [Mon, 23 Feb 2009 22:44:26 +0000 (22:44 +0000)]
Tidy up the path diagnostic generation logic in BugReporter and remove a case where an "Execution continues..." diagnostic could result in an empty message bubble.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65342 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix rdar://6611778, a redefinition of an interface was causing an
Chris Lattner [Mon, 23 Feb 2009 22:00:08 +0000 (22:00 +0000)]
fix rdar://6611778, a redefinition of an interface was causing an
assertion when the ivars and method list was reset into the existing
interface.  To fix this, mark decls as invalid when they are redefined,
and don't insert ivars/methods into invalid decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65340 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGoodbye old-ccc; please use tools/ccc/ccc.
Daniel Dunbar [Mon, 23 Feb 2009 19:17:09 +0000 (19:17 +0000)]
Goodbye old-ccc; please use tools/ccc/ccc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65335 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWe should not generate __weak write barrier on indirect reference
Fariborz Jahanian [Mon, 23 Feb 2009 18:59:50 +0000 (18:59 +0000)]
We should not generate __weak write barrier on indirect reference
of a pointer to object; This patch does this odd behavior according to
gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65334 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago- Generate error for protocol qualifiers on 'Class'.
Steve Naroff [Mon, 23 Feb 2009 18:53:24 +0000 (18:53 +0000)]
- 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

15 years agoRevert http://llvm.org/viewvc/llvm-project?view=rev&revision=65244.
Steve Naroff [Mon, 23 Feb 2009 18:36:16 +0000 (18:36 +0000)]
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

15 years agoAdd copy assignment operator, caught by doug.
Chris Lattner [Mon, 23 Feb 2009 18:17:44 +0000 (18:17 +0000)]
Add copy assignment operator, caught by doug.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65331 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd more boilerplate logic to more accurately reason about autorelease pools.
Ted Kremenek [Mon, 23 Feb 2009 17:45:03 +0000 (17:45 +0000)]
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

15 years agoAdd low level support for generating invoke instead of calls.
Daniel Dunbar [Mon, 23 Feb 2009 17:26:39 +0000 (17:26 +0000)]
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

15 years agoFix 80 col. violations.
Ted Kremenek [Mon, 23 Feb 2009 16:54:00 +0000 (16:54 +0000)]
Fix 80 col. violations.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65322 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPer Chris L.'s suggestion, use getAsFunctionType() instead of getDesguaredType()...
Ted Kremenek [Mon, 23 Feb 2009 16:51:39 +0000 (16:51 +0000)]
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

15 years agoRemove isSuperExpr(), which ignores any casts on 'super'.
Steve Naroff [Mon, 23 Feb 2009 15:40:48 +0000 (15:40 +0000)]
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

15 years agoA few small improvements to Evaluate for stuff I noted in FIXMEs.
Eli Friedman [Mon, 23 Feb 2009 04:23:56 +0000 (04:23 +0000)]
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

15 years agoretain/release checker: For now don't track the retain count of NSWindow objects...
Ted Kremenek [Mon, 23 Feb 2009 02:51:29 +0000 (02:51 +0000)]
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

15 years agoMore retain/release naming convention tests.
Ted Kremenek [Mon, 23 Feb 2009 02:50:20 +0000 (02:50 +0000)]
More retain/release naming convention tests.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65303 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove typo.
Ted Kremenek [Mon, 23 Feb 2009 02:42:56 +0000 (02:42 +0000)]
Remove typo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65302 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago'[NSAutoreleasePool addObject:]' has an 'autorelease' effect, not a DoNothing effect.
Ted Kremenek [Mon, 23 Feb 2009 02:31:16 +0000 (02:31 +0000)]
'[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

15 years agoSema::ActOnInstanceMessage(): Tighen up the lookup rules for handling messages to...
Steve Naroff [Mon, 23 Feb 2009 02:25:40 +0000 (02:25 +0000)]
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

15 years agoAdd test case for PR 2599.
Ted Kremenek [Mon, 23 Feb 2009 01:29:25 +0000 (01:29 +0000)]
Add test case for PR 2599.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65299 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor cleanup, replace bool with qual_empty().
Steve Naroff [Sun, 22 Feb 2009 19:41:00 +0000 (19:41 +0000)]
Minor cleanup, replace bool with qual_empty().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65293 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoContains the following (related to problems found while investigting <rdar://problem...
Steve Naroff [Sun, 22 Feb 2009 19:35:57 +0000 (19:35 +0000)]
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

15 years agoMake sure to reset the DidCallStackSave variable before emitting a compound statement...
Anders Carlsson [Sun, 22 Feb 2009 18:44:21 +0000 (18:44 +0000)]
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

15 years agoMore objc gc work. Match gcc's treatment of ivar access
Fariborz Jahanian [Sun, 22 Feb 2009 18:40:18 +0000 (18:40 +0000)]
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

15 years agoCopy some clenaups from Eli to code that I copied. :-)
Mike Stump [Sun, 22 Feb 2009 13:55:31 +0000 (13:55 +0000)]
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

15 years agoCleanp code with some recent suggestions.
Mike Stump [Sun, 22 Feb 2009 13:27:11 +0000 (13:27 +0000)]
Cleanp code with some recent suggestions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65285 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoA bit of Evaluate cleanup. Also, a full audit of what's missing that
Eli Friedman [Sun, 22 Feb 2009 11:46:18 +0000 (11:46 +0000)]
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

15 years agoUpdate to checker-0.162 (fixed header issue in tar.bz2 package).
Ted Kremenek [Sun, 22 Feb 2009 08:50:06 +0000 (08:50 +0000)]
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

15 years agoReverted back to checker-0.161 because of a header issue.
Ted Kremenek [Sun, 22 Feb 2009 08:42:49 +0000 (08:42 +0000)]
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

15 years agoUpdated checker build.
Ted Kremenek [Sun, 22 Feb 2009 08:38:12 +0000 (08:38 +0000)]
Updated checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65280 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agox86_64 ABI: Actually, we can always pass things we want to pass in
Daniel Dunbar [Sun, 22 Feb 2009 08:17:51 +0000 (08:17 +0000)]
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

15 years agoccc: Remove unknown host warning, it was breaking gcc's configure.
Daniel Dunbar [Sun, 22 Feb 2009 08:15:14 +0000 (08:15 +0000)]
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

15 years agoFix test to be legal on 64-bit systems.
Eli Friedman [Sun, 22 Feb 2009 07:40:57 +0000 (07:40 +0000)]
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

15 years agoFix regression in naming convention derivation: a method only follows the copy 'rule...
Ted Kremenek [Sun, 22 Feb 2009 07:32:24 +0000 (07:32 +0000)]
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

15 years agoEliminate a bunch of code which should be dead.
Eli Friedman [Sun, 22 Feb 2009 07:29:04 +0000 (07:29 +0000)]
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

15 years agox86_64 ABI: Make sure to pass vectors that we want to pass in memory
Daniel Dunbar [Sun, 22 Feb 2009 07:22:25 +0000 (07:22 +0000)]
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

15 years agoThrow the switch to exclusively use Evaluate (along with the small
Eli Friedman [Sun, 22 Feb 2009 06:45:27 +0000 (06:45 +0000)]
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

15 years agox86_64 ABI: Pass 32-bit vectors as Integer to match gcc. We don't care
Daniel Dunbar [Sun, 22 Feb 2009 04:48:22 +0000 (04:48 +0000)]
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

15 years agoABITestGen: Use explicit list of vector types instead of just a list
Daniel Dunbar [Sun, 22 Feb 2009 04:17:53 +0000 (04:17 +0000)]
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

15 years agox86_64 ABI: Classify <1 x i64> as INTEGER (match gcc not llvm-gcc).
Daniel Dunbar [Sun, 22 Feb 2009 04:16:10 +0000 (04:16 +0000)]
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

15 years agoEnhance Evaluate to handle ObjC qualified id and class types; as far as
Eli Friedman [Sun, 22 Feb 2009 04:02:33 +0000 (04:02 +0000)]
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

15 years agoFix for PR3433: map __alignof__ to preferred alignment. (This was
Eli Friedman [Sun, 22 Feb 2009 03:31:23 +0000 (03:31 +0000)]
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

15 years agoLast part of PR3254: use the same alignment computation in Sema and
Eli Friedman [Sun, 22 Feb 2009 03:23:43 +0000 (03:23 +0000)]
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

15 years agoImprovements to ASTContext::getDeclAlignInBytes; fixes the testcase in
Eli Friedman [Sun, 22 Feb 2009 02:56:25 +0000 (02:56 +0000)]
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

15 years agoRemove debugging statement.
Steve Naroff [Sun, 22 Feb 2009 02:19:47 +0000 (02:19 +0000)]
Remove debugging statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65257 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMatch gcc and always perform array/function conversion for asm input exprs. Fixes...
Anders Carlsson [Sun, 22 Feb 2009 02:11:23 +0000 (02:11 +0000)]
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

15 years agoCorrectly encode incomplete and variable length arrays. Fixes PR3639.
Anders Carlsson [Sun, 22 Feb 2009 01:38:57 +0000 (01:38 +0000)]
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

15 years agoccc: Remove temporary files used in compilation, and remove
Daniel Dunbar [Sun, 22 Feb 2009 01:23:52 +0000 (01:23 +0000)]
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

15 years agoSanity fix for PR3642: if we're treating a diagnostic as an error, it's
Eli Friedman [Sun, 22 Feb 2009 00:20:44 +0000 (00:20 +0000)]
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

15 years agoForce arch for these test cases.
Daniel Dunbar [Sat, 21 Feb 2009 23:45:41 +0000 (23:45 +0000)]
Force arch for these test cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65252 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agolocal array of objects are non-gc'able.
Fariborz Jahanian [Sat, 21 Feb 2009 23:37:19 +0000 (23:37 +0000)]
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

15 years agoMore work to integrate newly added ObjCQualifiedClassType into the type system.
Steve Naroff [Sat, 21 Feb 2009 21:17:01 +0000 (21:17 +0000)]
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

15 years agoPut compiler headers in <prefix>/lib/clang/1.0/include (vs
Daniel Dunbar [Sat, 21 Feb 2009 20:52:41 +0000 (20:52 +0000)]
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

15 years agoAdd support for GCC ObjC extension "Class<protocol>". Sigh.
Steve Naroff [Sat, 21 Feb 2009 20:17:11 +0000 (20:17 +0000)]
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

15 years agoThe blocks ABI is wrong, add a FIXME.
Mike Stump [Sat, 21 Feb 2009 20:07:44 +0000 (20:07 +0000)]
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

15 years agoAdd CodeGen support for the helper for BlockDeclRefExprs. The easier
Mike Stump [Sat, 21 Feb 2009 20:00:35 +0000 (20:00 +0000)]
Add CodeGen support for the helper for BlockDeclRefExprs.  The easier
stuff is mostly done.  Move BlockHasCopyDispose up.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65242 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWarn about bogus protocol qualifiers.
Steve Naroff [Sat, 21 Feb 2009 19:50:43 +0000 (19:50 +0000)]
Warn about bogus protocol qualifiers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65241 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWarn on use of __weak attribute on local
Fariborz Jahanian [Sat, 21 Feb 2009 19:44:02 +0000 (19:44 +0000)]
Warn on use of __weak attribute on local
variable (objc2 gc specific).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65240 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a bug whereby a pointer to a __weak was not recognized
Fariborz Jahanian [Sat, 21 Feb 2009 19:08:45 +0000 (19:08 +0000)]
Fix a bug whereby a pointer to a __weak was not recognized
as __weak (objc2 gc specific).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65238 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse llvm::StringsEqualNoCase instead of strncasecmp.
Ted Kremenek [Sat, 21 Feb 2009 18:26:02 +0000 (18:26 +0000)]
Use llvm::StringsEqualNoCase instead of strncasecmp.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65237 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixed an ICE in meta-data generation of __weak/__strong ivars.
Fariborz Jahanian [Sat, 21 Feb 2009 18:23:24 +0000 (18:23 +0000)]
Fixed an ICE in meta-data generation of __weak/__strong ivars.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65235 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEvaluation of unary deref could call integer evaluator on non-integral
Daniel Dunbar [Sat, 21 Feb 2009 18:14:20 +0000 (18:14 +0000)]
Evaluation of unary deref could call integer evaluator on non-integral
expr; hilarity ensued.
 - PR3640.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65234 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix build on windows.
Cedric Venet [Sat, 21 Feb 2009 17:14:49 +0000 (17:14 +0000)]
Fix build on windows.

Should clang have a config.h or should we use the config.h of llvm or using the preprocessor is OK?  I did a quick fix here, but having a guideline on how to handle non portable function would be great (or ask ted to stop breaking the windows build :)).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65233 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd test case to record a couple inconsistencies with GCC (found in <rdar://problem...
Steve Naroff [Sat, 21 Feb 2009 17:03:43 +0000 (17:03 +0000)]
Add test case to record a couple inconsistencies with GCC (found in <rdar://problem/6561076> [clang on Xcode] warning: cannot find protocol definition for 'OzzyP').

Removing the "cannot find protocol" warning is trivial if necessary (but I don't think it's the right thing to do).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65232 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoThis fixes <rdar://problem/6497650> More type mismatches issues with clang.
Steve Naroff [Sat, 21 Feb 2009 16:18:07 +0000 (16:18 +0000)]
This fixes <rdar://problem/6497650> More type mismatches issues with clang.

Move two key ObjC typechecks from Sema::CheckPointerTypesForAssignment() to ASTContext::mergeTypes().

This allows us to take advantage of the recursion in ASTContext::mergeTypes(), removing some bogus warnings.

This test case I've added includes an example where we still warn (and GCC doesn't). Need to talk with folks and decide what to do. At this point, the major bogosities should be fixed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65231 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate checker build.
Ted Kremenek [Sat, 21 Feb 2009 06:58:08 +0000 (06:58 +0000)]
Update checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65227 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImproved naming convention heuristics in the retain/release checker to better
Ted Kremenek [Sat, 21 Feb 2009 05:13:43 +0000 (05:13 +0000)]
Improved naming convention heuristics in the retain/release checker to better
handle method names that contain 'new', 'copy', etc., but those words might be
the substring of larger words such as 'newsgroup' and 'photocopy' that do not
indicate the allocation of objects. This should address the issues discussed in
<rdar://problem/6552389>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65224 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate scan-build help diagnostic.
Ted Kremenek [Sat, 21 Feb 2009 04:46:41 +0000 (04:46 +0000)]
Update scan-build help diagnostic.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65223 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOnly create a preprocessed file for an ignored attribute if there currently does...
Ted Kremenek [Sat, 21 Feb 2009 04:46:20 +0000 (04:46 +0000)]
Only create a preprocessed file for an ignored attribute if there currently does not exist an 'attribute_ignored_XXX.txt' file for that attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65222 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSlight tweak to last commit: make sure to copy CVR qualifiers for fixed
Eli Friedman [Sat, 21 Feb 2009 00:58:02 +0000 (00:58 +0000)]
Slight tweak to last commit: make sure to copy CVR qualifiers for fixed
pointer types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65210 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRe-fix r65140 correctly.
Eli Friedman [Sat, 21 Feb 2009 00:44:51 +0000 (00:44 +0000)]
Re-fix r65140 correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65208 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHandle case of none gc'able objects regardless of their
Fariborz Jahanian [Sat, 21 Feb 2009 00:30:43 +0000 (00:30 +0000)]
Handle case of none gc'able objects regardless of their
type.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65205 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEmit extern_weak when needed.
Daniel Dunbar [Sat, 21 Feb 2009 00:24:10 +0000 (00:24 +0000)]
Emit extern_weak when needed.
 - PR3629.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65203 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWe must always mangle attribute overloadable functions; even if in a
Daniel Dunbar [Fri, 20 Feb 2009 23:09:27 +0000 (23:09 +0000)]
We must always mangle attribute overloadable functions; even if in a
system header.
 - Prevents a codegen crash when anything used anything in tgmath! :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65200 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix <rdar://problem/6500554> missing objc error message.
Steve Naroff [Fri, 20 Feb 2009 22:59:16 +0000 (22:59 +0000)]
Fix <rdar://problem/6500554> missing objc error message.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65198 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoswitch the macroinfo argument lists from being allocated off the heap
Chris Lattner [Fri, 20 Feb 2009 22:46:43 +0000 (22:46 +0000)]
switch the macroinfo argument lists from being allocated off the heap
to being allocated from the same bumpptr that the MacroInfo objects
themselves are.

This speeds up -Eonly cocoa.h pth by ~4%, fsyntax-only is barely measurable.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65195 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodetemplatify setArgumentList and some other cleanups.
Chris Lattner [Fri, 20 Feb 2009 22:31:31 +0000 (22:31 +0000)]
detemplatify setArgumentList and some other cleanups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65187 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorequire the MAcroInfo objects are explcitly destroyed.
Chris Lattner [Fri, 20 Feb 2009 22:19:20 +0000 (22:19 +0000)]
require the MAcroInfo objects are explcitly destroyed.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65179 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMake 'RangeConstraintManager' the default ConstraintManager.
Ted Kremenek [Fri, 20 Feb 2009 21:49:22 +0000 (21:49 +0000)]
Make 'RangeConstraintManager' the default ConstraintManager.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65173 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoallocate and dellocate objc decl list through AST Context instead of
Chris Lattner [Fri, 20 Feb 2009 21:44:01 +0000 (21:44 +0000)]
allocate and dellocate objc decl list through AST Context instead of
with new/delete.  With disable-free, this reduces the number of 4/8 byte
mallocs from 4793/1541 to 865/456 and also drops other sizes as well.

This is a very small perf win, nothing major.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65171 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix indentation
Chris Lattner [Fri, 20 Feb 2009 21:38:52 +0000 (21:38 +0000)]
fix indentation

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65170 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosilence some warnings in no asserts mode.
Chris Lattner [Fri, 20 Feb 2009 21:37:53 +0000 (21:37 +0000)]
silence some warnings in no asserts mode.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65169 91177308-0d34-0410-b5e6-96231b3b80d8