Sebastian Redl
ed0f3b021e
Parser support for rvalue references.
...
llvm-svn: 67033
2009-03-15 22:02:01 +00:00
Anders Carlsson
5bd30395b9
(Hopefully) instantiate dependent array types correctly.
...
llvm-svn: 67032
2009-03-15 20:12:13 +00:00
Anders Carlsson
27de6a5e91
Handle static_asserts when instantiating structs.
...
llvm-svn: 67031
2009-03-15 18:44:04 +00:00
Daniel Dunbar
36a3e92521
Don't accept '$' in identifiers in assembler-with-cpp mode.
...
llvm-svn: 67013
2009-03-15 00:11:28 +00:00
Anders Carlsson
54b2698587
Handle dependent types/exprs in static_assert expressions.
...
llvm-svn: 66997
2009-03-14 00:33:21 +00:00
Anders Carlsson
5bbe1d7ba7
More static_assert work. Check that the assert expr is valid and show an error if it's false. Create the declaration and add it to the current context.
...
llvm-svn: 66995
2009-03-14 00:25:26 +00:00
Douglas Gregor
52aba87df7
Check for overflow and signedness problems with template
...
arguments. Eliminates a FIXME.
llvm-svn: 66993
2009-03-14 00:20:21 +00:00
Douglas Gregor
084d855a17
Implement template instantiation for the prefix unary operators. As
...
always, refactored the existing logic to tease apart the parser action
and the semantic analysis shared by the parser and template
instantiation.
llvm-svn: 66987
2009-03-13 23:49:33 +00:00
Mike Stump
5469f29aa9
Do up codegen for function static data and externs in functions in block
...
literals.
llvm-svn: 66984
2009-03-13 23:34:28 +00:00
Daniel Dunbar
94d48e0bd0
Force triple for a couple test cases.
...
llvm-svn: 66974
2009-03-13 22:48:51 +00:00
Chris Lattner
622b1041ca
add a testcase for recursion through blocks pointers, rdar://6676764.
...
llvm-svn: 66965
2009-03-13 22:00:25 +00:00
Chris Lattner
e07ea35817
fix PR3798 by ignoring all diagnostics generated while repreprocessing a file in rewrite macros.
...
llvm-svn: 66961
2009-03-13 21:44:46 +00:00
Douglas Gregor
4b7f3d7344
Devious test-case involved overload resolution and ADL during template instantiation.
...
llvm-svn: 66951
2009-03-13 21:04:12 +00:00
Daniel Dunbar
c178c5f126
Driver: Desensitize test to location of input.
...
llvm-svn: 66950
2009-03-13 21:03:35 +00:00
Douglas Gregor
0950e41b73
Implement template instantiation for several more kinds of expressions:
...
- C++ function casts, e.g., T(foo)
- sizeof(), alignof()
More importantly, this allows us to verify that we're performing
overload resolution during template instantiation, with
argument-dependent lookup and the "cached" results of name lookup from
the template definition.
llvm-svn: 66947
2009-03-13 21:01:28 +00:00
Daniel Dunbar
192f4facac
Driver: Test pipelining for universal builds.
...
llvm-svn: 66942
2009-03-13 20:45:03 +00:00
Ted Kremenek
340fd2dd6e
Fix PR 3677 [retain checker]: custom 'allocWithZone' methods should be allowed
...
to return an owning pointer.
llvm-svn: 66934
2009-03-13 20:27:06 +00:00
Daniel Dunbar
c5a5ac5015
Driver: Fix '-x none' handling.
...
- Enough stuff works now we can test argument parsing & pipelining.
llvm-svn: 66913
2009-03-13 17:57:10 +00:00
Chris Lattner
cda4d7e196
introduce a new -fheinous-gnu-extensions flag that enables really
...
really horrible extensions that are disabled by default but that can
be accepted by -fheinous-gnu-extensions (but which always emit a
warning when enabled).
As our first instance of this, implement PR3788/PR3794, which allows
non-lvalues in inline asms in contexts where lvalues are required. bleh.
llvm-svn: 66910
2009-03-13 17:38:01 +00:00
Ted Kremenek
22358bd681
Add a hack in the analyzer to recover some path-sensitivity at branch
...
conditions. Currently the analyzer does not reason well about
promotions/truncations of symbolic values, so at branch conditions when we see:
if (condition)
and condition is something like a 'short' or 'char', essentially ignore the
promotion to 'int' so that we track constraints on the original symbolic value.
We only ignore the casts if the underlying type has the same or fewer bits as
the converted type.
This fixes:
<rdar://problem/6619921>
llvm-svn: 66899
2009-03-13 16:32:54 +00:00
Steve Naroff
cfb6cf4c02
Reimplement fix for <rdar://problem/6451399> problems with labels and blocks.
...
This solution is much simpler (and doesn't add any per-scope overhead, which concerned Chris).
The only downside is the LabelMap is now declared in two places (Sema and BlockSemaInfo). My original fix tried to unify the LabelMap in "Scope" (which would support nested functions in general). In any event, this fixes the bug given the current language definition. If/when we decide to support GCC style nested functions, this will need to be tweaked.
llvm-svn: 66896
2009-03-13 16:03:38 +00:00
Steve Naroff
846b1ec40f
Remove ActiveScope (revert http://llvm.org/viewvc/llvm-project?view=rev&revision=65694 and http://llvm.org/viewvc/llvm-project?view=rev&revision=66741 ).
...
Will replace with something better today...
llvm-svn: 66893
2009-03-13 15:38:40 +00:00
Ted Kremenek
ec94f08dce
Fix failure reported by Sebastian of test/Analysis/ptr-arith.c when the target
...
is 64-bit. I used his suggestion of doing a direct bitwidth/signedness
conversion of the 'offset' instead of just changing the sign. For more
information, see:
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-March/004587.html
llvm-svn: 66892
2009-03-13 15:35:24 +00:00
Fariborz Jahanian
54e6d924ff
Fix test.
...
llvm-svn: 66856
2009-03-13 00:43:34 +00:00
Fariborz Jahanian
1b074a3eb7
Fixed an ir-gen bug related to strong-cast generation of
...
source being a non-pointer.
llvm-svn: 66854
2009-03-13 00:42:52 +00:00
Mike Stump
a1e619330f
Fix spelling error, and add target triplet to header.
...
llvm-svn: 66853
2009-03-13 00:41:24 +00:00
Mike Stump
39eaa7bc67
When testing with VERBOSE=0, report results in the ISO format. We
...
include the triplet so that people that run multiple targets in
parallel, say i386 and x86_64 can distinguish between the two.
llvm-svn: 66849
2009-03-13 00:21:49 +00:00
Douglas Gregor
6873f9c521
Implement template instantiation for builtin binary operators
...
llvm-svn: 66835
2009-03-12 22:46:12 +00:00
Fariborz Jahanian
36ce7e17d7
Use paropery's setter attribute name as
...
the selector for the property setter.
llvm-svn: 66834
2009-03-12 22:34:11 +00:00
Ted Kremenek
dd772264f4
Fix crash when using TypedViewRegions and ObjCQualifiedIdTypes (TypedViewRegion::getLValueType() was not implemented).
...
llvm-svn: 66830
2009-03-12 22:15:08 +00:00
Douglas Gregor
573c7467df
Straw man for instantiation of expressions. Use it to instantiate the
...
width of bitfields.
I'll be burning this down and replacing it with a properly-dispatched
implementation like the one used for types.
llvm-svn: 66796
2009-03-12 16:53:44 +00:00
Daniel Dunbar
4f495980c4
Add Diagnostic files for Frontend and move a couple errors over.
...
- Notably, clang now exits with an error if it can't find a
file. This flushed out a bug in the CGColorSpace.c test case. :)
llvm-svn: 66789
2009-03-12 10:14:16 +00:00
Zhongxing Xu
ca026916f4
Add comments to test case.
...
llvm-svn: 66760
2009-03-12 01:55:38 +00:00
Douglas Gregor
04e9a03e6f
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.
llvm-svn: 66740
2009-03-11 23:52:16 +00:00
Douglas Gregor
0c88030abd
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.
...
llvm-svn: 66734
2009-03-11 23:00:04 +00:00
Daniel Dunbar
8ce48d8c10
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
llvm-svn: 66713
2009-03-11 22:05:26 +00:00
Steve Naroff
28a531e003
Implement FIXME related to <rdar://problem/6496506> Implement class setter/getter for properties.
...
llvm-svn: 66689
2009-03-11 20:12:18 +00:00
Douglas Gregor
1efa437be6
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.
llvm-svn: 66685
2009-03-11 18:59:21 +00:00
Ted Kremenek
be485b6c7d
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).
llvm-svn: 66679
2009-03-11 18:17:16 +00:00
Douglas Gregor
2689746705
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?
llvm-svn: 66662
2009-03-11 16:48:53 +00:00
Steve Naroff
aa82be2b5b
Fix <rdar://problem/6655054> clang issues bogus error on property usage in a dot-syntax.
...
llvm-svn: 66659
2009-03-11 15:15:01 +00:00
Steve Naroff
1d984fe2bd
Fix <rdar://problem/6578665> user declared setter method should be used when using property syntx.
...
llvm-svn: 66658
2009-03-11 13:48:17 +00:00
Zhongxing Xu
f6b6a39b04
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'.
llvm-svn: 66656
2009-03-11 09:15:38 +00:00
Zhongxing Xu
507202ecb7
Fix crash when LHS of pointer arithmetic is not ElementRegion.
...
llvm-svn: 66649
2009-03-11 07:43:49 +00:00
Chris Lattner
6e76e592a3
Improve the "bad receiver" warning for ObjC message sends to be less confusing.
...
llvm-svn: 66635
2009-03-11 03:47:47 +00:00
Ted Kremenek
0fa538528e
Fix PR 3780: In one code path in BasicValueFactory::getValue() we would not
...
return an unsigned integer for a null pointer value.
llvm-svn: 66630
2009-03-11 02:52:39 +00:00
Ted Kremenek
3f5a85ad06
SimpleConstraintManager doesn't reason about bitwise-constraints on symbolic
...
values. Indicating this in 'canReasonAbout' allows GRExprEngine to recover
path-sensitivity in some cases.
llvm-svn: 66628
2009-03-11 02:29:48 +00:00
Chris Lattner
14311925f2
fix PR3258 by rejecting invalid numeric operands.
...
llvm-svn: 66618
2009-03-11 00:23:13 +00:00
Chris Lattner
3fa25c683f
checking for symbolic operands as well as % at end of string.
...
llvm-svn: 66614
2009-03-11 00:06:36 +00:00
Chris Lattner
a41b847401
reject invalid escape characters in extended-asm strings with a nice diagnostic.
...
llvm-svn: 66605
2009-03-10 23:51:40 +00:00