]> granicus.if.org Git - clang/log
clang
15 years agoCorrect for change of this name in LLVM.
Duncan Sands [Wed, 11 Mar 2009 08:40:02 +0000 (08:40 +0000)]
Correct for change of this name in LLVM.

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

15 years agoFix crash when LHS of pointer arithmetic is not ElementRegion.
Zhongxing Xu [Wed, 11 Mar 2009 07:43:49 +0000 (07:43 +0000)]
Fix crash when LHS of pointer arithmetic is not ElementRegion.

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

15 years agoUpdate checker build.
Ted Kremenek [Wed, 11 Mar 2009 06:11:39 +0000 (06:11 +0000)]
Update checker build.

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

15 years agoRegionStore::getLValueElement: Handle the case where the signedness of the
Ted Kremenek [Wed, 11 Mar 2009 04:04:20 +0000 (04:04 +0000)]
RegionStore::getLValueElement: Handle the case where the signedness of the
offset may be different that the base. Ultimately we need a better solution for
these issues, but this point-by-point fixes are gradually outlining the scope of
the problem.

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

15 years agoAdd utility method to BasicValueFactory to convert an APSInt to one of a different...
Ted Kremenek [Wed, 11 Mar 2009 04:03:24 +0000 (04:03 +0000)]
Add utility method to BasicValueFactory to convert an APSInt to one of a different sign.

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

15 years agoGRExprEngine::ProcessBranch: Don't register a "pretty-stack printer" when the Conditi...
Ted Kremenek [Wed, 11 Mar 2009 03:54:24 +0000 (03:54 +0000)]
GRExprEngine::ProcessBranch: Don't register a "pretty-stack printer" when the Condition is null.

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

15 years agoImprove the "bad receiver" warning for ObjC message sends to be less confusing.
Chris Lattner [Wed, 11 Mar 2009 03:47:47 +0000 (03:47 +0000)]
Improve the "bad receiver" warning for ObjC message sends to be less confusing.

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

15 years agoFix PR 3780: In one code path in BasicValueFactory::getValue() we would not
Ted Kremenek [Wed, 11 Mar 2009 02:52:39 +0000 (02:52 +0000)]
Fix PR 3780: In one code path in BasicValueFactory::getValue() we would not
return an unsigned integer for a null pointer value.

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

15 years agoGRExprEngine: Add pretty-stack trace printing for crashes and assertion failures.
Ted Kremenek [Wed, 11 Mar 2009 02:41:36 +0000 (02:41 +0000)]
GRExprEngine: Add pretty-stack trace printing for crashes and assertion failures.

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

15 years agoSimpleConstraintManager doesn't reason about bitwise-constraints on symbolic
Ted Kremenek [Wed, 11 Mar 2009 02:29:48 +0000 (02:29 +0000)]
SimpleConstraintManager doesn't reason about bitwise-constraints on symbolic
values. Indicating this in 'canReasonAbout' allows GRExprEngine to recover
path-sensitivity in some cases.

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

15 years agoGRExprEngine: For places we might conjure up a new symbol to recover
Ted Kremenek [Wed, 11 Mar 2009 02:24:48 +0000 (02:24 +0000)]
GRExprEngine: For places we might conjure up a new symbol to recover
path-sensitivity, beyond checking to see if the value is "unknown" also check if
the ConstraintManager can handle the SVal. This allows us to recover some
path-sensitivity by actually discarding some information.

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

15 years agoAdd accessor method.
Ted Kremenek [Wed, 11 Mar 2009 02:23:48 +0000 (02:23 +0000)]
Add accessor method.

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

15 years agoAdd accessor method to return a GRStateManager's internal ConstraintManager.
Ted Kremenek [Wed, 11 Mar 2009 02:23:27 +0000 (02:23 +0000)]
Add accessor method to return a GRStateManager's internal ConstraintManager.

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

15 years agoAdded method "canReasonAbout" to ConstraintManager. This method returns true if
Ted Kremenek [Wed, 11 Mar 2009 02:22:59 +0000 (02:22 +0000)]
Added method "canReasonAbout" to ConstraintManager. This method returns true if
a ConstraintManager can usefully reason about the given SVal.

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

15 years agoDisplay the exploded graph before calling BugReporter.FlushReports(). The latter
Ted Kremenek [Wed, 11 Mar 2009 01:42:29 +0000 (01:42 +0000)]
Display the exploded graph before calling BugReporter.FlushReports(). The latter
deletes all registered BugTypes from BugReporter, and thus we need to display
the graph first.

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

15 years agoUse the BugReports in BugReporter to determine the root nodes for "trim-egraph".
Ted Kremenek [Wed, 11 Mar 2009 01:41:22 +0000 (01:41 +0000)]
Use the BugReports in BugReporter to determine the root nodes for "trim-egraph".

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

15 years agoAdd some iterators to BugReporter.
Ted Kremenek [Wed, 11 Mar 2009 01:40:35 +0000 (01:40 +0000)]
Add some iterators to BugReporter.

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

15 years agoUse the right indentation
Anders Carlsson [Wed, 11 Mar 2009 01:37:02 +0000 (01:37 +0000)]
Use the right indentation

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

15 years agoClear all the linetable state in clear(), fixing problems
Chris Lattner [Wed, 11 Mar 2009 01:09:52 +0000 (01:09 +0000)]
Clear all the linetable state in clear(), fixing problems
with "clang t.i s.i" where the .i files contain line markers.
rdar://6667812

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

15 years agofix PR3258 by rejecting invalid numeric operands.
Chris Lattner [Wed, 11 Mar 2009 00:23:13 +0000 (00:23 +0000)]
fix PR3258 by rejecting invalid numeric operands.

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

15 years agoRemove space-break that interrupts one string literal. This is fine in C, but not...
Ted Kremenek [Wed, 11 Mar 2009 00:15:49 +0000 (00:15 +0000)]
Remove space-break that interrupts one string literal.  This is fine in C, but not in TableGen files.

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

15 years agoMore Next objc2's gc ivar layout bitmap work.
Fariborz Jahanian [Wed, 11 Mar 2009 00:07:04 +0000 (00:07 +0000)]
More Next objc2's gc ivar layout bitmap work.
Work in progress.

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

15 years agochecking for symbolic operands as well as % at end of string.
Chris Lattner [Wed, 11 Mar 2009 00:06:36 +0000 (00:06 +0000)]
checking for symbolic operands as well as % at end of string.

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

15 years agoFix typo.
Daniel Dunbar [Wed, 11 Mar 2009 00:06:15 +0000 (00:06 +0000)]
Fix typo.

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

15 years agoposition the caret properly on asm string diagnostics, e.g.:
Chris Lattner [Tue, 10 Mar 2009 23:57:07 +0000 (23:57 +0000)]
position the caret properly on asm string diagnostics, e.g.:

Sema/asm.c:64:9: error: invalid % escape in inline assembly string
  asm("%!" : );   // expected-error {{invalid % escape in inline assembly string}}
      ~~^~

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

15 years agoreject invalid escape characters in extended-asm strings with a nice diagnostic.
Chris Lattner [Tue, 10 Mar 2009 23:51:40 +0000 (23:51 +0000)]
reject invalid escape characters in extended-asm strings with a nice diagnostic.

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

15 years agoDriver: Add host info (add new files).
Daniel Dunbar [Tue, 10 Mar 2009 23:50:58 +0000 (23:50 +0000)]
Driver: Add host info (add new files).

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

15 years agoDriver: Add host info (add new files).
Daniel Dunbar [Tue, 10 Mar 2009 23:50:49 +0000 (23:50 +0000)]
Driver: Add host info (add new files).

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

15 years agoAdd type checking for tentative definitions at the end of the
Douglas Gregor [Tue, 10 Mar 2009 23:43:53 +0000 (23:43 +0000)]
Add type checking for tentative definitions at the end of the
translation unit.

Thread the various declarations of variables via
VarDecl::getPreviousDeclaration.

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

15 years agoDriver: Add host info.
Daniel Dunbar [Tue, 10 Mar 2009 23:41:59 +0000 (23:41 +0000)]
Driver: Add host info.
 - Replace assorted -ccc-host-* options by -ccc-host-triple which is
   more sane.

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

15 years agoadd plumbing to report diagnostics back through sema for malformed asmstrings.
Chris Lattner [Tue, 10 Mar 2009 23:41:04 +0000 (23:41 +0000)]
add plumbing to report diagnostics back through sema for malformed asmstrings.

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

15 years agomove the asm string analysis code out of codegen into common
Chris Lattner [Tue, 10 Mar 2009 23:21:44 +0000 (23:21 +0000)]
move the asm string analysis code out of codegen into common
code where Sema can get to it.  No functionality change.

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

15 years agoPartial fix for PR3310, concerning type-checking for tentative
Douglas Gregor [Tue, 10 Mar 2009 21:58:27 +0000 (21:58 +0000)]
Partial fix for PR3310, concerning type-checking for tentative
definitions. We were rejecting tentative definitions of incomplete
(which is bad), and now we don't.

This fix is partial because we don't do the end-of-translation-unit
initialization for tentative definitions that don't ever have any
initializers specified.

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

15 years agoEmit super class debug info.
Devang Patel [Tue, 10 Mar 2009 21:30:26 +0000 (21:30 +0000)]
Emit super class debug info.

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

15 years agoDriver: Handle magic -ccc- options.
Daniel Dunbar [Tue, 10 Mar 2009 20:52:46 +0000 (20:52 +0000)]
Driver: Handle magic -ccc- options.
 - Follows ccc currently, but this functionality should eventually be
   outside the Driver lib.

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

15 years agoExtend the notion of active template instantiations to include the
Douglas Gregor [Tue, 10 Mar 2009 20:44:00 +0000 (20:44 +0000)]
Extend the notion of active template instantiations to include the
context of a template-id for which we need to instantiate default
template arguments.

In the TextDiagnosticPrinter, don't suppress the caret diagnostic if
we are producing a non-note diagnostic that follows a note diagnostic
with the same location, because notes are (conceptually) a part of the
warning or error that comes before them.

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

15 years agoIf we run into multiple errors within the same template instantiation,
Douglas Gregor [Tue, 10 Mar 2009 18:52:44 +0000 (18:52 +0000)]
If we run into multiple errors within the same template instantiation,
only print the template instantiation backtrace for the first error.

Also, if a base class has failed to type-check during instantiation,
just drop that base class and continue on to check other base classes.

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

15 years agoAdd pretty-printing for class template specializations, e.g.,
Douglas Gregor [Tue, 10 Mar 2009 18:33:27 +0000 (18:33 +0000)]
Add pretty-printing for class template specializations, e.g.,

  'struct A<double, int>'

In the "template instantiation depth exceeded" message, print
"-ftemplate-depth-N" rather than "-ftemplate-depth=N".

An unnamed tag type that is declared with a typedef, e.g.,

  typedef struct { int x, y; } Point;

can be used as a template argument. Allow this, and check that we get
sensible pretty-printing for such things.

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

15 years agoWhen pretty-printing an anonymous tag type that is associated with a typedef, use...
Douglas Gregor [Tue, 10 Mar 2009 18:11:21 +0000 (18:11 +0000)]
When pretty-printing an anonymous tag type that is associated with a typedef, use the name of the typedef rather than <anonymous>

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

15 years agoAdd a notion of "post-diagnostic hooks", which are callbacks attached
Douglas Gregor [Tue, 10 Mar 2009 18:03:33 +0000 (18:03 +0000)]
Add a notion of "post-diagnostic hooks", which are callbacks attached
to a diagnostic that will be invoked after the diagnostic (if it is
not suppressed). The hooks are allowed to produce additional
diagnostics (typically notes) that provide more information. We should
be able to use this to help diagnostic clients link notes back to the
diagnostic they clarify. Comments welcome; I'll write up documentation
and convert other clients (e.g., overload resolution failures) if
there are no screams of protest.

As the first client of post-diagnostic hooks, we now produce a
template instantiation backtrace when a failure occurs during template
instantiation. There's still more work to do to make this output
pretty, if that's even possible.

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

15 years agoir-gen support for class getter/setter call
Fariborz Jahanian [Tue, 10 Mar 2009 18:03:11 +0000 (18:03 +0000)]
ir-gen support for class getter/setter call
using property dot-syntax.

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

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