]> granicus.if.org Git - clang/log
clang
15 years agoDriver: Use standard Diagnostic interface for diagnostics.
Daniel Dunbar [Thu, 12 Mar 2009 08:55:43 +0000 (08:55 +0000)]
Driver: Use standard Diagnostic interface for diagnostics.

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

15 years agoDriver: Fix thinko in Arg::hasArg.
Daniel Dunbar [Thu, 12 Mar 2009 08:45:11 +0000 (08:45 +0000)]
Driver: Fix thinko in Arg::hasArg.

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

15 years agoDriver: '-' is parsed as an input.
Daniel Dunbar [Thu, 12 Mar 2009 08:44:47 +0000 (08:44 +0000)]
Driver: '-' is parsed as an input.

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

15 years agoDriver: Start sketching construction of abstract built actions.
Daniel Dunbar [Thu, 12 Mar 2009 07:58:46 +0000 (07:58 +0000)]
Driver: Start sketching construction of abstract built actions.

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

15 years agoAdd comments.
Zhongxing Xu [Thu, 12 Mar 2009 07:54:17 +0000 (07:54 +0000)]
Add comments.

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

15 years agoDriver: Add information on Driver input/temporary types.
Daniel Dunbar [Thu, 12 Mar 2009 07:40:41 +0000 (07:40 +0000)]
Driver: Add information on Driver input/temporary types.

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

15 years agoDriver: Add Option flags.
Daniel Dunbar [Thu, 12 Mar 2009 05:46:32 +0000 (05:46 +0000)]
Driver: Add Option flags.

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

15 years agoccc: Tweak some group names.
Daniel Dunbar [Thu, 12 Mar 2009 04:50:20 +0000 (04:50 +0000)]
ccc: Tweak some group names.

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

15 years agoDriver: Add definitions for all the gcc options the current ccc
Daniel Dunbar [Thu, 12 Mar 2009 03:55:01 +0000 (03:55 +0000)]
Driver: Add definitions for all the gcc options the current ccc
understands.

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

15 years agoUse getAsRecordType() to get around sugar types.
Zhongxing Xu [Thu, 12 Mar 2009 03:45:35 +0000 (03:45 +0000)]
Use getAsRecordType() to get around sugar types.

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

15 years agoDriver: Tweak option naming/def:
Daniel Dunbar [Thu, 12 Mar 2009 03:42:54 +0000 (03:42 +0000)]
Driver: Tweak option naming/def:
 - Use OPT_ prefix for ids.

 - Reference groups and aliases by shortend id (on the theory that
   this is more readable).

 - Rename the special option ids to more protected names.

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

15 years agoccc: Cleanup arguments a bit; we don't need a separate group for
Daniel Dunbar [Thu, 12 Mar 2009 03:28:55 +0000 (03:28 +0000)]
ccc: Cleanup arguments a bit; we don't need a separate group for
-fblocks, and there were some duplicate options scattered in.

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

15 years agoFix uninitialized use in GetAddrOfGlobalBlock, reenable assert.
Daniel Dunbar [Thu, 12 Mar 2009 03:07:24 +0000 (03:07 +0000)]
Fix uninitialized use in GetAddrOfGlobalBlock, reenable assert.
 - Mike, please verify.

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

15 years agoAdd comments to test case.
Zhongxing Xu [Thu, 12 Mar 2009 01:55:38 +0000 (01:55 +0000)]
Add comments to test case.

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

15 years agoDriver: Reorder arguments in Options.def so option name is first.
Daniel Dunbar [Thu, 12 Mar 2009 01:46:53 +0000 (01:46 +0000)]
Driver: Reorder arguments in Options.def so option name is first.

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

15 years agoDriver: Add ArgList::hasArg, for testing for the presence of an
Daniel Dunbar [Thu, 12 Mar 2009 01:36:44 +0000 (01:36 +0000)]
Driver: Add ArgList::hasArg, for testing for the presence of an
argument matching some Option::ID.

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

15 years agoDriver: Add Option::getId and Option::matches taking an option
Daniel Dunbar [Thu, 12 Mar 2009 01:34:20 +0000 (01:34 +0000)]
Driver: Add Option::getId and Option::matches taking an option
identifier; we will want to use the latter in situations where we just
want to check for a match, but not load options unnecessarily.

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

15 years agoDriver: Add default index (=0) for Arg::getValue and add Arg::claim
Daniel Dunbar [Thu, 12 Mar 2009 01:32:10 +0000 (01:32 +0000)]
Driver: Add default index (=0) for Arg::getValue and add Arg::claim
(will be used to emit "command line argument unused" diagnostics).

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

15 years agoNote some advances in our C++ support
Douglas Gregor [Thu, 12 Mar 2009 00:09:31 +0000 (00:09 +0000)]
Note some advances in our C++ support

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

15 years agoProperly restore ActiveScope when we exit parsing of a block. This
Douglas Gregor [Wed, 11 Mar 2009 23:54:15 +0000 (23:54 +0000)]
Properly restore ActiveScope when we exit parsing of a block. This
should fix the largest problem in <rdar://problem/6669847>.

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

15 years agoFix various problems with matching out-of-line definitions of static
Douglas Gregor [Wed, 11 Mar 2009 23:52:16 +0000 (23:52 +0000)]
Fix various problems with matching out-of-line definitions of static
class members to the corresponding in-class declaration.

Diagnose the erroneous use of 'static' on out-of-line definitions of
class members.

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

15 years agoRemove '[naming convention]' from bug type.
Ted Kremenek [Wed, 11 Mar 2009 23:43:16 +0000 (23:43 +0000)]
Remove '[naming convention]' from bug type.

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

15 years agoadd some spaces :)
Chris Lattner [Wed, 11 Mar 2009 23:09:16 +0000 (23:09 +0000)]
add some spaces :)

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

15 years agoccc: -x assembler-with-cpp was broken for darwin, and it wasn't using
Daniel Dunbar [Wed, 11 Mar 2009 23:07:54 +0000 (23:07 +0000)]
ccc: -x assembler-with-cpp was broken for darwin, and it wasn't using
clang as the preprocessor even when it should.

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

15 years agognu++0x is definitely *not* the default
Gabor Greif [Wed, 11 Mar 2009 23:07:18 +0000 (23:07 +0000)]
gnu++0x is definitely *not* the default

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

15 years agoMove most of the checking from ActOnCXXMemberDeclarator to other, more general routin...
Douglas Gregor [Wed, 11 Mar 2009 23:00:04 +0000 (23:00 +0000)]
Move most of the checking from ActOnCXXMemberDeclarator to other, more general routines. This is a step toward separating the checking logic from Declarators, which in turn is required for template instantiation.

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

15 years agodon't use strtoul on a non-null-terminated string.
Chris Lattner [Wed, 11 Mar 2009 22:52:17 +0000 (22:52 +0000)]
don't use strtoul on a non-null-terminated string.

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

15 years agox86_32 ABI: Don't try and expand structures with bitfields.
Daniel Dunbar [Wed, 11 Mar 2009 22:05:26 +0000 (22:05 +0000)]
x86_32 ABI: Don't try and expand structures with bitfields.
 - This is an ABI incompatiblity, but this is not likely to be a huge
   deal in practice. For now we at least generate self consistent code
   instead of crashing.
 - <rdar://problem/6657601> x86-32 ABI: Bitfields in small structures
   are not passed correctly

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

15 years agoAdd TypedViewRegion::isBoundable() to indicate whether or not the
Ted Kremenek [Wed, 11 Mar 2009 21:57:34 +0000 (21:57 +0000)]
Add TypedViewRegion::isBoundable() to indicate whether or not the
TypedViewRegion has a valid rvalue type. Also renamed instance variable 'T' to
'LvalueType' to make it unambiguous of its purpose.

This fixes some crashes I was seeing after:

http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090309/013771.html

This is because 'isBoundable()' is defined in TypedRegion (the parent class) in
terms of the rvalue type (which could be null), while for TypedViewRegion it
should be defined in terms of the lvalue type.

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

15 years agoCode refactoring. No change in functionality.
Fariborz Jahanian [Wed, 11 Mar 2009 21:42:00 +0000 (21:42 +0000)]
Code refactoring. No change in functionality.

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

15 years agoMore of objc2's ivar layout bitmap (Next: specific).
Fariborz Jahanian [Wed, 11 Mar 2009 20:59:05 +0000 (20:59 +0000)]
More of objc2's ivar layout bitmap (Next: specific).
Work in progress.

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

15 years agoMake sure that we set the access specifier for an instantiated FieldDecl, and that...
Douglas Gregor [Wed, 11 Mar 2009 20:50:30 +0000 (20:50 +0000)]
Make sure that we set the access specifier for an instantiated FieldDecl, and that the aggregate and POD flags for an instantiated class template are updated based on instantiation of a FieldDecl

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

15 years agoEliminate CXXClassMemberWrapper
Douglas Gregor [Wed, 11 Mar 2009 20:25:10 +0000 (20:25 +0000)]
Eliminate CXXClassMemberWrapper

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

15 years agoEliminate CXXClassVarDecl. It doesn't add anything
Douglas Gregor [Wed, 11 Mar 2009 20:22:50 +0000 (20:22 +0000)]
Eliminate CXXClassVarDecl. It doesn't add anything

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

15 years agoAdjust for linkage name change.
Duncan Sands [Wed, 11 Mar 2009 20:15:27 +0000 (20:15 +0000)]
Adjust for linkage name change.

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

15 years agoImplement FIXME related to <rdar://problem/6496506> Implement class setter/getter...
Steve Naroff [Wed, 11 Mar 2009 20:12:18 +0000 (20:12 +0000)]
Implement FIXME related to <rdar://problem/6496506> Implement class setter/getter for properties.

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

15 years agoImplement basic template instantiation for fields. Reshuffle checking
Douglas Gregor [Wed, 11 Mar 2009 18:59:21 +0000 (18:59 +0000)]
Implement basic template instantiation for fields. Reshuffle checking
for FieldDecls so that the parser and the template instantiation make
use of the same semantic checking module.

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

15 years ago'-o' option now supports relative paths.
Ted Kremenek [Wed, 11 Mar 2009 18:20:33 +0000 (18:20 +0000)]
'-o' option now supports relative paths.

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

15 years agoFix StmtIterator bug reported in PR 3780 where a VLA within a DeclGroup would
Ted Kremenek [Wed, 11 Mar 2009 18:17:16 +0000 (18:17 +0000)]
Fix StmtIterator bug reported in PR 3780 where a VLA within a DeclGroup would
not be consulted for its size expression when operator* was called in the
StmtIterator (this resulted in an assertion failure).

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

15 years agoAdd basic, hackish support for instantiation of typedefs in a class
Douglas Gregor [Wed, 11 Mar 2009 16:48:53 +0000 (16:48 +0000)]
Add basic, hackish support for instantiation of typedefs in a class
template. More importantly, start to sort out the issues regarding
complete types and nested-name-specifiers, especially the question of:
when do we instantiate a class template specialization that occurs to
the left of a '::' in a nested-name-specifier?

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

15 years agoAdd parser support for static_assert.
Anders Carlsson [Wed, 11 Mar 2009 16:27:10 +0000 (16:27 +0000)]
Add parser support for static_assert.

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

15 years agoFix <rdar://problem/6655054> clang issues bogus error on property usage in a dot...
Steve Naroff [Wed, 11 Mar 2009 15:15:01 +0000 (15:15 +0000)]
Fix <rdar://problem/6655054> clang issues bogus error on property usage in a dot-syntax.

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

15 years agoFix <rdar://problem/6578665> user declared setter method should be used when using...
Steve Naroff [Wed, 11 Mar 2009 13:48:17 +0000 (13:48 +0000)]
Fix <rdar://problem/6578665> user declared setter method should be used when using property syntx.

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

15 years agoThis test case checks if we get the right rvalue type of a TypedViewRegion.
Zhongxing Xu [Wed, 11 Mar 2009 09:15:38 +0000 (09:15 +0000)]
This test case checks if we get the right rvalue type of a TypedViewRegion.
The ElementRegion's type depends on the array region's rvalue type. If it was
a pointer type, we would get a loc::SymbolVal for '*p'.

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

15 years agoThe RValueType of a TypedViewRegion should be the pointee type.
Zhongxing Xu [Wed, 11 Mar 2009 09:10:39 +0000 (09:10 +0000)]
The RValueType of a TypedViewRegion should be the pointee type.

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

15 years agoDo not stipulate the record type is a definition in BindStruct().
Zhongxing Xu [Wed, 11 Mar 2009 09:07:35 +0000 (09:07 +0000)]
Do not stipulate the record type is a definition in BindStruct().

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

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