]> granicus.if.org Git - clang/log
clang
15 years agoSet COLUMNS=0 to disable wrapping instead of a random large number.
Daniel Dunbar [Mon, 4 May 2009 02:20:01 +0000 (02:20 +0000)]
Set COLUMNS=0 to disable wrapping instead of a random large number.

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

15 years agoTest a few more bits of the driver.
Daniel Dunbar [Mon, 4 May 2009 00:31:11 +0000 (00:31 +0000)]
Test a few more bits of the driver.

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

15 years agoNightly test coverage reporting is back online.
Daniel Dunbar [Sun, 3 May 2009 23:46:18 +0000 (23:46 +0000)]
Nightly test coverage reporting is back online.

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

15 years agoInline GetFieldBaseOffset into sole callsite.
Daniel Dunbar [Sun, 3 May 2009 23:35:23 +0000 (23:35 +0000)]
Inline GetFieldBaseOffset into sole callsite.

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

15 years agoAvoid recomputing field offsets.
Daniel Dunbar [Sun, 3 May 2009 23:31:46 +0000 (23:31 +0000)]
Avoid recomputing field offsets.

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

15 years agoNormalize formatting
Daniel Dunbar [Sun, 3 May 2009 23:21:22 +0000 (23:21 +0000)]
Normalize formatting

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

15 years agoMake diagnostic printing more deterministic when running tests.
Daniel Dunbar [Sun, 3 May 2009 23:14:36 +0000 (23:14 +0000)]
Make diagnostic printing more deterministic when running tests.

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

15 years agosvn:ignore Debug+Coverage dirs
Daniel Dunbar [Sun, 3 May 2009 23:11:22 +0000 (23:11 +0000)]
svn:ignore Debug+Coverage dirs

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

15 years agoFix an infinite loop in diagnostic printing.
Daniel Dunbar [Sun, 3 May 2009 23:04:40 +0000 (23:04 +0000)]
Fix an infinite loop in diagnostic printing.
 - The diagnostic is still poor, however. Doug, can you investigate?

 - Improved the test case to not depend on the file name, now it can
   be extended to actually check the formatting of the diagnostics
   (I'm hoping grep -A is portable here).

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

15 years agoFix for PR3841: follow gcc's example and fall back to the system
Eli Friedman [Sun, 3 May 2009 23:00:48 +0000 (23:00 +0000)]
Fix for PR3841: follow gcc's example and fall back to the system
stdint.h unless we are freestanding.

Any suggestions here are welcome.

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

15 years agoPR2524: downgrade taking address of expression of type 'void' to an
Eli Friedman [Sun, 3 May 2009 22:36:05 +0000 (22:36 +0000)]
PR2524: downgrade taking address of expression of type 'void' to an
extension warning.

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

15 years agoFix/re-enable test.
Eli Friedman [Sun, 3 May 2009 21:22:18 +0000 (21:22 +0000)]
Fix/re-enable test.

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

15 years agoDisable this test case, I'm tired of seeing red. :)
Daniel Dunbar [Sun, 3 May 2009 21:10:32 +0000 (21:10 +0000)]
Disable this test case, I'm tired of seeing red. :)

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

15 years agoUse the implementation decl for looking up offset while building the
Daniel Dunbar [Sun, 3 May 2009 21:05:10 +0000 (21:05 +0000)]
Use the implementation decl for looking up offset while building the
ivar layout.
 - The layout needs access to synthesized ivars.

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

15 years agoRename test case
Daniel Dunbar [Sun, 3 May 2009 20:37:42 +0000 (20:37 +0000)]
Rename test case

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

15 years agoFix the testcase for PR4132.
Eli Friedman [Sun, 3 May 2009 19:54:21 +0000 (19:54 +0000)]
Fix the testcase for PR4132.

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

15 years agoAdd RegionStore test that illustrates a bogus array-out-of-bounds error.
Ted Kremenek [Sun, 3 May 2009 19:24:34 +0000 (19:24 +0000)]
Add RegionStore test that illustrates a bogus array-out-of-bounds error.

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

15 years agoPR4134: Implement __builtin_extract_return_addr.
Eli Friedman [Sun, 3 May 2009 19:23:23 +0000 (19:23 +0000)]
PR4134: Implement __builtin_extract_return_addr.

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

15 years agoFix for PR4132: make sure to insert whitespace consistently before a
Eli Friedman [Sun, 3 May 2009 19:16:00 +0000 (19:16 +0000)]
Fix for PR4132: make sure to insert whitespace consistently before a
pasted token.

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

15 years agoAdd failing test case.
Ted Kremenek [Sun, 3 May 2009 19:09:37 +0000 (19:09 +0000)]
Add failing test case.

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

15 years agoFix comment to account for r70786.
Eli Friedman [Sun, 3 May 2009 19:01:39 +0000 (19:01 +0000)]
Fix comment to account for r70786.

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

15 years agoPR4133: fix always_inline implementation to be consistent with gcc.
Eli Friedman [Sun, 3 May 2009 18:13:43 +0000 (18:13 +0000)]
PR4133: fix always_inline implementation to be consistent with gcc.

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

15 years agoMake codegen for constructors work again.
Anders Carlsson [Sun, 3 May 2009 17:47:16 +0000 (17:47 +0000)]
Make codegen for constructors work again.

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

15 years agoOne can use "class" and "struct" interchangeably to refer to a class
Douglas Gregor [Sun, 3 May 2009 17:18:57 +0000 (17:18 +0000)]
One can use "class" and "struct" interchangeably to refer to a class
in C++. Fixes <rdar://problem/6815995>.

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

15 years agoassert that mangleName is not called for C++ ctors/dtors.
Anders Carlsson [Sun, 3 May 2009 16:51:04 +0000 (16:51 +0000)]
assert that mangleName is not called for C++ ctors/dtors.

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

15 years agoFix crash in source-line truncation code for diagnostic
Douglas Gregor [Sun, 3 May 2009 15:24:25 +0000 (15:24 +0000)]
Fix crash in source-line truncation code for diagnostic
printing. Also, when we only need to truncate the line at the end,
make sure there is room for the ellipsis.

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

15 years agoRemove ASTContext::addRecordToClass.
Daniel Dunbar [Sun, 3 May 2009 14:27:48 +0000 (14:27 +0000)]
Remove ASTContext::addRecordToClass.

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

15 years agoIt turns out BuildAggrIvarLayout wasn't even using the shadow struct,
Daniel Dunbar [Sun, 3 May 2009 14:22:14 +0000 (14:22 +0000)]
It turns out BuildAggrIvarLayout wasn't even using the shadow struct,
just computing it!

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

15 years agoLift common subexpression, remove dead "base" variable.
Daniel Dunbar [Sun, 3 May 2009 14:17:18 +0000 (14:17 +0000)]
Lift common subexpression, remove dead "base" variable.

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

15 years agoFactor out BuildAggrIvarRecordLayout routine.
Daniel Dunbar [Sun, 3 May 2009 14:10:34 +0000 (14:10 +0000)]
Factor out BuildAggrIvarRecordLayout routine.

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

15 years agoLift out GetGCAttrTypeForType routine.
Daniel Dunbar [Sun, 3 May 2009 13:55:09 +0000 (13:55 +0000)]
Lift out GetGCAttrTypeForType routine.

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

15 years agoAdd constructors for GC_IVAR and SKIP_SCAN, tighten up uses.
Daniel Dunbar [Sun, 3 May 2009 13:44:42 +0000 (13:44 +0000)]
Add constructors for GC_IVAR and SKIP_SCAN, tighten up uses.

Lift up a size calculation and note some asymmetries.

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

15 years agoHook msp430 in
Anton Korobeynikov [Sun, 3 May 2009 13:43:08 +0000 (13:43 +0000)]
Hook msp430 in

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

15 years agoWhitespace cleanup
Anton Korobeynikov [Sun, 3 May 2009 13:42:53 +0000 (13:42 +0000)]
Whitespace cleanup

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

15 years agoNormalize style, remove a dead assert.
Daniel Dunbar [Sun, 3 May 2009 13:32:01 +0000 (13:32 +0000)]
Normalize style, remove a dead assert.

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

15 years agoUse ASTRecordLayout for computing ivar offsets instead of shadow
Daniel Dunbar [Sun, 3 May 2009 13:15:50 +0000 (13:15 +0000)]
Use ASTRecordLayout for computing ivar offsets instead of shadow
struct.
 - We still need to do more lookup than necessary because ivars don't
   live in a reasonable DeclContext.

 - The only remaining client of the interface shadow struct is the
   ivar layout bitmap.

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

15 years agoAdd a ComputeIvarBaseOffset overload taking an implementation
Daniel Dunbar [Sun, 3 May 2009 12:57:56 +0000 (12:57 +0000)]
Add a ComputeIvarBaseOffset overload taking an implementation
decl. Only this routine will be suitable for computing the offset of a
synthesized ivar.
 - No functionality change.

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

15 years agoFix a possible memory error, the record layout entry could be
Daniel Dunbar [Sun, 3 May 2009 11:41:43 +0000 (11:41 +0000)]
Fix a possible memory error, the record layout entry could be
invalidated by layout out the super class, we cannot cache the map
entry.

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

15 years agoImplement the interface/implementation layout distinction.
Daniel Dunbar [Sun, 3 May 2009 11:16:44 +0000 (11:16 +0000)]
Implement the interface/implementation layout distinction.
 - These routines should now be independent of the Sema state.

 - This is nearly zero functionality change, the distinction only
   matters in the non-fragile ABI, and the consumers that care about
   this distinction should be using getASTObjCImplementationLayout.

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

15 years agoCompute Objective-C metadata size information from the record layout,
Daniel Dunbar [Sun, 3 May 2009 10:46:44 +0000 (10:46 +0000)]
Compute Objective-C metadata size information from the record layout,
not the shadow structure.

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

15 years agoSplit out getASTObjCImplementationLayout
Daniel Dunbar [Sun, 3 May 2009 10:38:35 +0000 (10:38 +0000)]
Split out getASTObjCImplementationLayout
 - The difference from getASTObjCInterfaceLayout is that the computes
   the layout including synthesized ivars.

 - No functionality change, they currently both compute the same thing
   -- whether that includes synthesized ivars or not depends on when
   they get called!!!

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

15 years agoRemove an unneeded special case.
Daniel Dunbar [Sun, 3 May 2009 10:35:52 +0000 (10:35 +0000)]
Remove an unneeded special case.

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

15 years agoPR4063, with feeling: Chain PP callbacks by default.
Daniel Dunbar [Sun, 3 May 2009 10:04:17 +0000 (10:04 +0000)]
PR4063, with feeling: Chain PP callbacks by default.
 - This is somewhat cleaner and also fixes PR4063 for real, I had the
   order wrong so we were just creating an empty dependency file.

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

15 years agoPR4063: Fix dependency generation with -E.
Daniel Dunbar [Sun, 3 May 2009 09:35:25 +0000 (09:35 +0000)]
PR4063: Fix dependency generation with -E.

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

15 years agolook at the right operand when increasing the size of an asm output,
Chris Lattner [Sun, 3 May 2009 09:05:53 +0000 (09:05 +0000)]
look at the right operand when increasing the size of an asm output,
this fixes http://llvm.org/bugs/show_bug.cgi?id=3373#c20

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

15 years agoRemove unused argument.
Daniel Dunbar [Sun, 3 May 2009 08:56:52 +0000 (08:56 +0000)]
Remove unused argument.

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

15 years agoCoalesce the ivar offset calculation further.
Daniel Dunbar [Sun, 3 May 2009 08:55:17 +0000 (08:55 +0000)]
Coalesce the ivar offset calculation further.

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

15 years agotemporary hack to work around PR4128
Chris Lattner [Sun, 3 May 2009 08:42:09 +0000 (08:42 +0000)]
temporary hack to work around PR4128

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

15 years agodon't shadow 'i'
Chris Lattner [Sun, 3 May 2009 08:38:58 +0000 (08:38 +0000)]
don't shadow 'i'

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

15 years agoallow references to the larger value in a tied constraint
Chris Lattner [Sun, 3 May 2009 08:32:32 +0000 (08:32 +0000)]
allow references to the larger value in a tied constraint
from the asm string, but reject references to the smaller one.

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

15 years agocode cleanup, avoid shadowing i.
Chris Lattner [Sun, 3 May 2009 08:24:16 +0000 (08:24 +0000)]
code cleanup, avoid shadowing i.

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

15 years agoadd support for tying asm operands where the result is smaller than
Chris Lattner [Sun, 3 May 2009 08:21:20 +0000 (08:21 +0000)]
add support for tying asm operands where the  result is smaller than
the input.  This is part of PR3373.

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

15 years agoRemove typo
Daniel Dunbar [Sun, 3 May 2009 08:00:14 +0000 (08:00 +0000)]
Remove typo

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

15 years agoimplement support for asm outputs targetting non-simple lvalue destinations
Chris Lattner [Sun, 3 May 2009 07:53:25 +0000 (07:53 +0000)]
implement support for asm outputs targetting non-simple lvalue destinations
like bitfields.  incidentally llvm-gcc crashes on this sort of thing also. :)

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

15 years agoUse type from ivar instead of from shadow struct field.
Daniel Dunbar [Sun, 3 May 2009 07:52:00 +0000 (07:52 +0000)]
Use type from ivar instead of from shadow struct field.
 - No functionality change.

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

15 years agoDon't insert an extra ParenExpr around asm operands.
Eli Friedman [Sun, 3 May 2009 07:49:42 +0000 (07:49 +0000)]
Don't insert an extra ParenExpr around asm operands.

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

15 years agohandle codegen of asms where a small input is tied to a large output.
Chris Lattner [Sun, 3 May 2009 07:27:51 +0000 (07:27 +0000)]
handle codegen of asms where a small input is tied to a large output.

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

15 years agorefactor some code to get the input/output constraint info before
Chris Lattner [Sun, 3 May 2009 07:05:00 +0000 (07:05 +0000)]
refactor some code to get the input/output constraint info before
processing the outputs, no functionality change.

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

15 years agoIf we have mismatched integer tied operands, but the operand
Chris Lattner [Sun, 3 May 2009 07:04:21 +0000 (07:04 +0000)]
If we have mismatched integer tied operands, but the operand
number is not mentioned in the asm string, let it past sema.
Right now these are currently rejected by the llvm code generator
but this will be fixed next.

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

15 years agoadd a flag to output asm constraints so that we efficiently know
Chris Lattner [Sun, 3 May 2009 06:59:37 +0000 (06:59 +0000)]
add a flag to output asm constraints so that we efficiently know
if there is an input constraint that is tied to it.

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

15 years agoavoid a crash when we encounter a implicit cast of the paren expr due to
Chris Lattner [Sun, 3 May 2009 06:50:40 +0000 (06:50 +0000)]
avoid a crash when we encounter a implicit cast of the paren expr due to
promotions.  This should be fixed by not modeling asm operands (which
require the ()'s according to the grammar) as not being paren exprs.

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

15 years agoFix: <rdar://problem/6850275> CF objects returned from methods with "new" or "copy...
Ted Kremenek [Sun, 3 May 2009 06:08:32 +0000 (06:08 +0000)]
Fix: <rdar://problem/6850275> CF objects returned from methods with "new" or "copy" in their name should be treated as owned

For methods that follow the "fundamental rule" and return Core
Foundation objects, treat those objects as owned by the caller.

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

15 years agoFix silly mistake that was breaking tests. Sorry for any inconvenience.
Eli Friedman [Sun, 3 May 2009 06:04:26 +0000 (06:04 +0000)]
Fix silly mistake that was breaking tests.  Sorry for any inconvenience.

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

15 years agorename some variables, improve comments.
Chris Lattner [Sun, 3 May 2009 05:59:17 +0000 (05:59 +0000)]
rename some variables, improve comments.

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

15 years agorefactor matched operand type checking to happen after the AsmStmt is created,
Chris Lattner [Sun, 3 May 2009 05:55:43 +0000 (05:55 +0000)]
refactor matched operand type checking to happen after the AsmStmt is created,
no functionality change.

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

15 years agoConvert ArgEffects from an std::vector to an ImmutableMap. This will make it much...
Ted Kremenek [Sun, 3 May 2009 05:20:50 +0000 (05:20 +0000)]
Convert ArgEffects from an std::vector to an ImmutableMap.  This will make it much easier to clean up the summary generation logic with annotations.

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

15 years agoAdd diagnostic for r70658.
Eli Friedman [Sun, 3 May 2009 05:02:08 +0000 (05:02 +0000)]
Add diagnostic for r70658.

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

15 years agoAdd Sema support for __builtin_setjmp/__builtin_longjmp. The primary
Eli Friedman [Sun, 3 May 2009 04:46:36 +0000 (04:46 +0000)]
Add Sema support for __builtin_setjmp/__builtin_longjmp.  The primary
reason for adding these is to error out in CodeGen when trying to generate
them instead of silently emitting a call to a non-existent function.

(Note that it is not valid to lower these to setjmp/longjmp; in addition
to that lowering being different from the intent, setjmp and longjmp
require a larger buffer.)

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

15 years agoRename isTrackedObjectType() -> isTrackedObjCObjectType().
Ted Kremenek [Sun, 3 May 2009 04:42:10 +0000 (04:42 +0000)]
Rename isTrackedObjectType() -> isTrackedObjCObjectType().

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

15 years agoWhen a fix-it hint would span multiple lines, don't print it; half a
Douglas Gregor [Sun, 3 May 2009 04:33:32 +0000 (04:33 +0000)]
When a fix-it hint would span multiple lines, don't print it; half a
fix-it hint is much worse than no fix-it hint. (Fixes PR4084).

When we need to truncate a source line to fix in the terminal, make
sure to take the width of the fix-it information into account, too.

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

15 years agoWhen we truncate a source line to fit it within the terminal width,
Douglas Gregor [Sun, 3 May 2009 04:12:51 +0000 (04:12 +0000)]
When we truncate a source line to fit it within the terminal width,
show an ellipsis where we have removed text. An example:

/Users/dgregor/Projects/llvm/tools/clang/test/Misc/message-length.c:18:120:
warning:
      comparison of distinct pointer types ('int *' and 'float *')
  ...a_func_to_call(ip == FloatPointer, ip[ALongIndexName], ...
                    ~~ ^  ~~~~~~~~~~~~

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

15 years agoRespect the COLUMNS environment variable for word-wrapping (so we get
Douglas Gregor [Sun, 3 May 2009 03:52:38 +0000 (03:52 +0000)]
Respect the COLUMNS environment variable for word-wrapping (so we get
word-wrapping by default in Emacs; yay!). Thanks, Daniel.

Use LLVM's System layer rather than calling isatty() directly.

Fix a thinko in printing the indentation string that was causing some
weird output.

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

15 years agoFix invalid error about duplicate declaration of padding bit field in
Daniel Dunbar [Sun, 3 May 2009 01:08:28 +0000 (01:08 +0000)]
Fix invalid error about duplicate declaration of padding bit field in
an interface.

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

15 years agoregion store: make Retrieve() can retrieve embedded array correctly. Also
Zhongxing Xu [Sun, 3 May 2009 00:27:40 +0000 (00:27 +0000)]
region store: make Retrieve() can retrieve embedded array correctly. Also
simplify the retrieve logic.

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

15 years agoRemove ccc from the makefile as well.
Daniel Dunbar [Sat, 2 May 2009 23:50:24 +0000 (23:50 +0000)]
Remove ccc from the makefile as well.

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

15 years agoccc is dead.
Daniel Dunbar [Sat, 2 May 2009 22:13:56 +0000 (22:13 +0000)]
ccc is dead.

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

15 years agoDriver: Treat -m32 and -m64 as "driver-only" arguments.
Daniel Dunbar [Sat, 2 May 2009 22:09:19 +0000 (22:09 +0000)]
Driver: Treat -m32 and -m64 as "driver-only" arguments.
 - In particular, don't forward them to gcc; these participate in the
   selection of the tool chain, which should know how to talk to gcc
   and be fixed if it doesn't.

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

15 years agoDriver: When using the generic gcc tool, pass -m32 or -m64 if we
Daniel Dunbar [Sat, 2 May 2009 21:41:52 +0000 (21:41 +0000)]
Driver: When using the generic gcc tool, pass -m32 or -m64 if we
recognize the architecture.
 - This is an attempt to force gcc to the write target.

 - PR4094.

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

15 years agoDriver: Generate an error when trying to pass an LLVM bc input to a
Daniel Dunbar [Sat, 2 May 2009 20:14:53 +0000 (20:14 +0000)]
Driver: Generate an error when trying to pass an LLVM bc input to a
non-Darwin linker (sorry Gold + LTO-plugin users).

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

15 years agoUse clang to find clang-cc, if it isn't in path.
Daniel Dunbar [Sat, 2 May 2009 20:08:07 +0000 (20:08 +0000)]
Use clang to find clang-cc, if it isn't in path.

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

15 years agowhen creating custom warning diagnostics, do not attempt to map
Chris Lattner [Sat, 2 May 2009 19:34:21 +0000 (19:34 +0000)]
when creating custom warning diagnostics, do not attempt to map
them with -Werror.  Custom diags cannot be mapped, and this makes
-Werror cause a determinstic crash for the checker and other
clients of the custom diagnostics machinery.  rdar://6816191

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

15 years agoretain/release checker: Enhance leak description to say that the bug
Ted Kremenek [Sat, 2 May 2009 19:05:19 +0000 (19:05 +0000)]
retain/release checker: Enhance leak description to say that the bug
occurs in GC mode.

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

15 years agoFix a thinko and a test.
Anders Carlsson [Sat, 2 May 2009 18:36:10 +0000 (18:36 +0000)]
Fix a thinko and a test.

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

15 years agoDragonFly ToolChain definition for driver.
Daniel Dunbar [Sat, 2 May 2009 18:28:39 +0000 (18:28 +0000)]
DragonFly ToolChain definition for driver.
 - Patch by Alex Hornung!

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

15 years agoDowngrade the invalid offsetof error to a warning.
Anders Carlsson [Sat, 2 May 2009 17:45:47 +0000 (17:45 +0000)]
Downgrade the invalid offsetof error to a warning.

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

15 years agoWhen determining whether an expression refers to a bit-field, look
Douglas Gregor [Sat, 2 May 2009 02:18:30 +0000 (02:18 +0000)]
When determining whether an expression refers to a bit-field, look
into the left-hand side of an assignment expression. This completes
most of PR3500; the only remaining part is to deal with the
GCC-specific implementation-defined behavior for "unsigned long" (and
other) bit-fields.

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

15 years agoAdd CFG support for @synchronized. This fixes <rdar://problem/6848820>.
Ted Kremenek [Sat, 2 May 2009 01:49:13 +0000 (01:49 +0000)]
Add CFG support for @synchronized.  This fixes <rdar://problem/6848820>.

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

15 years agoWhen creating a dwarf record type for an objc interface, make sure to propagate
Chris Lattner [Sat, 2 May 2009 01:13:16 +0000 (01:13 +0000)]
When creating a dwarf record type for an objc interface, make sure to propagate
the runtime version number onto it, so that the debugger knows it's an objc
interface, not a C struct.  rdar://6848435

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

15 years agocapture whether optimizations are enabled or not in debug info
Chris Lattner [Sat, 2 May 2009 01:04:13 +0000 (01:04 +0000)]
capture whether optimizations are enabled or not in debug info

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

15 years agoencode the version of the objc runtime into the dwarf compile unit. rdar://6848435,
Chris Lattner [Sat, 2 May 2009 01:00:04 +0000 (01:00 +0000)]
encode the version of the objc runtime into the dwarf compile unit.  rdar://6848435,
several other fixes coming.

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

15 years agoUpdate checker build.
Ted Kremenek [Sat, 2 May 2009 00:42:33 +0000 (00:42 +0000)]
Update checker build.

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

15 years agoAdd another null pointer check test case.
Ted Kremenek [Sat, 2 May 2009 00:41:02 +0000 (00:41 +0000)]
Add another null pointer check test case.

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

15 years agoFix bitfield promotions in several more cases. We don't seem to work hard enough...
Douglas Gregor [Sat, 2 May 2009 00:36:19 +0000 (00:36 +0000)]
Fix bitfield promotions in several more cases. We don't seem to work hard enough at determining whether an expression is a bitfield or not, yet.

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

15 years agoFix crasher in CFG construction when not properly handling ASTs that contain
Ted Kremenek [Sat, 2 May 2009 00:13:27 +0000 (00:13 +0000)]
Fix crasher in CFG construction when not properly handling ASTs that contain
expressions not yet properly handled by the CFGBuilder. This failure resulted in
a null CFGBlock* being used in rare cases (causing a crash).

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

15 years agoWhen -fmessage-length=N is not specified, and if standard error is
Douglas Gregor [Sat, 2 May 2009 00:03:46 +0000 (00:03 +0000)]
When -fmessage-length=N is not specified, and if standard error is
going to a terminal, word-wrap to the length of the terminal.

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

15 years agoexplicitly know that the alignment of Type* is 3 bits.
Chris Lattner [Fri, 1 May 2009 23:47:59 +0000 (23:47 +0000)]
explicitly know that the alignment of Type* is 3 bits.

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

15 years agoAdd Sema checking for __block on vm declarations. Radar 6441502
Mike Stump [Fri, 1 May 2009 23:41:47 +0000 (23:41 +0000)]
Add Sema checking for __block on vm declarations.  Radar 6441502

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

15 years agoAdd another test case found due to an analyzer regression.
Ted Kremenek [Fri, 1 May 2009 23:35:18 +0000 (23:35 +0000)]
Add another test case found due to an analyzer regression.

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

15 years agoMake install target actually work, dependencies FTW.
Daniel Dunbar [Fri, 1 May 2009 23:34:58 +0000 (23:34 +0000)]
Make install target actually work, dependencies FTW.

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

15 years agoWhen printing a source line as part of a diagnostic, the source line
Douglas Gregor [Fri, 1 May 2009 23:32:58 +0000 (23:32 +0000)]
When printing a source line as part of a diagnostic, the source line
might be wider than we're supposed to print. In this case, we try to
select the "important" subregion of the source line, which contains
everything that we want to show (e.g., with underlining and the caret
itself) and tries to also contain some of the context.

From the fantastically long line in the test case, we get an error
message that slices down to this:

message-length.c:18:120: warning: comparison of distinct pointer types
      ('int *' and 'float *')
  a_func_to_call(ip == FloatPointer, ip[ALongIndexName],
                 ~~ ^  ~~~~~~~~~~~~

There are a bunch of gee-it-sounds-good heuristics in here, which seem
to do well on the various simple tests I've thrown at it. However,
we're going to need to look at a bunch more diagnostics to tweak these
heuristics.

This is the second part of <rdar://problem/6711348>. Almost there!

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