]> granicus.if.org Git - clang/log
clang
15 years agoHeaders are basically done, debug info is just about done (and
Chris Lattner [Wed, 25 Feb 2009 05:39:01 +0000 (05:39 +0000)]
Headers are basically done, debug info is just about done (and
will improve a lot this week hopefully), and a libgcc replacement
is ready once I wrangle lawyers.

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

15 years agoclang seems "generally useful" for c and objc by now, though obviously bugs
Chris Lattner [Wed, 25 Feb 2009 05:35:47 +0000 (05:35 +0000)]
clang seems "generally useful" for c and objc by now, though obviously bugs
still remain.

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

15 years agoMinor cleanup for IntToBlockPointer so it applies to all callers of
Eli Friedman [Wed, 25 Feb 2009 04:20:42 +0000 (04:20 +0000)]
Minor cleanup for IntToBlockPointer so it applies to all callers of
Sema::CheckAssignmentConstraints; not really visible, but the right
thing to do.

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

15 years agoretain/release checker: Implement basic tracking of autorelease stack. Next thing...
Ted Kremenek [Wed, 25 Feb 2009 02:54:57 +0000 (02:54 +0000)]
retain/release checker: Implement basic tracking of autorelease stack.  Next thing is to wire up pools with their contents.

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

15 years agoImplement 'Add' method for GRStatePartialTrait<ImmutableList<T>>.
Ted Kremenek [Wed, 25 Feb 2009 02:54:00 +0000 (02:54 +0000)]
Implement 'Add' method for GRStatePartialTrait<ImmutableList<T>>.

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

15 years agoFix comments.
Devang Patel [Wed, 25 Feb 2009 01:36:11 +0000 (01:36 +0000)]
Fix comments.

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

15 years agoEnable debug info emission for objc methods.
Devang Patel [Wed, 25 Feb 2009 01:09:46 +0000 (01:09 +0000)]
Enable debug info emission for objc methods.

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

15 years agoUpdate checker build.
Ted Kremenek [Wed, 25 Feb 2009 00:54:41 +0000 (00:54 +0000)]
Update checker build.

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

15 years agoRemove a FIXME; I was mistaken in believing gcc rejected this.
Daniel Dunbar [Wed, 25 Feb 2009 00:22:25 +0000 (00:22 +0000)]
Remove a FIXME; I was mistaken in believing gcc rejected this.

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

15 years agoFix condition in ccc-analyzer that would cause the analyzer never to be run.
Ted Kremenek [Wed, 25 Feb 2009 00:10:37 +0000 (00:10 +0000)]
Fix condition in ccc-analyzer that would cause the analyzer never to be run.

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

15 years agoMinor refactoring.
Fariborz Jahanian [Tue, 24 Feb 2009 23:38:42 +0000 (23:38 +0000)]
Minor refactoring.

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

15 years agopatch for two things.
Fariborz Jahanian [Tue, 24 Feb 2009 23:34:44 +0000 (23:34 +0000)]
patch for two things.
make sure objc2's nonfragile abi is enacted for Leopard too.
add -fobjc-gc-only flag to the image_info symbol.

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

15 years agoFix broken logic from my last commit. Branches only occur at basic blocks that end...
Ted Kremenek [Tue, 24 Feb 2009 23:34:17 +0000 (23:34 +0000)]
Fix broken logic from my last commit.  Branches only occur at basic blocks that end with terminators.

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

15 years agoFix diagnostic regression where the leak diagnostic could appear earlier in the path...
Ted Kremenek [Tue, 24 Feb 2009 23:30:57 +0000 (23:30 +0000)]
Fix diagnostic regression where the leak diagnostic could appear earlier in the path than the branches taken.

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

15 years agoIf Loc is invalid (e.g. "self" in Objective-C) then use MainFileID's compile unit.
Devang Patel [Tue, 24 Feb 2009 23:16:03 +0000 (23:16 +0000)]
If Loc is invalid (e.g. "self" in Objective-C) then use MainFileID's compile unit.

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

15 years agohandle @encode interactions with array initializers.
Chris Lattner [Tue, 24 Feb 2009 23:10:27 +0000 (23:10 +0000)]
handle @encode interactions with array initializers.

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

15 years agorename CheckStringLiteralInit to CheckStringInit and pass in the
Chris Lattner [Tue, 24 Feb 2009 23:01:39 +0000 (23:01 +0000)]
rename CheckStringLiteralInit to CheckStringInit and pass in the
string size as an argument.

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

15 years agomake SemaRef be a reference to sema, not a pointer.
Chris Lattner [Tue, 24 Feb 2009 22:50:46 +0000 (22:50 +0000)]
make SemaRef be a reference to sema, not a pointer.

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

15 years agomove InitListChecker to be private to SemaInit.cpp
Chris Lattner [Tue, 24 Feb 2009 22:48:58 +0000 (22:48 +0000)]
move InitListChecker to be private to SemaInit.cpp

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

15 years agoMake CheckSingleInitializer a static function in SemaInit.cpp
Chris Lattner [Tue, 24 Feb 2009 22:46:58 +0000 (22:46 +0000)]
Make CheckSingleInitializer a static function in SemaInit.cpp

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

15 years agomake CheckStringLiteralInit a static function in SemaInit.cpp
Chris Lattner [Tue, 24 Feb 2009 22:41:04 +0000 (22:41 +0000)]
make CheckStringLiteralInit a static function in SemaInit.cpp

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

15 years agochange IsStringLiteralInit into a static function in SemaInit.cpp
Chris Lattner [Tue, 24 Feb 2009 22:36:59 +0000 (22:36 +0000)]
change IsStringLiteralInit into a static function in SemaInit.cpp

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

15 years agomove some initialization checking code from SemaDecl.cpp
Chris Lattner [Tue, 24 Feb 2009 22:27:37 +0000 (22:27 +0000)]
move some initialization checking code from SemaDecl.cpp
to SemaInit.cpp, no functionality change.

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

15 years agofirst wave of fixes for @encode sema support. This is part of PR3648.
Chris Lattner [Tue, 24 Feb 2009 22:18:39 +0000 (22:18 +0000)]
first wave of fixes for @encode sema support.  This is part of PR3648.

The big difference here is that (like string literal) @encode has
array type, not pointer type.

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

15 years agoccc-analyzer: Don't analyze files with '-arch ppc' or '-arch ppc64' since Clang
Ted Kremenek [Tue, 24 Feb 2009 22:07:12 +0000 (22:07 +0000)]
ccc-analyzer: Don't analyze files with '-arch ppc' or '-arch ppc64' since Clang
doesn't support Altivec intrisics nor is it likely that we're currently
generating all the right #defines, etc., for those architectures.

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

15 years agosome minor cleanups, handle ObjCEncodeExpr in a couple places.
Chris Lattner [Tue, 24 Feb 2009 21:54:33 +0000 (21:54 +0000)]
some minor cleanups, handle ObjCEncodeExpr in a couple places.

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

15 years agoimprove comments.
Chris Lattner [Tue, 24 Feb 2009 21:52:14 +0000 (21:52 +0000)]
improve comments.

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

15 years agoSet flag for -fobjc-gc in IMAGE_INFO variable.
Fariborz Jahanian [Tue, 24 Feb 2009 21:08:09 +0000 (21:08 +0000)]
Set flag for -fobjc-gc in IMAGE_INFO variable.

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

15 years agoWhen we're declaring an object or function with linkage, teach name
Douglas Gregor [Tue, 24 Feb 2009 20:03:32 +0000 (20:03 +0000)]
When we're declaring an object or function with linkage, teach name
lookup to skip over names without linkage. This finishes
<rdar://problem/6127293>.

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

15 years agoExtend the implicit declaration and checking against out-of-scope
Douglas Gregor [Tue, 24 Feb 2009 19:23:27 +0000 (19:23 +0000)]
Extend the implicit declaration and checking against out-of-scope
external declarations to also support external variable
declarations. Unified the code for these two cases into two new
subroutines.

Note that we fail to diagnose cases like the one Neil pointed
out, where a visible non-external declaration hides an external
declaration by the same name. That will require some reshuffling of
name lookup.

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

15 years agoretain/release checker:
Ted Kremenek [Tue, 24 Feb 2009 19:15:11 +0000 (19:15 +0000)]
retain/release checker:
- For autorelease pool tracking, keep information about the stack of pools
  separate from their contents. Also, keep track of the number of times an
  autorelease pool will send the "release" message to an object when the pool is
  destroyed.
- Update CFRefCount::Update to return a new state instead of a reference count
  binding. This will allow us to implement more complicated semantics with
  autorelease pools.

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

15 years agoFix IRgen of constant expressions referring to external/static
Daniel Dunbar [Tue, 24 Feb 2009 18:41:57 +0000 (18:41 +0000)]
Fix IRgen of constant expressions referring to external/static
variables.
 - PR3657.

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

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