]> granicus.if.org Git - clang/log
clang
15 years agoRemove some now-unneeded calls to llvm::errs().flush().
Daniel Dunbar [Tue, 10 Mar 2009 18:00:19 +0000 (18:00 +0000)]
Remove some now-unneeded calls to llvm::errs().flush().

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

15 years agoSimplify SelectorTable::constructSetterName() usage...
Steve Naroff [Tue, 10 Mar 2009 17:24:38 +0000 (17:24 +0000)]
Simplify SelectorTable::constructSetterName() usage...

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

15 years agoAddress Doug's comments wrt the mangler and fix Eli's test case
Anders Carlsson [Tue, 10 Mar 2009 17:07:44 +0000 (17:07 +0000)]
Address Doug's comments wrt the mangler and fix Eli's test case

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

15 years agoMore objc2's gc meta-data work related to ivar layout bitmap.
Fariborz Jahanian [Tue, 10 Mar 2009 16:22:08 +0000 (16:22 +0000)]
More objc2's gc meta-data work related to ivar layout bitmap.
Work in progress.

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

15 years agoupdate this, C headers don't need hacks anymore.
Chris Lattner [Tue, 10 Mar 2009 16:01:44 +0000 (16:01 +0000)]
update this, C headers don't need hacks anymore.

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

15 years agoUpdate analyzer build.
Ted Kremenek [Tue, 10 Mar 2009 07:03:32 +0000 (07:03 +0000)]
Update analyzer build.

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

15 years agoFix PR3682 by just disabling a broken assertion. This check should be
Chris Lattner [Tue, 10 Mar 2009 06:42:37 +0000 (06:42 +0000)]
Fix PR3682 by just disabling a broken assertion.  This check should be
done in sema, and is reflected by the existing PR3258.  In the meantime,
fix PR3682 by disabling a bogus assertion (which doesn't account for +
operands).

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

15 years agoreduce duplication of parsing code between %0 and %x0 and
Chris Lattner [Tue, 10 Mar 2009 06:38:02 +0000 (06:38 +0000)]
reduce duplication of parsing code between %0 and %x0 and
add support for modifiers on named references, like %c[foo].

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

15 years agomove matching of named operands into AsmStmt class. At the same
Chris Lattner [Tue, 10 Mar 2009 06:33:24 +0000 (06:33 +0000)]
move matching of named operands into AsmStmt class.  At the same
time handle + operands in operand counting, fixing asm.c:t7 to
expand into $2 instead of $1.

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

15 years agoreduce nesting, use memchr instead of explicit loop, eliminate a
Chris Lattner [Tue, 10 Mar 2009 06:11:34 +0000 (06:11 +0000)]
reduce nesting, use memchr instead of explicit loop, eliminate a
temporary std::string to fix a fixme.

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

15 years agoExpand %= into ${:uid} so that the code generator emits a unique ID for the
Chris Lattner [Tue, 10 Mar 2009 05:39:21 +0000 (05:39 +0000)]
Expand %= into ${:uid} so that the code generator emits a unique ID for the
asm.  This allows us to properly handle the case when an optimizer duplicates
the asm, such as here:

void bar() {
  int i;
  for (i = 0; i < 3; ++i)
    asm("foo %=" : : "r"(0));
}

we now produce:

_bar:
xorl %eax, %eax
## InlineAsm Start
foo 0
## InlineAsm End
## InlineAsm Start
foo 1
## InlineAsm End
## InlineAsm Start
foo 2
## InlineAsm End
ret

instead of:

_bar:
xorl %eax, %eax
## InlineAsm Start
foo 1
## InlineAsm End
## InlineAsm Start
foo 1
## InlineAsm End
## InlineAsm Start
foo 1
## InlineAsm End
ret

This also fixes a fixme by eliminating a static.

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

15 years agoBugReporter:
Ted Kremenek [Tue, 10 Mar 2009 05:16:17 +0000 (05:16 +0000)]
BugReporter:
- Group control flow and event PathDiagnosticPieces into PathDiagnosticMacroPieces.
- Afterwards, eliminate any PathDiagnosticMacroPieces from a PathDiagnostic that
  contain no informative events.

HTMLDiagnostics:
- Use new information about PathDiagnosticMacroPieces to specially format
  message bubbles for macro expansions containing interesting events.

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

15 years agoAdjust HTML diagnostics CSS to not use "smaller" for font size and instead use
Ted Kremenek [Tue, 10 Mar 2009 05:14:32 +0000 (05:14 +0000)]
Adjust HTML diagnostics CSS to not use "smaller" for font size and instead use
specific point sizes.

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

15 years agoAdd FullSourceLoc::getDecomposedLoc.
Ted Kremenek [Tue, 10 Mar 2009 05:13:43 +0000 (05:13 +0000)]
Add FullSourceLoc::getDecomposedLoc.

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

15 years agoadd some helper methods to AsmStmt and add some comments.
Chris Lattner [Tue, 10 Mar 2009 04:59:06 +0000 (04:59 +0000)]
add some helper methods to AsmStmt and add some comments.

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

15 years agoslightly simplify some code, pull the 'is simple asm' case up in
Chris Lattner [Tue, 10 Mar 2009 04:38:46 +0000 (04:38 +0000)]
slightly simplify some code, pull the 'is simple asm' case up in
ConvertAsmString and shrink it a bit.  No functionality change.

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

15 years agoPathDiagnosticControlFlowPiece:
Ted Kremenek [Tue, 10 Mar 2009 02:50:49 +0000 (02:50 +0000)]
PathDiagnosticControlFlowPiece:
- Correctly set "ControlFlow" kind (fix regression)

PathDiagnosticMacroPiece:
- add method "containsEvent" to determine if a PathDiagnosticMacroPiece
  transitively contains a PathDiagnosticEvent

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

15 years agoHandle "Macro" PathDiagnosticPiece kind when getting string identifier.
Ted Kremenek [Tue, 10 Mar 2009 02:49:29 +0000 (02:49 +0000)]
Handle "Macro" PathDiagnosticPiece kind when getting string identifier.

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

15 years agoForward -ftemplate-depth-<N> to clang's -ftemplate-depth N.
Daniel Dunbar [Tue, 10 Mar 2009 00:35:30 +0000 (00:35 +0000)]
Forward -ftemplate-depth-<N> to clang's -ftemplate-depth N.

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

15 years agoLimit the template instantiation depth to some user-configurable value
Douglas Gregor [Tue, 10 Mar 2009 00:06:19 +0000 (00:06 +0000)]
Limit the template instantiation depth to some user-configurable value
(default: 99). Beyond this limit, produce an error and consider the
current template instantiation a failure.

The stack we're building to track the instantiations will, eventually,
be used to produce instantiation backtraces from diagnostics within
template instantiation. However, we're not quite there yet.

This adds a new Clang driver option -ftemplate-depth=NNN, which should
eventually be generated from the GCC command-line operation
-ftemplate-depth-NNN (note the '-' rather than the '='!). I did not
make the driver changes to do this mapping.

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

15 years agoBackout r66408, we don't want handling of globals to rely on the
Daniel Dunbar [Mon, 9 Mar 2009 23:53:08 +0000 (23:53 +0000)]
Backout r66408, we don't want handling of globals to rely on the
module symbol table. The root problem inspiring this was fixed in
r66316 (and again in r66506).

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

15 years agoAdd a test case that goes with the last commit
Douglas Gregor [Mon, 9 Mar 2009 23:48:53 +0000 (23:48 +0000)]
Add a test case that goes with the last commit

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

15 years agoImplement template instantiation for ClassTemplateSpecializationTypes,
Douglas Gregor [Mon, 9 Mar 2009 23:48:35 +0000 (23:48 +0000)]
Implement template instantiation for ClassTemplateSpecializationTypes,
such as replacing 'T' in vector<T>. There are a few aspects to this:

  - Extend TemplateArgument to allow arbitrary expressions (an
    Expr*), and switch ClassTemplateSpecializationType to store
    TemplateArguments rather than it's own type-or-expression
    representation.

  - ClassTemplateSpecializationType can now store dependent types. In
    that case, the canonical type is another
    ClassTemplateSpecializationType (with default template arguments
    expanded) rather than a declaration (we don't build Decls for
    dependent types).

  - Split ActOnClassTemplateId into ActOnClassTemplateId (called from
    the parser) and CheckClassTemplateId (called from
    ActOnClassTemplateId and InstantiateType). They're smart enough to
    handle dependent types, now.

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

15 years agoUpdate checker build.
Ted Kremenek [Mon, 9 Mar 2009 23:45:57 +0000 (23:45 +0000)]
Update checker build.

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

15 years agoReapply r66316, it got accidentally reverted in r66317.
Daniel Dunbar [Mon, 9 Mar 2009 23:43:07 +0000 (23:43 +0000)]
Reapply r66316, it got accidentally reverted in r66317.

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

15 years agoscan-build: Also look for clang in the same directory as scan-build.
Ted Kremenek [Mon, 9 Mar 2009 23:14:38 +0000 (23:14 +0000)]
scan-build: Also look for clang in the same directory as scan-build.

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

15 years agoretain/release checker: Allow allocations to fail by returning nil.
Ted Kremenek [Mon, 9 Mar 2009 22:46:49 +0000 (22:46 +0000)]
retain/release checker: Allow allocations to fail by returning nil.

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

15 years agoRegionStore::getElementLValue(): Handle the case where the base is a null pointer.
Ted Kremenek [Mon, 9 Mar 2009 22:44:49 +0000 (22:44 +0000)]
RegionStore::getElementLValue(): Handle the case where the base is a null pointer.

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

15 years agoAdd test case for <rdar://problem/6659160>.
Ted Kremenek [Mon, 9 Mar 2009 22:28:18 +0000 (22:28 +0000)]
Add test case for <rdar://problem/6659160>.

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

15 years agoNeXT: Set alignment on a number of ObjC metadata variables (matching llvm-gcc).
Daniel Dunbar [Mon, 9 Mar 2009 22:18:41 +0000 (22:18 +0000)]
NeXT: Set alignment on a number of ObjC metadata variables (matching llvm-gcc).

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

15 years agomove -g option down into rest of codegen section
Chris Lattner [Mon, 9 Mar 2009 22:05:03 +0000 (22:05 +0000)]
move -g option down into rest of codegen section

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

15 years agomove debug info generation flag into CompileOptions.
Chris Lattner [Mon, 9 Mar 2009 22:00:34 +0000 (22:00 +0000)]
move debug info generation flag into CompileOptions.

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

15 years agoupdate project for driver -> frontend rename.
Chris Lattner [Mon, 9 Mar 2009 21:57:09 +0000 (21:57 +0000)]
update project for driver -> frontend rename.

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

15 years agofix PR3768, Clang does -D__STDC_HOSTED__=1, even if -ffreestanding is passed.
Chris Lattner [Mon, 9 Mar 2009 21:50:12 +0000 (21:50 +0000)]
fix PR3768, Clang does -D__STDC_HOSTED__=1, even if -ffreestanding is passed.

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

15 years agoNeXT: Move some routines over to CreateMetadataVar.
Daniel Dunbar [Mon, 9 Mar 2009 21:49:58 +0000 (21:49 +0000)]
NeXT: Move some routines over to CreateMetadataVar.
 - No intended functionality change.

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

15 years agoFix PR3766, a really nasty silent miscompilation case where we emitted
Chris Lattner [Mon, 9 Mar 2009 21:19:16 +0000 (21:19 +0000)]
Fix PR3766, a really nasty silent miscompilation case where we emitted
a warning and then threw away the AST.  While I'm in there, tighten up the
code to actually reject completely bogus cases (sending a message to a
struct).  We still allow sending a message to an int, which doesn't make
sense but GCC allows it and is easy to support.

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

15 years agoImplement property '.' notation on Factory/Class objects. Parser changes aren't very...
Steve Naroff [Mon, 9 Mar 2009 21:12:44 +0000 (21:12 +0000)]
Implement property '.' notation on Factory/Class objects. Parser changes aren't very pretty:-(

This fixes <rdar://problem/6496506> Implement class setter/getter for properties.

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

15 years agoTweak CreateMetadataVar, take the exact alignment instead of relying
Daniel Dunbar [Mon, 9 Mar 2009 20:50:13 +0000 (20:50 +0000)]
Tweak CreateMetadataVar, take the exact alignment instead of relying
on LLVM TargetData.

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

15 years agoMore fix for bitfield ivar meta-data and code gen accessing it.
Fariborz Jahanian [Mon, 9 Mar 2009 20:44:22 +0000 (20:44 +0000)]
More fix for bitfield ivar meta-data and code gen accessing it.
Now, we can actually execute dejagnu test with bitfield ivars
in non-fragile abi mode.

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

15 years agoimplement -Wsystem-headers, eliminating the wierd thing I added for testing.
Chris Lattner [Mon, 9 Mar 2009 20:44:22 +0000 (20:44 +0000)]
implement -Wsystem-headers, eliminating the wierd thing I added for testing.

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

15 years agoTeach GRSimpleVals::EvalNE and GRSimplVals::EvalEQ about TypedRegionViews and
Ted Kremenek [Mon, 9 Mar 2009 20:35:15 +0000 (20:35 +0000)]
Teach GRSimpleVals::EvalNE and GRSimplVals::EvalEQ about TypedRegionViews and
SymbolicRegions. This fixes a serious regression when checking symbolic pointers
against null.

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

15 years agofix PR3764 - A redefinition of a pre-processor macro fails
Chris Lattner [Mon, 9 Mar 2009 20:33:32 +0000 (20:33 +0000)]
fix PR3764 - A redefinition of a pre-processor macro fails

Redefinition checking should ignore the leading whitespace and
start of line flags on the first token of an expansion.

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

15 years agoconvert this to use -verify.
Chris Lattner [Mon, 9 Mar 2009 20:31:39 +0000 (20:31 +0000)]
convert this to use -verify.

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

15 years agorename test
Chris Lattner [Mon, 9 Mar 2009 20:30:53 +0000 (20:30 +0000)]
rename test

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

15 years agoAdd member template "MemRegion::getAs<RegionType>" that dynamically casts a
Ted Kremenek [Mon, 9 Mar 2009 20:28:08 +0000 (20:28 +0000)]
Add member template "MemRegion::getAs<RegionType>" that dynamically casts a
given MemRegion object to a target region type. This differs from dyn_cast<> in
that it also ignores TypedViewRegions.

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

15 years agoRemove some dead spacing. No functionality change.
Ted Kremenek [Mon, 9 Mar 2009 20:26:47 +0000 (20:26 +0000)]
Remove some dead spacing.  No functionality change.

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

15 years agoFix typo in pref commit.
Daniel Dunbar [Mon, 9 Mar 2009 20:16:39 +0000 (20:16 +0000)]
Fix typo in pref commit.

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

15 years agoNeXT: Add CreateMetadataVar utility method to encapsulate creation of
Daniel Dunbar [Mon, 9 Mar 2009 20:09:19 +0000 (20:09 +0000)]
NeXT: Add CreateMetadataVar utility method to encapsulate creation of
Obj-C metadata variables (which generally should be handled the same,
although they aren't currently).
 - No functionality change.

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

15 years agoRevert r66423, which was not the right fix for this issue.
Douglas Gregor [Mon, 9 Mar 2009 20:07:22 +0000 (20:07 +0000)]
Revert r66423, which was not the right fix for this issue.

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

15 years agoccc: Parse -T{bss,data,text}, -iwithsysroot, -specs correctly.
Daniel Dunbar [Mon, 9 Mar 2009 17:43:51 +0000 (17:43 +0000)]
ccc: Parse -T{bss,data,text}, -iwithsysroot, -specs correctly.

Also, fix some test cases.

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

15 years agoFix a little FIXME, thanks to Sebastian
Douglas Gregor [Mon, 9 Mar 2009 16:48:55 +0000 (16:48 +0000)]
Fix a little FIXME, thanks to Sebastian

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

15 years agoMark a non-type template parameter invalid if there was a problem with its type
Douglas Gregor [Mon, 9 Mar 2009 16:46:39 +0000 (16:46 +0000)]
Mark a non-type template parameter invalid if there was a problem with its type

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

15 years agoRename DiagnoseIncompleteType to RequireCompleteType, and update the documentation...
Douglas Gregor [Mon, 9 Mar 2009 16:13:40 +0000 (16:13 +0000)]
Rename DiagnoseIncompleteType to RequireCompleteType, and update the documentation to reflect the fact that we can instantiate templates here

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

15 years agoOnly track integer and pointer values.
Zhongxing Xu [Mon, 9 Mar 2009 09:31:22 +0000 (09:31 +0000)]
Only track integer and pointer values.

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

15 years agoNow we do not retrieve untyped regions.
Zhongxing Xu [Mon, 9 Mar 2009 09:15:51 +0000 (09:15 +0000)]
Now we do not retrieve untyped regions.

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

15 years agodo not warn about -=/=- confusion with macros, thanks to rdogra for a testcase.
Chris Lattner [Mon, 9 Mar 2009 07:11:10 +0000 (07:11 +0000)]
do not warn about -=/=- confusion with macros, thanks to rdogra for a testcase.

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

15 years agolink to blocks dox
Chris Lattner [Mon, 9 Mar 2009 07:03:22 +0000 (07:03 +0000)]
link to blocks dox

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

15 years agoadd some description of the block language extension.
Chris Lattner [Mon, 9 Mar 2009 07:01:20 +0000 (07:01 +0000)]
add some description of the block language extension.

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

15 years agoThe long-rumored blocks implementation document.
Chris Lattner [Mon, 9 Mar 2009 06:57:46 +0000 (06:57 +0000)]
The long-rumored blocks implementation document.

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

15 years agoFix a serious bug in RegionStore: we got the new state with new store from
Zhongxing Xu [Mon, 9 Mar 2009 06:49:50 +0000 (06:49 +0000)]
Fix a serious bug in RegionStore: we got the new state with new store from
Bind() and BindStruct(), but we returned a state with the old store.

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

15 years agoBe sure to never create two functions with the same name, instead arrange to
Mike Stump [Mon, 9 Mar 2009 06:40:26 +0000 (06:40 +0000)]
Be sure to never create two functions with the same name, instead arrange to
reuse the prior one.

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

15 years agoCode refactoring. No functional change.
Fariborz Jahanian [Sun, 8 Mar 2009 20:18:37 +0000 (20:18 +0000)]
Code refactoring. No functional change.

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

15 years agothe macro redefinition ext warning should default to on, to match gcc.
Chris Lattner [Sun, 8 Mar 2009 20:13:45 +0000 (20:13 +0000)]
the macro redefinition ext warning should default to on, to match gcc.

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

15 years agothis test isn't testing anything.
Chris Lattner [Sun, 8 Mar 2009 20:12:34 +0000 (20:12 +0000)]
this test isn't testing anything.

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

15 years agoundefined -> unspecified. Thanks Mike.
Chris Lattner [Sun, 8 Mar 2009 19:52:14 +0000 (19:52 +0000)]
undefined -> unspecified.  Thanks Mike.

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

15 years agoimplement PR3753, warning about comparisons with a string literal.
Chris Lattner [Sun, 8 Mar 2009 19:39:53 +0000 (19:39 +0000)]
implement PR3753, warning about comparisons with a string literal.

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

15 years agoRemove dead clause (we decided not to support protocol qualified 'Class').
Steve Naroff [Sun, 8 Mar 2009 19:04:05 +0000 (19:04 +0000)]
Remove dead clause (we decided not to support protocol qualified 'Class').

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

15 years agoImprovements to private method lookup.
Steve Naroff [Sun, 8 Mar 2009 18:56:13 +0000 (18:56 +0000)]
Improvements to private method lookup.

Patch by Jean-Daniel Dupas. Thanks!

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

15 years agoadd \n characters to the scratch buffer *before* returned tokens.
Chris Lattner [Sun, 8 Mar 2009 08:16:41 +0000 (08:16 +0000)]
add \n characters to the scratch buffer *before* returned tokens.
This prevents caret diagnostics from the scratch buffer from
including other tokens in the scratch buffer that occurred beforei
them.

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

15 years agogeneralize the "end of line" checking logic to stop at any \0 at the
Chris Lattner [Sun, 8 Mar 2009 08:11:22 +0000 (08:11 +0000)]
generalize the "end of line" checking logic to stop at any \0 at the
end of line instead of just the end of buffer.  Scratch buffers contain
embedded \0's between tokens which are logic line separators.  If a
normal text buffer contains \0's, it doesn't make a lot of sense to include
them in the caret diag output anyway.

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

15 years agosimplify some logic by making ScratchBuffer handle the application of trailing
Chris Lattner [Sun, 8 Mar 2009 08:08:45 +0000 (08:08 +0000)]
simplify some logic by making ScratchBuffer handle the application of trailing
\0's to created tokens instead of making all clients do it.  No functionality
change.

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

15 years agoUpdate DeclNodes.def to reflect the move of ObjCCategoryImpl
Chris Lattner [Sun, 8 Mar 2009 07:26:58 +0000 (07:26 +0000)]
Update DeclNodes.def to reflect the move of ObjCCategoryImpl
from being a NamedDecl to being and ObjCImplDecl.  This fixes
some valgrind issues where ObjCCategoryImpl's were being cast
to NamedDecl and then stuck on name lookup datastructures.

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

15 years agoimprove comments for MemberExpr.
Chris Lattner [Sun, 8 Mar 2009 06:56:32 +0000 (06:56 +0000)]
improve comments for MemberExpr.

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

15 years agorefine the "use of unary operator that may be intended as compound assignment (+=)"
Chris Lattner [Sun, 8 Mar 2009 06:51:10 +0000 (06:51 +0000)]
refine the "use of unary operator that may be intended as compound assignment (+=)"
warning to only trigger when there is whitespace or something else after the + as
suggested by Eli.

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

15 years agoadd rdar#
Chris Lattner [Sun, 8 Mar 2009 01:43:34 +0000 (01:43 +0000)]
add rdar#

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

15 years agoMake mangling work with anonymous tag types. Doug, please review
Anders Carlsson [Sat, 7 Mar 2009 23:57:03 +0000 (23:57 +0000)]
Make mangling work with anonymous tag types. Doug, please review

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

15 years agofix test
Chris Lattner [Sat, 7 Mar 2009 23:39:35 +0000 (23:39 +0000)]
fix test

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

15 years agoMangle Objective-C interfaces correctly (where correctly refers to what gcc does)
Anders Carlsson [Sat, 7 Mar 2009 22:03:21 +0000 (22:03 +0000)]
Mangle Objective-C interfaces correctly (where correctly refers to what gcc does)

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

15 years agoMake constant emission for @encode use the common string emission code.
Eli Friedman [Sat, 7 Mar 2009 20:17:55 +0000 (20:17 +0000)]
Make constant emission for @encode use the common string emission code.
This is a bit cleaner, and also "fixes" bad code that compares the
addresses of the string constants.

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

15 years agocorrect bitfield ivar offset in ivar meta-data.
Fariborz Jahanian [Sat, 7 Mar 2009 19:43:20 +0000 (19:43 +0000)]
correct bitfield ivar offset in ivar meta-data.
(objc abi specific).

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

15 years agoFix warnings in build on clang-x86_64-freebsd buildbot.
Mike Stump [Sat, 7 Mar 2009 18:35:41 +0000 (18:35 +0000)]
Fix warnings in build on clang-x86_64-freebsd buildbot.

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

15 years agoMangle param names with .arg. only.
Sanjiv Gupta [Sat, 7 Mar 2009 18:09:52 +0000 (18:09 +0000)]
Mangle param names with .arg. only.

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

15 years agoFixup our uses of various linkages to match how llvm now works. I think they are all
Mike Stump [Sat, 7 Mar 2009 16:33:28 +0000 (16:33 +0000)]
Fixup our uses of various linkages to match how llvm now works.  I think they are all
correct, but an extra set of ObjC eyes would be good.

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

15 years agoIf someone could figure out this is necessary, that would be good.
Mike Stump [Sat, 7 Mar 2009 16:32:25 +0000 (16:32 +0000)]
If someone could figure out this is necessary, that would be good.

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

15 years agoFix to account for default support for blocks. Once we have enough
Mike Stump [Sat, 7 Mar 2009 15:34:10 +0000 (15:34 +0000)]
Fix to account for default support for blocks.  Once we have enough
testing to to be sure it all works, we'll rip out all the unsupported
code.

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

15 years agoFix typo, need parens.
Mike Stump [Sat, 7 Mar 2009 14:53:10 +0000 (14:53 +0000)]
Fix typo, need parens.

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

15 years agoSome struct/class mismatch fixes, to silence MSVC warnings.
Sebastian Redl [Sat, 7 Mar 2009 12:16:37 +0000 (12:16 +0000)]
Some struct/class mismatch fixes, to silence MSVC warnings.

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

15 years agoImprove error messages on bad warning options.
Sebastian Redl [Sat, 7 Mar 2009 12:09:25 +0000 (12:09 +0000)]
Improve error messages on bad warning options.

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

15 years agoDon't discard increment/decrement on function pointers. It's kind of
Eli Friedman [Sat, 7 Mar 2009 07:01:10 +0000 (07:01 +0000)]
Don't discard increment/decrement on function pointers.  It's kind of
difficult to come up with a testcase because the code generation for this
construct is broken.

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

15 years agoRemove last FIXME for block literal codegen that I know about and turn
Mike Stump [Sat, 7 Mar 2009 06:16:52 +0000 (06:16 +0000)]
Remove last FIXME for block literal codegen that I know about and turn
on all the new code by default.  There is still plenty of testing to
do and issues I'm sure need resolving.  Let me know if you find
anything.

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

15 years agoRemove some FIXMEs for block literals that should be close to working.
Mike Stump [Sat, 7 Mar 2009 06:04:31 +0000 (06:04 +0000)]
Remove some FIXMEs for block literals that should be close to working.

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

15 years agoBack out the patch in r66302, and re-fix it properly. We assume for
Eli Friedman [Sat, 7 Mar 2009 03:57:15 +0000 (03:57 +0000)]
Back out the patch in r66302, and re-fix it properly.  We assume for
performance that the type of the returned llvm::Value for an expression
matches the converted type of the clang::Expr; mismatches will cause all
sorts of errors and silent miscompilations.

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

15 years agocodegen support for dispose helpers for block literals.
Mike Stump [Sat, 7 Mar 2009 02:53:18 +0000 (02:53 +0000)]
codegen support for dispose helpers for block literals.

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

15 years agoCodegen support for copy helpers for block literals.
Mike Stump [Sat, 7 Mar 2009 02:35:30 +0000 (02:35 +0000)]
Codegen support for copy helpers for block literals.

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

15 years agoRevert my last couple patches until I can get them to not make the tests fail.
Ted Kremenek [Sat, 7 Mar 2009 01:47:10 +0000 (01:47 +0000)]
Revert my last couple patches until I can get them to not make the tests fail.

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

15 years agoCleanup/comment IdentifierInfo::get.
Daniel Dunbar [Sat, 7 Mar 2009 01:42:16 +0000 (01:42 +0000)]
Cleanup/comment IdentifierInfo::get.
 - Shaves off a few instructions on x86_64.

One notable change: this intentionally stops setting the II->Entry
field of IdentifierInfo's retrieved by the ExternalLookup method. This
is to maintain the invariant that .getName() has a constant value for
any given IdentifierInfo. IRgen currently relies on this; which is
quite questionable but will be cleaned up in time.

Apologies for the lack of a test case; there really isn't a good way
to make one. As IRgen will eventually be fixed to not rely on this, we
can survive without one.

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

15 years agoTeach Diagnostic about Selector.
Ted Kremenek [Sat, 7 Mar 2009 01:36:13 +0000 (01:36 +0000)]
Teach Diagnostic about Selector.

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

15 years agoSelector: (changes made after discussing this more with Steve Naroff)
Ted Kremenek [Sat, 7 Mar 2009 01:22:02 +0000 (01:22 +0000)]
Selector: (changes made after discussing this more with Steve Naroff)
- Make Selector::getAsIdentifierInfo() private.  Using IdentifierInfo* in
  Selector is an implementation detail that clients shouldn't think about.
- Modify diagnostic emission in Sema::ProcessPropertyDecl to not use
  Selector::getAsIdentifierInfo() (which could crash when IdentifierInfo* is
  null) and instead use Selector::getAsString().
- Tidy up Selector::getAsString() implementation.

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

15 years agoCreate PathDiagnosticPiece subclasses PathDiagnosticEventPiece and
Ted Kremenek [Fri, 6 Mar 2009 23:58:11 +0000 (23:58 +0000)]
Create PathDiagnosticPiece subclasses PathDiagnosticEventPiece and
PathDiagnosticControlFlowPiece to distinguish (in the class hierarchy) between
events and control-flow diagnostic pieces. Clients must now use these directly
when constructing PathDiagnosticPieces.

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

15 years agoTweak warning text from the last commit
Douglas Gregor [Fri, 6 Mar 2009 23:46:13 +0000 (23:46 +0000)]
Tweak warning text from the last commit

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