]> granicus.if.org Git - clang/log
clang
15 years agoMove IRBuilder type definition to common file.
Daniel Dunbar [Sat, 1 Nov 2008 01:53:16 +0000 (01:53 +0000)]
Move IRBuilder type definition to common file.
 - No functionality change.

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

15 years agominor tweaks.
Chris Lattner [Sat, 1 Nov 2008 01:46:51 +0000 (01:46 +0000)]
minor tweaks.

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

15 years agoGrammar tweaks.
Daniel Dunbar [Sat, 1 Nov 2008 01:24:31 +0000 (01:24 +0000)]
Grammar tweaks.

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

15 years agoAdd recent timing results to web page.
Daniel Dunbar [Sat, 1 Nov 2008 01:14:36 +0000 (01:14 +0000)]
Add recent timing results to web page.

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

15 years agoSemantic checking of constructor declarations and classification of default/copy...
Douglas Gregor [Fri, 31 Oct 2008 20:25:05 +0000 (20:25 +0000)]
Semantic checking of constructor declarations and classification of default/copy constructors

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

16 years agoImplement basic support for converting constructors in user-defined
Douglas Gregor [Fri, 31 Oct 2008 16:23:19 +0000 (16:23 +0000)]
Implement basic support for converting constructors in user-defined
conversions.

Notes:
  - Overload resolution for converting constructors need to prohibit
    user-defined conversions (hence, the test isn't -verify safe yet).
  - We still use hacks for conversions from a class type to itself.
    This will be the case until we start implicitly declaring the appropriate
    special member functions. (That's next on my list)

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

16 years agoFix a bug that was introduced in 58501. Ideally I think we should force all targets...
Anders Carlsson [Fri, 31 Oct 2008 16:05:19 +0000 (16:05 +0000)]
Fix a bug that was introduced in 58501. Ideally I think we should force all targets to set these values and not have defaults.

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

16 years agoComment out invalid assertion. I'm leaving it in the code for now as a reminder...
Ted Kremenek [Fri, 31 Oct 2008 15:33:11 +0000 (15:33 +0000)]
Comment out invalid assertion.  I'm leaving it in the code for now as a reminder to produce a test case.

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

16 years agoImplement semantic checking of static_cast and dynamic_cast.
Sebastian Redl [Fri, 31 Oct 2008 14:43:28 +0000 (14:43 +0000)]
Implement semantic checking of static_cast and dynamic_cast.

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

16 years agoSimplify interface. We can get canonical type from the base region directly. No need...
Zhongxing Xu [Fri, 31 Oct 2008 11:02:48 +0000 (11:02 +0000)]
Simplify interface. We can get canonical type from the base region directly. No need for an extra type argument.

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

16 years agoImplement struct initialization for SCA.
Zhongxing Xu [Fri, 31 Oct 2008 10:53:01 +0000 (10:53 +0000)]
Implement struct initialization for SCA.

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

16 years agoImplement array initialization for SCA.
Zhongxing Xu [Fri, 31 Oct 2008 10:24:47 +0000 (10:24 +0000)]
Implement array initialization for SCA.

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

16 years agoFixed build warning. No functionality change.
Sanjiv Gupta [Fri, 31 Oct 2008 10:24:31 +0000 (10:24 +0000)]
Fixed build warning. No functionality change.

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

16 years agoAdd test code for array initialization.
Zhongxing Xu [Fri, 31 Oct 2008 10:23:14 +0000 (10:23 +0000)]
Add test code for array initialization.

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

16 years agoMade the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wchar
Sanjiv Gupta [Fri, 31 Oct 2008 09:52:39 +0000 (09:52 +0000)]
Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wchar
etc more generic. For some targets, long may not be equal to pointer size. For
example: PIC16 has int as i16, ptr as i16 but long as i32.

Also fixed a few build warnings in assert() functions in CFRefCount.cpp,
CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp.

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

16 years agoTurn off module verification in Release-Asserts builds.
Daniel Dunbar [Fri, 31 Oct 2008 09:34:21 +0000 (09:34 +0000)]
Turn off module verification in Release-Asserts builds.

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

16 years agoAdd support for parsing and representing C++ constructor declarations.
Douglas Gregor [Fri, 31 Oct 2008 09:07:45 +0000 (09:07 +0000)]
Add support for parsing and representing C++ constructor declarations.

Notes:
  - Constructors are never found by name lookup, so they'll never get
    pushed into any scope. Instead, they are stored as an
    OverloadedFunctionDecl in CXXRecordDecl for easy overloading.
  - There's a new action isCurrentClassName that determines whether an
    identifier is the name of the innermost class currently being defined;
    we use this to identify the declarator-id grammar rule that refers to
    a type-name.
  - MinimalAction does *not* support parsing constructors.
  - We now handle virtual and explicit function specifiers.

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

16 years ago"One" line fix for -parse-noop failure, "id" and several other things
Daniel Dunbar [Fri, 31 Oct 2008 08:56:51 +0000 (08:56 +0000)]
"One" line fix for -parse-noop failure, "id" and several other things
were being treated as type names for non-Objective-C files.
 - Other lines are just because MinimalAction didn't have access to
   the LangOptions.

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

16 years agoDebug info: Bug fix, function types should always include the return
Daniel Dunbar [Fri, 31 Oct 2008 08:12:03 +0000 (08:12 +0000)]
Debug info: Bug fix, function types should always include the return
type.

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

16 years agoImplement BindStruct and fix a bug in RetriveStruct.
Zhongxing Xu [Fri, 31 Oct 2008 08:10:01 +0000 (08:10 +0000)]
Implement BindStruct and fix a bug in RetriveStruct.

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

16 years agoFix 80-col violations.
Zhongxing Xu [Fri, 31 Oct 2008 07:26:14 +0000 (07:26 +0000)]
Fix 80-col violations.

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

16 years agoImplement load from struct region. Instead of returning an UnknownVal(), we create...
Zhongxing Xu [Fri, 31 Oct 2008 07:16:08 +0000 (07:16 +0000)]
Implement load from struct region. Instead of returning an UnknownVal(), we create a CompoundVal by loading from each field of the struct.

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

16 years agoMake CompoundLiteralRegion a subclass of TypedRegiion.
Zhongxing Xu [Fri, 31 Oct 2008 06:30:35 +0000 (06:30 +0000)]
Make CompoundLiteralRegion a subclass of TypedRegiion.

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

16 years agoAdd a tentative assertion.
Zhongxing Xu [Fri, 31 Oct 2008 06:05:32 +0000 (06:05 +0000)]
Add a tentative assertion.

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

16 years agoOn Mac OS X, use TMPDIR as the default location to place analysis results. This...
Ted Kremenek [Fri, 31 Oct 2008 05:48:42 +0000 (05:48 +0000)]
On Mac OS X, use TMPDIR as the default location to place analysis results.  This is a more secure location for such files, and addresses <rdar://problem/6334220>.

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

16 years agoQuick fix for PR2950, infinite loop generating debug info for
Daniel Dunbar [Fri, 31 Oct 2008 04:04:54 +0000 (04:04 +0000)]
Quick fix for PR2950, infinite loop generating debug info for
recursive types.
 - Style will be clean up in further patches.

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

16 years agoFormatting tweaks.
Daniel Dunbar [Fri, 31 Oct 2008 03:54:29 +0000 (03:54 +0000)]
Formatting tweaks.
 - No functionality change.

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

16 years agoFix a comment.
Zhongxing Xu [Fri, 31 Oct 2008 03:01:26 +0000 (03:01 +0000)]
Fix a comment.

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

16 years agoAdded missing 'expected-warning'
Ted Kremenek [Fri, 31 Oct 2008 00:20:13 +0000 (00:20 +0000)]
Added missing 'expected-warning'

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

16 years agoEnhance compound literal test case.
Ted Kremenek [Fri, 31 Oct 2008 00:19:42 +0000 (00:19 +0000)]
Enhance compound literal test case.

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

16 years agoUse llvm::raw_string_ostream instead of std::ostringstream.
Ted Kremenek [Fri, 31 Oct 2008 00:18:30 +0000 (00:18 +0000)]
Use llvm::raw_string_ostream instead of std::ostringstream.

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

16 years agoEnhance path-sensitive return-of-stack-address check to print out the line number...
Ted Kremenek [Fri, 31 Oct 2008 00:13:20 +0000 (00:13 +0000)]
Enhance path-sensitive return-of-stack-address check to print out the line number of a compound literal (whose address is being returned) instead of printing out the hex representation of the pointer address of the CompoundLiteralExpr.

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

16 years agoAdd accessor method to CompoundLiteralRegion to retrieve the CompoundLiteralExpr.
Ted Kremenek [Fri, 31 Oct 2008 00:04:54 +0000 (00:04 +0000)]
Add accessor method to CompoundLiteralRegion to retrieve the CompoundLiteralExpr.

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

16 years agoUpdated checker build.
Ted Kremenek [Thu, 30 Oct 2008 23:41:37 +0000 (23:41 +0000)]
Updated checker build.

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

16 years agoAdd missing "expected warning".
Ted Kremenek [Thu, 30 Oct 2008 23:17:05 +0000 (23:17 +0000)]
Add missing "expected warning".
Add compound literal with empty initializer (just to test the analyzer handles it).

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

16 years agoExtend "followsFundamentalRule" to ignore prefix '_' characters.
Ted Kremenek [Thu, 30 Oct 2008 23:14:58 +0000 (23:14 +0000)]
Extend "followsFundamentalRule" to ignore prefix '_' characters.

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

16 years agoHandle the case in VisitInitListExprs where there are no initializers in the compound...
Ted Kremenek [Thu, 30 Oct 2008 23:14:36 +0000 (23:14 +0000)]
Handle the case in VisitInitListExprs where there are no initializers in the compound literal.

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

16 years agoAdd method that will be invoked using the dot-syntax just to test that the missing...
Ted Kremenek [Thu, 30 Oct 2008 23:00:13 +0000 (23:00 +0000)]
Add method that will be invoked using the dot-syntax just to test that the missing -dealloc checker handles it.

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

16 years agoDistinguish between self.X = ... where self.X is a property reference and self.X...
Ted Kremenek [Thu, 30 Oct 2008 22:28:48 +0000 (22:28 +0000)]
Distinguish between self.X = ... where self.X is a property reference and self.X is an implicit call to setX.

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

16 years agoImprove compound literal test case.
Ted Kremenek [Thu, 30 Oct 2008 18:46:50 +0000 (18:46 +0000)]
Improve compound literal test case.

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

16 years agoUse the correct predecessor node.
Ted Kremenek [Thu, 30 Oct 2008 18:37:08 +0000 (18:37 +0000)]
Use the correct predecessor node.

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

16 years agoPretty-printing for SVals now mainly uses llvm::raw_ostream. We have an adapter...
Ted Kremenek [Thu, 30 Oct 2008 18:35:10 +0000 (18:35 +0000)]
Pretty-printing for SVals now mainly uses llvm::raw_ostream.  We have an adapter for std::ostream, but this will be removed in the future.

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

16 years agoAdd missing return statement.
Ted Kremenek [Thu, 30 Oct 2008 18:34:31 +0000 (18:34 +0000)]
Add missing return statement.

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

16 years agoAdded iterators to nonloc::CompoundSVal.
Ted Kremenek [Thu, 30 Oct 2008 18:01:28 +0000 (18:01 +0000)]
Added iterators to nonloc::CompoundSVal.
Added pretty-printing for nonloc::CompoundSVal.

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

16 years ago80 col violation.
Ted Kremenek [Thu, 30 Oct 2008 17:53:23 +0000 (17:53 +0000)]
80 col violation.

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

16 years agoUse a worklist in GRExprEngine::VisitInitListExpr to process subexpressions.
Ted Kremenek [Thu, 30 Oct 2008 17:47:32 +0000 (17:47 +0000)]
Use a worklist in GRExprEngine::VisitInitListExpr to process subexpressions.

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

16 years agoUpdate #includes since SVals.h no longer includes BasicValueFactory.h.
Ted Kremenek [Thu, 30 Oct 2008 17:46:51 +0000 (17:46 +0000)]
Update #includes since SVals.h no longer includes BasicValueFactory.h.

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

16 years agoAdd iterator/reverse_iterator to InitListExpr for iteration over the subexpressions...
Ted Kremenek [Thu, 30 Oct 2008 17:45:53 +0000 (17:45 +0000)]
Add iterator/reverse_iterator to InitListExpr for iteration over the subexpressions of an initializer list.  This is basically the same as child_iterator except reverse iteration is possible (which will be used by GRExprEngine::VisitInitListExpr).

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

16 years agoCompoundVal now uses an ImmutableList<SVal> to store its set of SVals. This change...
Ted Kremenek [Thu, 30 Oct 2008 17:44:46 +0000 (17:44 +0000)]
CompoundVal now uses an ImmutableList<SVal> to store its set of SVals.  This change was motivated by the need to allow state-splitting in GRExprEngine::VisitInitListExpr.  As a side-benefit, we no longer need to perform any copies of SVals when creating a CompoundSVal, and the profiling of CompoundSVal is now constant time.

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

16 years ago"missing ivar release" is a performance bug.
Ted Kremenek [Thu, 30 Oct 2008 17:29:54 +0000 (17:29 +0000)]
"missing ivar release" is a performance bug.

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

16 years agoPatch by Nikita Zhuk: test case for fix for false positive reported in PR2978.
Ted Kremenek [Thu, 30 Oct 2008 15:19:43 +0000 (15:19 +0000)]
Patch by Nikita Zhuk: test case for fix for false positive reported in PR2978.

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

16 years agoPatch by Nikita Zhuk:
Ted Kremenek [Thu, 30 Oct 2008 15:13:43 +0000 (15:13 +0000)]
Patch by Nikita Zhuk:

Fix PR 2978 false positive for missing release in -dealloc of an ivar retained via a property and then released by assigning nil to that property:

  http://llvm.org/bugs/show_bug.cgi?id=2978

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

16 years agoMake sure RewriteObjCMethodDecl() does a block pointer rewrite.
Steve Naroff [Thu, 30 Oct 2008 14:45:29 +0000 (14:45 +0000)]
Make sure RewriteObjCMethodDecl() does a block pointer rewrite.

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

16 years agoFix arithmetic type check
Douglas Gregor [Thu, 30 Oct 2008 13:47:07 +0000 (13:47 +0000)]
Fix arithmetic type check

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

16 years agoAdd a couple fixes for rewriting ivars/methods that use/contain blocks.
Steve Naroff [Thu, 30 Oct 2008 12:09:33 +0000 (12:09 +0000)]
Add a couple fixes for rewriting ivars/methods that use/contain blocks.

Now this:

@interface Test
{
  void (^ivar)(void);
}
- (void)name;
@end

@implementation Test
- (void)name {
  ivar = ^{ printf("hello\n"); }; // ((struct Test_IMPL *)self)->ivar = (void (*)(void))&__name_block_impl_0((void *)__name_block_func_0);
  ivar(); // ((void (*)(struct __block_impl *))((struct __block_impl *)((struct Test_IMPL *)self)->ivar)->FuncPtr)((struct __block_impl *)((struct Test_IMPL *)self)->ivar);
}

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

16 years agoConvert SynthesizeBlockCall() from test->AST based implementation.
Steve Naroff [Thu, 30 Oct 2008 10:07:53 +0000 (10:07 +0000)]
Convert SynthesizeBlockCall() from test->AST based implementation.

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

16 years agoMerge the array and struct case. They are essentially the same.
Zhongxing Xu [Thu, 30 Oct 2008 05:35:59 +0000 (05:35 +0000)]
Merge the array and struct case. They are essentially the same.

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

16 years agoRename:
Zhongxing Xu [Thu, 30 Oct 2008 05:33:54 +0000 (05:33 +0000)]
Rename:
 - SetSVal(GRState*, Loc, SVal) => BindLoc
 - SetSVal(GRState*, Expr*, SVal) => BindExpr

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

16 years agoAdjust code format.
Zhongxing Xu [Thu, 30 Oct 2008 05:03:28 +0000 (05:03 +0000)]
Adjust code format.

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

16 years agoImplement VisitInitListExpr(). InitListExpr will have a nonloc::CompoundVal value.
Zhongxing Xu [Thu, 30 Oct 2008 05:02:23 +0000 (05:02 +0000)]
Implement VisitInitListExpr(). InitListExpr will have a nonloc::CompoundVal value.

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

16 years agoAdd CompoundVal and CompoundValData for representing the value of InitListExpr.
Zhongxing Xu [Thu, 30 Oct 2008 04:58:00 +0000 (04:58 +0000)]
Add CompoundVal and CompoundValData for representing the value of InitListExpr.

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

16 years agoFix 80-col.
Zhongxing Xu [Thu, 30 Oct 2008 04:53:23 +0000 (04:53 +0000)]
Fix 80-col.

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

16 years agoFix specification references link.
Daniel Dunbar [Thu, 30 Oct 2008 00:53:12 +0000 (00:53 +0000)]
Fix specification references link.

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

16 years agoMark yy_fatal_error as a panic function.
Ted Kremenek [Thu, 30 Oct 2008 00:00:57 +0000 (00:00 +0000)]
Mark yy_fatal_error as a panic function.

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

16 years agoImprove documentation for Sema::CheckReferenceInit
Douglas Gregor [Wed, 29 Oct 2008 23:31:03 +0000 (23:31 +0000)]
Improve documentation for Sema::CheckReferenceInit

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

16 years agoNeXT: Emit protocol objects lazily.
Daniel Dunbar [Wed, 29 Oct 2008 22:36:39 +0000 (22:36 +0000)]
NeXT: Emit protocol objects lazily.
 - That is, the metadata for a protocol is only emitted if that
   protocol is actually used in the translation unit. This is
   important because Objective-C headers frequently contain a large
   number of protocol definitions, only a few of which will be used in
   any given file.

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

16 years agoConvert SynthBlockInitExpr() from text->AST based implementation.
Steve Naroff [Wed, 29 Oct 2008 21:23:59 +0000 (21:23 +0000)]
Convert SynthBlockInitExpr() from text->AST based implementation.

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

16 years agoRemove workaround for reference. No longer necessary.
Sebastian Redl [Wed, 29 Oct 2008 19:45:21 +0000 (19:45 +0000)]
Remove workaround for reference. No longer necessary.

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

16 years agoFix missing %s in run string causing hang during tests.
Sebastian Redl [Wed, 29 Oct 2008 19:29:09 +0000 (19:29 +0000)]
Fix missing %s in run string causing hang during tests.

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

16 years agoFix crash reported in PR2923 where a function declared using typeof(another_function...
Ted Kremenek [Wed, 29 Oct 2008 18:41:34 +0000 (18:41 +0000)]
Fix crash reported in PR2923 where a function declared using typeof(another_function) would have FunctionDecl::getNumParams() return the number of parameters in the original function type and not the number of parameters in the actual FunctionDecl.

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

16 years agoHandle block literals at file scope, remove some dead code, etc.
Steve Naroff [Wed, 29 Oct 2008 18:15:37 +0000 (18:15 +0000)]
Handle block literals at file scope, remove some dead code, etc.

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

16 years agoMake the non-reference check in Expr work always
Douglas Gregor [Wed, 29 Oct 2008 18:00:54 +0000 (18:00 +0000)]
Make the non-reference check in Expr work always

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

16 years agoSimplify and correct the check for function redefinitions. This does two things:
Douglas Gregor [Wed, 29 Oct 2008 15:10:40 +0000 (15:10 +0000)]
Simplify and correct the check for function redefinitions. This does two things:

  - Allows definitions of overloaded functions :)
  - Eliminates extraneous error messages when we have a definition of a
    function that isn't an overload but doesn't have exactly the same type
    as the original.

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

16 years agoImplement overloading rules for reference binding
Douglas Gregor [Wed, 29 Oct 2008 14:50:44 +0000 (14:50 +0000)]
Implement overloading rules for reference binding

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

16 years agoMake sure internally synthesized block pointer types are converted before pretty...
Steve Naroff [Wed, 29 Oct 2008 14:49:46 +0000 (14:49 +0000)]
Make sure internally synthesized block pointer types are converted before pretty printing.

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

16 years agoTemporary disable the const-object-declaration-without-initializer check, because...
Douglas Gregor [Wed, 29 Oct 2008 13:50:18 +0000 (13:50 +0000)]
Temporary disable the const-object-declaration-without-initializer check, because it depends on linkage-specifier semantics we don't yet have

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

16 years agoWorkaround an LLVM bug where inlining functions with debug info breaks
Daniel Dunbar [Wed, 29 Oct 2008 08:50:02 +0000 (08:50 +0000)]
Workaround an LLVM bug where inlining functions with debug info breaks
code generation.
 - For now, disable running the always inliner pass (at -O0) if we are
   also generating debug information.

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

16 years agoImprove llvm-gcc compatibility, -Os implies -O2 (sortof).
Daniel Dunbar [Wed, 29 Oct 2008 07:56:11 +0000 (07:56 +0000)]
Improve llvm-gcc compatibility, -Os implies -O2 (sortof).

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

16 years agoAdd notes for SCA.
Zhongxing Xu [Wed, 29 Oct 2008 07:05:10 +0000 (07:05 +0000)]
Add notes for SCA.

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

16 years agoUpdate checker build.
Ted Kremenek [Wed, 29 Oct 2008 06:19:03 +0000 (06:19 +0000)]
Update checker build.

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

16 years agoUpdate FindSpecRefs to recognize named section references.
Daniel Dunbar [Wed, 29 Oct 2008 05:58:09 +0000 (05:58 +0000)]
Update FindSpecRefs to recognize named section references.
 - Unfortunately, I don't have an easy way to map from named sections
   to numbers nicely so they don't get page numbers or integrate in
   the list well.

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

16 years agoFix for PR2966: va_start/va_end use the *address* of the
Eli Friedman [Wed, 29 Oct 2008 04:39:20 +0000 (04:39 +0000)]
Fix for PR2966: va_start/va_end use the *address* of the
va_list, not the value.  Patch fixes an assert on
x86-64 and a wrong-code bug on x86.  I'm not completely sure,
but I think it's a regression from r58306.

Does anyone run regression tests regularly on x86-64? The crash should
have been picked up there.

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

16 years agoPatch by Nikita Zhuk:
Ted Kremenek [Wed, 29 Oct 2008 04:30:28 +0000 (04:30 +0000)]
Patch by Nikita Zhuk:

The attached patch adds additional checks to -warn-objc-missing-dealloc. It checks that all ivars which are used in implementation of synthesized properties are either

a) released in dealloc if the property has retain" or "copy" attribute OR
b) not released in dealloc if the property has "assign" attribute

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

16 years agoIOServiceGetMatchingServices is a release function.
Ted Kremenek [Wed, 29 Oct 2008 04:07:07 +0000 (04:07 +0000)]
IOServiceGetMatchingServices is a release function.

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

16 years agoChoose CompileOptions (optimization passes) to match llvm-gcc more
Daniel Dunbar [Wed, 29 Oct 2008 03:42:18 +0000 (03:42 +0000)]
Choose CompileOptions (optimization passes) to match llvm-gcc more
closely.

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

16 years agoFix mmintrin.h to use proper definition of functions taking no
Daniel Dunbar [Wed, 29 Oct 2008 03:37:55 +0000 (03:37 +0000)]
Fix mmintrin.h to use proper definition of functions taking no
arguments.
 - More important than it looks, this inhibits trivial inlining
   otherwise.

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

16 years agoRename: AddDecl => BindDecl
Zhongxing Xu [Wed, 29 Oct 2008 02:34:02 +0000 (02:34 +0000)]
Rename: AddDecl => BindDecl
BindDecl better describes what the function does:
  - Bind the VarDecl to its memory region
  - Bind the memory region to some initial value.

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

16 years agoTweak Sema::CheckReferenceInit so that it (optionally) computes an
Douglas Gregor [Wed, 29 Oct 2008 02:00:59 +0000 (02:00 +0000)]
Tweak Sema::CheckReferenceInit so that it (optionally) computes an
ImplicitConversionSequence and, when doing so, following the specific
rules of [over.best.ics].

The computation of the implicit conversion sequences implements C++
[over.ics.ref], but we do not (yet) have ranking for implicit
conversion sequences that use reference binding.

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

16 years agoMemSpaceRegions could be uninitialized. We only require R is a real region.
Zhongxing Xu [Wed, 29 Oct 2008 01:13:28 +0000 (01:13 +0000)]
MemSpaceRegions could be uninitialized. We only require R is a real region.

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

16 years agoImplement initialization of a reference (C++ [dcl.init.ref]) as part
Douglas Gregor [Wed, 29 Oct 2008 00:13:59 +0000 (00:13 +0000)]
Implement initialization of a reference (C++ [dcl.init.ref]) as part
of copy initialization. Other pieces of the puzzle:

  - Try/Perform-ImplicitConversion now handles implicit conversions
    that don't involve references.
  - Try/Perform-CopyInitialization uses
    CheckSingleAssignmentConstraints for C. PerformCopyInitialization
    is now used for all argument passing and returning values from a
    function.
  - Diagnose errors with declaring references and const values without
    an initializer. (Uses a new Action callback, ActOnUninitializedDecl).

We do not yet have implicit conversion sequences for reference
binding, which means that we don't have any overloading support for
reference parameters yet.

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

16 years ago.s files don't require the preprocessor, patch by Roman Divacky!
Chris Lattner [Tue, 28 Oct 2008 20:33:42 +0000 (20:33 +0000)]
.s files don't require the preprocessor, patch by Roman Divacky!

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

16 years agoMore changes necessary to integrate the objc and blocks rewriters.
Steve Naroff [Tue, 28 Oct 2008 20:29:00 +0000 (20:29 +0000)]
More changes necessary to integrate the objc and blocks rewriters.

With this commit, stuff like this is very close to working...

    [foo barf:^(int){ printf("whatever\n"); }];

Here is what is currently translates to...

    ((id (*)(id, SEL, void (^)(int)))(void *)objc_msgSend)((id)foo, sel_registerName("barf:"), (void (*)(int))__main_block_func_0);

I just need make sure the funky cast on objc_msgSend() is converted from "void (^)(int)" to "void (*)(int)". Since the cast doesn't appear in the source code, it needs to be converted in RewriteObjC::SynthMessageExpr().

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

16 years agoMinor UI enhancement:
Ted Kremenek [Tue, 28 Oct 2008 20:09:57 +0000 (20:09 +0000)]
Minor UI enhancement:

(1) when all of the bug category boxes are checked, automatically check "All Bugs"

(2) when any of the bug category boxes are unchecked, automatically uncheck "All Bugs"

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

16 years agoPatch by Nikita Zhuk:
Ted Kremenek [Tue, 28 Oct 2008 19:56:52 +0000 (19:56 +0000)]
Patch by Nikita Zhuk:

The attached patch adds a checkbox to the scan-build summary report, which toggles all other checkboxes' states.

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

16 years agoAccess pass manager consistently.
Daniel Dunbar [Tue, 28 Oct 2008 19:23:05 +0000 (19:23 +0000)]
Access pass manager consistently.
 - No functionality change.

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

16 years ago80-col fixes.
Daniel Dunbar [Tue, 28 Oct 2008 19:12:58 +0000 (19:12 +0000)]
80-col fixes.

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

16 years agoRename ExplicitCCastExpr to CStyleCastExpr
Douglas Gregor [Tue, 28 Oct 2008 15:36:24 +0000 (15:36 +0000)]
Rename ExplicitCCastExpr to CStyleCastExpr

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

16 years agoReplace a dyn_cast with a cast when we know the exact type
Douglas Gregor [Tue, 28 Oct 2008 15:29:51 +0000 (15:29 +0000)]
Replace a dyn_cast with a cast when we know the exact type

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

16 years agoAdd newline.
Zhongxing Xu [Tue, 28 Oct 2008 09:32:08 +0000 (09:32 +0000)]
Add newline.

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

16 years agoUpdate random notes.
Zhongxing Xu [Tue, 28 Oct 2008 09:09:48 +0000 (09:09 +0000)]
Update random notes.

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