Anders Carlsson
115d6bfcac
Whoops, did not mean to commit this
...
llvm-svn: 79201
2009-08-16 20:29:59 +00:00
Anders Carlsson
a471db0dd4
Store the delete operator for delete expressions.
...
llvm-svn: 79200
2009-08-16 20:29:29 +00:00
Fariborz Jahanian
d262eda6fc
Patch toward synthesizing non-trivial destructors. WIP
...
llvm-svn: 79199
2009-08-16 19:36:17 +00:00
Mike Stump
996576f3aa
Refine vbase offset calculations. WIP.
...
llvm-svn: 79198
2009-08-16 19:04:13 +00:00
Anders Carlsson
3b848940d7
Only do this for initializers of course.
...
llvm-svn: 79197
2009-08-16 17:54:29 +00:00
Anders Carlsson
b80760bd78
Destroy bound temporaries.
...
llvm-svn: 79196
2009-08-16 17:50:25 +00:00
Chris Lattner
2ba5ca9d4f
Improve the diagnostic emitted when an unused ObjC property getter
...
is found. Instead of complaining about a generic "unused expr",
emit:
t.m:7:3: warning: property access result unused - getters should not have side effects
While objc property getters *could* have side effects, according to
the language best practices, they *shouldn't*. Hopefully the
diagnostic now gets this across.
llvm-svn: 79192
2009-08-16 16:57:27 +00:00
Chris Lattner
d37f61c1c6
fix my previous commit.
...
llvm-svn: 79191
2009-08-16 16:51:50 +00:00
Chris Lattner
d8b800ad31
This is an attempt to improve loc info for 'unused result' expression
...
warnings, but it fails because we don't have the location of the .
and I don't understand ObjCKVCRefExpr. I'll revisit this later.
llvm-svn: 79190
2009-08-16 16:45:18 +00:00
Anders Carlsson
5b106a7545
Add an IsInitializer flag to EmitAnyExpr. This is used to prevent temporaries from being destroyed when they're bound to a reference variable.
...
llvm-svn: 79179
2009-08-16 07:36:22 +00:00
Anders Carlsson
157c321b7c
No need to append extra padding now that we don't create packed structs for simple cases like the constant string.
...
llvm-svn: 79178
2009-08-16 05:55:31 +00:00
Anders Carlsson
250aada4b9
AddInitializerToDecl can't take a FullExprArg. Make it take an ExprArg, and create the CXXExprWithTemporaries before setting the initializer on the VarDecl.
...
llvm-svn: 79176
2009-08-16 05:13:48 +00:00
Anders Carlsson
e80ccac2cb
Call MaybeBindToTemporary for overloaded binary and unary operators.
...
llvm-svn: 79173
2009-08-16 04:11:06 +00:00
Anders Carlsson
1c83debc36
Call MaybeBindToTemporary when constructing functino call operator calls.
...
llvm-svn: 79172
2009-08-16 03:53:54 +00:00
Anders Carlsson
8c84c206d9
Add MaybeBindToTemporary calls for member call expressions.
...
llvm-svn: 79171
2009-08-16 03:42:12 +00:00
Anders Carlsson
f898401305
Make sure to call MaybeBindToTemporary when creating CallExprs.
...
llvm-svn: 79168
2009-08-16 03:06:32 +00:00
Mike Stump
94bc52c03b
Use the -NEXT feature of FileCheck.
...
llvm-svn: 79166
2009-08-16 02:40:14 +00:00
Anders Carlsson
bc4c107836
Move builtin call checking out into a separate function, make CheckFunctionCall and CheckBlockCall return bool instead. No intended functionality change.
...
llvm-svn: 79157
2009-08-16 01:56:34 +00:00
Mike Stump
22ea1f8a30
Cleanups and fixups for calculating the virtual base offsets. WIP.
...
llvm-svn: 79156
2009-08-16 01:46:26 +00:00
Anders Carlsson
f86a8d1030
BuildCXXConstructExpr doesn't need to take an ASTContext.
...
llvm-svn: 79149
2009-08-15 23:41:35 +00:00
Eli Friedman
ea56303b09
Add an explicit constructor to ActiveTemplateInstantiation which
...
initializes all the members; this fixes a valgrind error in the
regression tests.
llvm-svn: 79148
2009-08-15 22:50:33 +00:00
Anders Carlsson
445af45c29
Add a simple test for temporaries.
...
llvm-svn: 79147
2009-08-15 22:30:50 +00:00
Eli Friedman
c80ca68423
Fix test failure due to uninitialized member.
...
llvm-svn: 79145
2009-08-15 22:23:00 +00:00
Eli Friedman
c96d4963eb
Implement __is_empty. Patch by Sean Hunt.
...
llvm-svn: 79143
2009-08-15 21:55:26 +00:00
Eli Friedman
e99c9c5b60
Ignore -Wno-import.
...
llvm-svn: 79128
2009-08-15 19:28:53 +00:00
Eli Friedman
da8d4def72
Don't perform integer promotions on the operand to a cast; this
...
simplifies the AST, and can matter in some rare cases involving
casts to vector types. Patch by Enea Zaffanella.
llvm-svn: 79126
2009-08-15 19:02:19 +00:00
Fariborz Jahanian
0aed0225b4
Improved on ir-gen for synthesis of non-trivial default
...
constructor body whose class has non-static data-members which
required non-trivial construction.
llvm-svn: 79125
2009-08-15 18:55:17 +00:00
Eli Friedman
2be79b3608
Add an additional C++ hardcoded search path.
...
llvm-svn: 79075
2009-08-15 03:45:14 +00:00
Eli Friedman
b360412582
Make test more precise.
...
llvm-svn: 79074
2009-08-15 03:40:49 +00:00
Eli Friedman
c0f6d44ef6
Make test a bit more precise.
...
llvm-svn: 79073
2009-08-15 03:35:55 +00:00
Zhongxing Xu
e1190f73a9
Extend the ProgramPoint to include the context information LocationContext,
...
which is either a stack frame context of the function or a local scope
context.
llvm-svn: 79072
2009-08-15 03:17:38 +00:00
Eli Friedman
04fddf0d1f
Fix for PR4721: adjust CodeGen and ASTContext so that we have a
...
consistent model for handling size expressions for VLAs.
The model is essentially as follows: VLA types own their associated
expression. In some cases, we need to create multiple VLA types to
represent a given VLA (for canonical types, or qualifiers on array types,
or type merging). If we need to create multiple types based off of
the same VLA declaration, we use the new refcounting functionality so they can
all own the expression. The VLASizeMap in CodeGenFunction then uses the size
expression to identify the group of VLA types based off of the same original
declaration.
I'm not particularly attached to the VLA types owning the expression,
but we're stuck with at least until someone comes up with a way
to walk the VLA expressions for a declaration.
I did the parallel fix in ASTContext for DependentSizedArrayType, but I
haven't really looked closely at it, so there might still be issues
there.
I'll clean up the code duplication in ASTContext in a followup commit.
llvm-svn: 79071
2009-08-15 02:50:32 +00:00
John McCall
deb8448690
Disable all recognition of main() in -ffreestanding. Addresses bug #4720 .
...
llvm-svn: 79070
2009-08-15 02:09:25 +00:00
Ted Kremenek
08479ae7fe
Change handling of attribute 'malloc' to only accept the attribute on function
...
declarations (and not function pointers). This is consistent with GCC. Accepting
this attribute on function pointers means that the attribute should be treated
as a type qualifier, which apparently is not what GCC does. We obviously can
change this later should we desire to enhance the 'malloc' attribute in this
way.
llvm-svn: 79060
2009-08-15 00:51:46 +00:00
Chris Lattner
8dc7626f9c
minor cleanups for VLA stuff.
...
llvm-svn: 79059
2009-08-15 00:03:43 +00:00
Chris Lattner
19efdd67dd
use GetVLASize instead of accessing VLASizeMap directly, this gets an assert if
...
VLASize isn't populated for the type yet.
llvm-svn: 79057
2009-08-14 23:43:22 +00:00
Benjamin Kramer
312fde6420
lit: flush stdout in no-fancy-progress-bar mode as well.
...
llvm-svn: 79056
2009-08-14 23:34:45 +00:00
Ted Kremenek
8d091dbe13
Add more attribute 'malloc' test cases involving function pointers.
...
llvm-svn: 79055
2009-08-14 22:06:01 +00:00
Ted Kremenek
f22c410efa
Per Eli Friedman's feedback, handle attribute 'malloc' being applied to
...
declarations of function pointers.
llvm-svn: 79053
2009-08-14 22:03:27 +00:00
Fariborz Jahanian
2e4a46b745
objc2's foreach statement's selector type can be
...
a block pointer too.
llvm-svn: 79050
2009-08-14 21:53:27 +00:00
Devang Patel
d4bbb08946
Do now overflow while calulating upper bound for zero sized array.
...
llvm-svn: 79043
2009-08-14 20:57:45 +00:00
Ted Kremenek
026d201eca
This test case does not need to include 'stdlib.h'.
...
llvm-svn: 79042
2009-08-14 20:53:10 +00:00
Ted Kremenek
420d9a7a5e
Use 'dyn_cast' instead of a check for a function declaration followed by a
...
'cast'.
llvm-svn: 79041
2009-08-14 20:51:58 +00:00
Ted Kremenek
527042b5a9
Improve Sema's handling of attribute 'malloc' to reject the attribute when
...
attaching to Objective-C methods (which mirrors GCC's behavior) and to allow the
return type of the function to be an Objective-C pointer or Block pointer (which
GCC also accepts).
Along the way, add 'const' to some of the pointer arguments of various utility
functions...
llvm-svn: 79040
2009-08-14 20:49:40 +00:00
Fariborz Jahanian
42af5ba7b7
ir-gen for generation of trvial copy constructor
...
call.
llvm-svn: 79034
2009-08-14 20:11:43 +00:00
Anders Carlsson
e827123f08
Make the CXXDefaultArgExpr constructor protected and add a static Create function.
...
llvm-svn: 79013
2009-08-14 18:30:22 +00:00
Ted Kremenek
d0d7256b8f
Pass '-Wno-' options to clang-cc. This fixes <rdar://problem/6943988>.
...
llvm-svn: 79011
2009-08-14 18:20:50 +00:00
Fariborz Jahanian
83b000c713
Fixed a regression in deciding when to issue warning on properties which
...
implement NSCopying protocol in GC mode.
llvm-svn: 79008
2009-08-14 18:06:25 +00:00
Ted Kremenek
bc16b4e211
Update/add links to developer meeting.
...
llvm-svn: 79005
2009-08-14 17:11:34 +00:00
Daniel Dunbar
f944cc5347
Fix a few typos.
...
llvm-svn: 78991
2009-08-14 04:43:04 +00:00
Shantonu Sen
4a7b937c4b
PR4715
...
-Wno-error disables WarningsAsErrors instead of
mistakenly being treated like -Werror
llvm-svn: 78987
2009-08-14 04:07:15 +00:00
Anders Carlsson
5d67a97513
Fix spacing
...
llvm-svn: 78981
2009-08-14 02:39:47 +00:00
John McCall
58de35804b
Support friend declarations in templates and test that argdep lookup
...
still works.
llvm-svn: 78979
2009-08-14 02:03:10 +00:00
Mike Stump
5aa7855e3a
Testcase for a recent checkin.
...
llvm-svn: 78974
2009-08-14 01:50:51 +00:00
Mike Stump
c4b7afed0f
Testcase for recent checkin.
...
llvm-svn: 78973
2009-08-14 01:48:56 +00:00
Mike Stump
7ba9c8752c
Testcase for a recent checkin.
...
llvm-svn: 78972
2009-08-14 01:46:56 +00:00
Mike Stump
bcf756cbac
Deconflate virtual base offsets from non-virtual base offsets.
...
Deconflate a virtual base primary from a non-virtual base.
llvm-svn: 78971
2009-08-14 01:44:03 +00:00
Fariborz Jahanian
92b3f47de2
Fixed a bug in ir-gen for copy assignment synthesis.
...
Fixed a bug when evaluating those copy-assignments
which need by lazily syntheized. A test case
for these.
llvm-svn: 78965
2009-08-14 00:01:54 +00:00
Mike Stump
9a1090a399
Add testcase for recent work.
...
llvm-svn: 78959
2009-08-13 23:33:29 +00:00
Owen Anderson
c36edfede5
Update for LLVM API change.
...
llvm-svn: 78957
2009-08-13 23:27:53 +00:00
Mike Stump
590a7c780c
We can't avoid doing the work to find all the indirect primary virtual
...
base classes as we'll need that to layout the virtual bases...
llvm-svn: 78954
2009-08-13 23:26:06 +00:00
Mike Stump
c2f591b1e6
Refine vtable layout for virtual bases and keep better track of
...
primaries. WIP.
llvm-svn: 78950
2009-08-13 22:53:07 +00:00
Owen Anderson
41a750271b
Update for LLVM API change.
...
llvm-svn: 78946
2009-08-13 21:57:51 +00:00
Fariborz Jahanian
3d693b22df
Adds testing of copy assignment of anonymous union
...
data members.
llvm-svn: 78943
2009-08-13 21:47:21 +00:00
Fariborz Jahanian
89d01eb3e4
More complete test for my previous patch.
...
llvm-svn: 78941
2009-08-13 21:38:50 +00:00
Fariborz Jahanian
4985b33fd7
Patch to force synthesis of copy assignment operator
...
function in the order according to c++03. ir-gen
for copy assignment in the trivial case and the first
test case.
llvm-svn: 78938
2009-08-13 21:09:41 +00:00
Mike Stump
2631d8c517
Minor cleanups.
...
llvm-svn: 78927
2009-08-13 18:39:54 +00:00
Mike Stump
1300754fdd
Prep for vbase layout refinements. WIP.
...
llvm-svn: 78882
2009-08-13 02:02:14 +00:00
Daniel Dunbar
e5515289fa
Update test
...
llvm-svn: 78877
2009-08-13 01:27:45 +00:00
Ryan Flynn
90964523f6
change cast to dyn_cast because d may not be a FunctionDecl
...
llvm-svn: 78876
2009-08-13 01:19:23 +00:00
Fariborz Jahanian
9b630c3040
Minor refactoring of copy assign operator ir-gen. SWIP.
...
llvm-svn: 78875
2009-08-13 00:53:36 +00:00
Mike Stump
6bb66bbd06
Refine virtual base layout. WIP.
...
llvm-svn: 78873
2009-08-13 00:34:14 +00:00
Ryan Flynn
a8fae2ebf4
change a dyn_cast to cast
...
llvm-svn: 78862
2009-08-12 23:36:28 +00:00
Fariborz Jahanian
bbd5e8c2cf
More toward synthesizing copy assignments. SWIP.
...
llvm-svn: 78861
2009-08-12 23:34:46 +00:00
Mike Stump
b661738203
Cleanup.
...
llvm-svn: 78858
2009-08-12 23:25:18 +00:00
Mike Stump
938f15b033
Refactor. WIP. Eventually, this will all go into a vtable builder class.
...
llvm-svn: 78857
2009-08-12 23:14:12 +00:00
Mike Stump
480212253a
Cleanup.
...
llvm-svn: 78855
2009-08-12 23:03:28 +00:00
Mike Stump
82165efbc4
Refactor.
...
llvm-svn: 78854
2009-08-12 23:00:59 +00:00
Mike Stump
dc94d3fd27
Refactor.
...
llvm-svn: 78851
2009-08-12 22:34:12 +00:00
Mike Stump
cb2752bb5d
Remove another done audit FIXME.
...
llvm-svn: 78847
2009-08-12 22:10:00 +00:00
Mike Stump
aa08da7906
Refactor a bit and remove some FIXME audit markers, now that the code
...
has been audited for correctness.
llvm-svn: 78846
2009-08-12 22:06:55 +00:00
Mike Stump
6f3793b406
Refine primary vbase selection ordering. WIP.
...
llvm-svn: 78844
2009-08-12 21:50:08 +00:00
Fariborz Jahanian
de7d4c264a
Patch for synthesizing copy assignment operator.
...
WIP.
llvm-svn: 78841
2009-08-12 21:14:35 +00:00
Mike Stump
9deb22b850
Improve the secondary vtables to not include vbase offsets. WIP.
...
llvm-svn: 78831
2009-08-12 18:50:26 +00:00
Fariborz Jahanian
887cd6a8eb
error on property of objc interface type instead of crashing
...
llvm-svn: 78826
2009-08-12 18:17:53 +00:00
Chris Lattner
91f5ff6bce
improve path handling, patch by Baptiste Lepilleur!
...
llvm-svn: 78824
2009-08-12 17:50:39 +00:00
Mike Stump
cecfe61cd1
Refine vtable building for the secondary vtables to exclude yet more
...
cases where a virtual base was already used as a primary base class.
WIP.
llvm-svn: 78820
2009-08-12 17:42:21 +00:00
Chris Lattner
859c37a5d9
use the new llvm::Triple parsing stuffola for handling darwin version #'s.
...
llvm-svn: 78794
2009-08-12 06:24:27 +00:00
Nate Begeman
4874592208
Transition the PCH support for ShuffleVectorExpr over to ASTContext allocation
...
llvm-svn: 78783
2009-08-12 02:28:50 +00:00
Zhongxing Xu
0d375cdcb1
More cleanups.
...
llvm-svn: 78782
2009-08-12 02:28:32 +00:00
Zhongxing Xu
ccffe0953e
Remove redundant forward declarations.
...
llvm-svn: 78781
2009-08-12 02:23:28 +00:00
Nate Begeman
f485fb55d8
Fix a fixme by allocating ShuffleVectorExprs in the Context
...
llvm-svn: 78780
2009-08-12 02:10:25 +00:00
Dan Gohman
b321039271
Use the new nsw form of add for signed integer addition.
...
llvm-svn: 78765
2009-08-12 01:16:29 +00:00
Fariborz Jahanian
853d21a18a
Warn on use of property dot syntax when unused.
...
llvm-svn: 78760
2009-08-12 00:45:33 +00:00
Dan Gohman
43b4484f87
Use the inbounds variant of getelementptr for common pointer arithmetic.
...
llvm-svn: 78756
2009-08-12 00:33:55 +00:00
Anders Carlsson
0738468322
Add some information about temporaries to the statement dumper.
...
llvm-svn: 78754
2009-08-12 00:21:52 +00:00
Benjamin Kramer
b3788a24c6
Rename macro to avoid a name clash on FreeBSD.
...
llvm-svn: 78741
2009-08-11 22:46:25 +00:00
Dan Gohman
1cebe56735
Remove the hack that turns sdiv by a power of 2 to ashr, and
...
use the new "exact" sdiv to allow LLVM optimization to perform
this transformation.
llvm-svn: 78739
2009-08-11 22:40:09 +00:00
Benjamin Kramer
854d7dec5a
Add newline at end of file.
...
llvm-svn: 78735
2009-08-11 22:33:06 +00:00
Fariborz Jahanian
3f8917abf6
Patch to warn if a property which is 'assign' by default
...
may not implement NSCopying protocol in -fobjc-gc[-only] mode.
llvm-svn: 78726
2009-08-11 22:02:25 +00:00
John McCall
2658c4e2d9
Add a FriendClassDecl type for holding declarations of friend types in
...
the AST, and create such declarations.
llvm-svn: 78719
2009-08-11 21:13:21 +00:00
Chris Lattner
66a388b859
merge two tests.
...
llvm-svn: 78705
2009-08-11 20:08:52 +00:00
Chris Lattner
f1c9797ffa
Fix rdar://7126285: don't warn on unused ObjC property access
...
that uses "dot syntax" since it might have a side effect.
llvm-svn: 78704
2009-08-11 20:08:03 +00:00
Fariborz Jahanian
b2197042b8
ir-gen support for anonymous union data member
...
copying in copy constructors and used in
default constructor's initializer list.
llvm-svn: 78700
2009-08-11 18:49:54 +00:00
Daniel Dunbar
d362857f4c
Update test case.
...
llvm-svn: 78699
2009-08-11 18:37:40 +00:00
Benjamin Kramer
9cd050ab07
LLVMContext is a class now.
...
llvm-svn: 78691
2009-08-11 17:46:57 +00:00
Douglas Gregor
2168a9f25f
Fix DISABLE_SMART_POINTERS build
...
llvm-svn: 78674
2009-08-11 15:56:57 +00:00
John McCall
d1e9d835f3
Argument-dependent lookup for friend declarations. Add a new decl type,
...
FriendFunctionDecl, and create instances as appropriate.
The design of FriendFunctionDecl is still somewhat up in the air; you can
befriend arbitrary types of functions --- methods, constructors, etc. ---
and it's not clear that this representation captures that very well.
We'll have a better picture when we start consuming this data in access
control.
llvm-svn: 78653
2009-08-11 06:59:38 +00:00
Douglas Gregor
a16548e301
Refactor the template-instantiation logic for expressions into a
...
generic tree transformation (also used for recanonicalization) and a
small amount of template-instantiation-specific logic.
llvm-svn: 78645
2009-08-11 05:31:07 +00:00
Argyrios Kyrtzidis
ae438f8c03
Check whether a tag was defined in a C++ condition declaration using GetTypeForDeclarator.
...
llvm-svn: 78644
2009-08-11 05:20:41 +00:00
Mike Stump
78696a70bf
Implement more of the inductive case for vtable layout involving
...
virtual base primaries and improve the layout of classes with virtual
bases. WIP.
Hey, I've decided I want a change to FileCheck, I need to ensure that
the group is together, nothing in between. Can we change it to check
the match line is from the line immediately following the last matched
line, if the source for the matched line is immediately after the
source for the previously matched line?
// CHECK: 1
// CHECK: 2
// CHECK: 3
// CHECK: 4
// CHECK: 5
// CHECK: 6
would require 1 2 and 3 to be continuous in the output, and 4 5 and 6
to be continuous.
llvm-svn: 78638
2009-08-11 04:03:59 +00:00
Fariborz Jahanian
4898990524
Fix an indentation.
...
llvm-svn: 78624
2009-08-10 23:59:59 +00:00
Fariborz Jahanian
296584b2a9
Support for anonymous union in ctor's initializer and
...
bunch of FIXMEs for their is-gen.
llvm-svn: 78623
2009-08-10 23:56:17 +00:00
Nate Begeman
5ec4b318e3
Take 2 on AltiVec-style vector initializers.
...
Fixes PR4704 problems
Addresses Eli's patch feedback re: ugly cast code
Updates all postfix operators to remove ParenListExprs. While this is awful,
no better solution (say, in the parser) is obvious to me. Better solutions
welcome.
llvm-svn: 78621
2009-08-10 23:49:36 +00:00
Anders Carlsson
ed1674d971
Add a CastInfo struct that will be used for cast information when constructing cast expressions. Right now it only stores the cast kind, but in the future it might store conversion functions and constructors.
...
llvm-svn: 78599
2009-08-10 21:30:22 +00:00
Chris Lattner
30ba674391
fix a couple of problems with section attributes:
...
1. Passing something that isn't a string used to cause:
"argument to annotate attribute was not a string literal"
make it say "section attribute" instead.
2. Fix the location of the above message to point to the
bad argument instead of the section token.
3. Implement rdar://4341926, by diagnosing invalid section
specifiers in the frontend rather than letting them slip all
the way to the assembler (a QoI win).
An example of #3 is that we used to produce something like this:
/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Expected comma after segment-name
/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Rest of line ignored. 1st junk character valued 46 (.).
Daniel improved clang to use llvm_report_error, so now we got:
$ clang t.c -c
fatal error: error in backend: Global variable 'x' has an invalid section specifier 'sadf': mach-o section specifier
requires a segment and section separated by a comma.
with no loc info. Now we get:
$ clang t.c -fsyntax-only
t.c:4:30: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment
and section separated by a comma
int x __attribute__((section("sadf")));
^
which is nice :)
llvm-svn: 78586
2009-08-10 19:03:04 +00:00
Chris Lattner
2375952a47
these tests include section specifiers that aren't valid on the
...
mac, use an explicit triple.
llvm-svn: 78583
2009-08-10 18:56:44 +00:00
Fariborz Jahanian
9d3405ceab
minor refactoring. No change otherwise.
...
llvm-svn: 78582
2009-08-10 18:46:38 +00:00
Fariborz Jahanian
7cc52cf09f
ir-gen for generating copying of scalar data members in
...
a synthesized copy constructor.
llvm-svn: 78580
2009-08-10 18:34:26 +00:00
Mike Stump
68f0d31f25
Add walking bases in reverse order.
...
llvm-svn: 78578
2009-08-10 18:21:22 +00:00
Fariborz Jahanian
2a26e351fc
Fixed a ir-gen bug in synthesizing copy constructors.
...
llvm-svn: 78570
2009-08-10 17:20:45 +00:00
Daniel Dunbar
71f22e738a
Use LLVM's new error handler API to report back end errors using Diagnostic.
...
For example,
--
ddunbar@giles:Frontend$ clang -c backend-errors.c
fatal error: error in backend: Global variable 'a' has an invalid section specifier
'I AM, not, legal': mach-o section specifier uses an unknown section type.
--
compare to:
--
ddunbar@giles:Frontend$ gcc -c backend-errors.c
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Expected comma after segment-name
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Rest of line ignored. 1st junk character valued 77 (M).
--
Yay!
I am not tied to my wording choice, we could also go with "uncoverable error"
for the prefix, or just leave it off entirely.
llvm-svn: 78554
2009-08-10 03:40:28 +00:00
Daniel Dunbar
481fe50903
Revert r78535, it is causing a number of failures to build projects.
...
--- Reverse-merging r78535 into '.':
D test/Sema/altivec-init.c
U include/clang/Basic/DiagnosticSemaKinds.td
U include/clang/AST/Expr.h
U include/clang/AST/StmtNodes.def
U include/clang/Parse/Parser.h
U include/clang/Parse/Action.h
U tools/clang-cc/clang-cc.cpp
U lib/Frontend/PrintParserCallbacks.cpp
U lib/CodeGen/CGExprScalar.cpp
U lib/Sema/SemaInit.cpp
U lib/Sema/Sema.h
U lib/Sema/SemaExpr.cpp
U lib/Sema/SemaTemplateInstantiateExpr.cpp
U lib/AST/StmtProfile.cpp
U lib/AST/Expr.cpp
U lib/AST/StmtPrinter.cpp
U lib/Parse/ParseExpr.cpp
U lib/Parse/ParseExprCXX.cpp
llvm-svn: 78551
2009-08-10 03:01:36 +00:00
Ryan Flynn
e64ffc277c
warn, as gcc does, if __attribute__((malloc)) applied to function returning non-pointer type
...
llvm-svn: 78542
2009-08-09 22:36:29 +00:00
Ryan Flynn
1f1fdc070e
map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return
...
llvm-svn: 78541
2009-08-09 20:07:29 +00:00
Anders Carlsson
f48123b413
Improve handling of member pointers.
...
llvm-svn: 78536
2009-08-09 18:26:27 +00:00
Nate Begeman
a96114ed08
AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);
...
In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.
llvm-svn: 78535
2009-08-09 17:55:44 +00:00
Benjamin Kramer
b57e5d2f4f
Older GCCs don't have vector::data().
...
llvm-svn: 78519
2009-08-08 23:43:26 +00:00
Fariborz Jahanian
24f38969d5
ir-gen for initialization, in synthesize copy constructor,
...
of base/field which have trivial copy constructor.
llvm-svn: 78516
2009-08-08 23:32:22 +00:00
Anders Carlsson
b8be93fc92
Add support for global initializers.
...
llvm-svn: 78515
2009-08-08 23:24:23 +00:00
Anders Carlsson
f40886acca
Refactor some code and implement support for global destructors for static variables.
...
llvm-svn: 78507
2009-08-08 21:45:14 +00:00
Anders Carlsson
2c101b3cd1
Use CastExpr::CK_ArrayToPointerDecay and fix an assert.
...
llvm-svn: 78502
2009-08-08 21:04:35 +00:00
Anders Carlsson
e139f868b7
Add tests.
...
llvm-svn: 78491
2009-08-08 19:43:14 +00:00
Anders Carlsson
28a5fa29f3
Take #pragma pack into account when laying out structs. Fixes rdar://problem/7095436.
...
llvm-svn: 78490
2009-08-08 19:38:24 +00:00
Fariborz Jahanian
f6bda5d61e
Refactoring of copy ctor ir-gen. No change in functionality.
...
llvm-svn: 78489
2009-08-08 19:31:03 +00:00
Ryan Flynn
2f08571e4d
PR4700 - remove shift by 0 warning
...
llvm-svn: 78488
2009-08-08 19:18:23 +00:00
Anders Carlsson
68e0b68289
Introduce a new PragmaPack attribute, and use it for #pragma pack. The PackedAttr now only represents __attribute__((packed)).
...
This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug.
llvm-svn: 78483
2009-08-08 18:23:56 +00:00
Anders Carlsson
453878bed4
Assert that the LLVM type has the same size as the RecordDecl size.
...
llvm-svn: 78481
2009-08-08 18:01:57 +00:00
Anders Carlsson
5fd7dad784
getFunctionLevelDeclContext needs to get the previous DeclContext if EnterDeclaratorContext has been called. Fixes PR4694. (Doug, please review)
...
llvm-svn: 78480
2009-08-08 17:48:49 +00:00
Anders Carlsson
b26ab816a2
Factor some code to get the "function level" DeclContext out into a separate function.
...
llvm-svn: 78478
2009-08-08 17:45:02 +00:00
Anders Carlsson
21776b75ce
Make sure to diagnose use of declarations in the case where we create an implicit CXXThisExpr.
...
llvm-svn: 78474
2009-08-08 16:55:18 +00:00
Daniel Dunbar
d3a114fe2d
Update test case; I don't really understand why packed enums changed this, but
...
the new havior is better so...
llvm-svn: 78473
2009-08-08 15:47:00 +00:00
Edward O'Callaghan
c69169d175
Patch should implement packed enums - PR4098. Credit to Anders Johnsen.
...
llvm-svn: 78471
2009-08-08 14:36:57 +00:00
Anders Carlsson
c5c57c3b86
Get rid of Stmt::Clone now that we can reference count statements instead.
...
llvm-svn: 78452
2009-08-08 02:50:17 +00:00
Douglas Gregor
2c742024ff
Introduce reference counting for statements and expressions, using it
...
to allow sharing of nodes. Simplifies some aspects of template
instantiation, and fixes both PR3444 and <rdar://problem/6757457>.
llvm-svn: 78450
2009-08-08 01:41:12 +00:00
Fariborz Jahanian
7c3d7f6c59
Remove use of uninitized variable.
...
llvm-svn: 78448
2009-08-08 00:59:58 +00:00
Fariborz Jahanian
59b3259284
Synthesize copying of non-static data members with
...
non-trivial copy constructors.
llvm-svn: 78445
2009-08-08 00:15:41 +00:00
Fariborz Jahanian
b68df0bc42
Synthesized copy constructor now generates code for
...
copying non-virtual base classes which have non-trivial
constructor. Work in progress.
llvm-svn: 78436
2009-08-07 23:51:33 +00:00
Anders Carlsson
8fc489da2a
Add a CK_ArrayToPointerDecay cast kind.
...
llvm-svn: 78434
2009-08-07 23:48:20 +00:00
Anders Carlsson
ec143777ba
Add CK_ToUnion and use it for aggregate expression codegen.
...
llvm-svn: 78429
2009-08-07 23:22:37 +00:00
Anders Carlsson
f10e414e4e
More CastKind work.
...
llvm-svn: 78415
2009-08-07 22:21:05 +00:00
John McCall
c7e8e795fa
Just add global scope to the associated namespaces set instead of tracking it
...
separately. Add the framework (currently unfed) for finding friend declarations
during argument-dependent lookup.
llvm-svn: 78414
2009-08-07 22:18:02 +00:00
Mike Stump
16644668cd
Add vbase offsets to the vtable. Wow, having an rbegin was so
...
fortuitous. WIP.
llvm-svn: 78413
2009-08-07 21:54:03 +00:00
Mike Stump
d9687fded6
Add rbegin and rend for virtual bases, might come in handy some day.
...
llvm-svn: 78412
2009-08-07 21:44:39 +00:00
Ted Kremenek
0e8e1fde25
Fix: <rdar://problem/7075531> static analyzer wrongly detects unused ivars used in blocks
...
llvm-svn: 78409
2009-08-07 21:13:23 +00:00
Ted Kremenek
d99f2866ac
Constify some pointers. No functionality change.
...
llvm-svn: 78407
2009-08-07 20:55:20 +00:00
Fariborz Jahanian
40134e71be
More synthesis of copy constructors. Work in progress.
...
llvm-svn: 78402
2009-08-07 20:22:40 +00:00
Mike Stump
a4d94b1a95
Fix typo.
...
llvm-svn: 78401
2009-08-07 20:14:05 +00:00
Mike Stump
c266c6d797
Add ability to generate vcall offsets for primary virtual base.
...
llvm-svn: 78396
2009-08-07 19:00:50 +00:00
Anders Carlsson
4f4aab2aeb
Use the correct cast kind as suggested by Doug.
...
llvm-svn: 78395
2009-08-07 18:45:49 +00:00
Mike Stump
b93185d05a
Fix some const_cast issues. This is the beginning of the rabbit hole.
...
llvm-svn: 78393
2009-08-07 18:05:12 +00:00
Ryan Flynn
f53fab87d8
PR3333: warn when shifting by invalid amount
...
llvm-svn: 78385
2009-08-07 16:20:20 +00:00
Douglas Gregor
e26a285c8f
Separate Stmt::Destroy into the entrypoint for destroying a statement
...
or expression (Destroy) from the virtual function used to actually
destroy a given expression (DoDestroy).
llvm-svn: 78375
2009-08-07 06:08:38 +00:00
Chris Lattner
b57430d698
add support for opensuse 11.1/11.2 search paths, patch by Stefan Reinauer
...
and Carl-Daniel Hailfinger!
llvm-svn: 78368
2009-08-07 05:28:24 +00:00
Mike Stump
7c32eab164
Add support for vcall generation for vtables for virtual bases. WIP.
...
llvm-svn: 78357
2009-08-06 23:48:32 +00:00
Fariborz Jahanian
9301b24c0a
Patch toward synthesizing copy constructors.
...
Work in progress.
llvm-svn: 78355
2009-08-06 23:38:16 +00:00
Ted Kremenek
040e3b91da
Fix a few more false positives involving RegionStore and unions, but this time
...
with array accesses. In the process, refactor some common logic in
RetrieveElement() and RetrieveField() into RetrieveFieldOrElementCommon().
llvm-svn: 78349
2009-08-06 22:33:36 +00:00
Douglas Gregor
766b0bbe61
Minor refactoring to introduce a new transformation function,
...
TransformStmt, into the tree transformer.
llvm-svn: 78347
2009-08-06 22:17:10 +00:00
Mike Stump
e6b39f5ca3
Almost forgot to turn on 32-bit test.
...
llvm-svn: 78346
2009-08-06 22:02:55 +00:00
Mike Stump
52aee0f3d9
Testcase for recent checkin.
...
llvm-svn: 78344
2009-08-06 21:53:24 +00:00
Mike Stump
3e62d00271
Also generate the rtti field for virtual bases for vtables. Turn on
...
rtti so we can properly test it. Refactor code a little. Still a
work in progress.
llvm-svn: 78343
2009-08-06 21:49:36 +00:00
Ted Kremenek
2f6eb14af4
Fix a couple false positive "uninitialized value" warnings with RegionStore
...
involving reasoning about unions (which we don't handle yet).
llvm-svn: 78342
2009-08-06 21:43:54 +00:00
John McCall
2c5206d22e
Drop the friend-inner-class diagnostic from an extwarn to an ext and don't
...
guard its report on GNUMode.
llvm-svn: 78338
2009-08-06 21:21:21 +00:00
Daniel Dunbar
1a9db99932
Add a simple tool for comparing two static analyzer runs, primarily for use from
...
buildbot.
llvm-svn: 78336
2009-08-06 21:15:33 +00:00
John McCall
93343b9466
Permit a class to friend its members in C++0x, without restriction.
...
Permit a class to friend its class members in C++ 98, as long as extensions
are enabled (and even when they aren't, only give an extwarn about it).
llvm-svn: 78332
2009-08-06 20:49:32 +00:00
Fariborz Jahanian
001309371e
Set and use Elidable in elimination of copy ctors.
...
llvm-svn: 78331
2009-08-06 19:12:38 +00:00
Mike Stump
2d8d655922
Layout the primary base first in the vtable.
...
llvm-svn: 78327
2009-08-06 18:05:22 +00:00
Fariborz Jahanian
11a8e95a1a
After reporting ill-formed copy constructor(12.8.p3)
...
don't recurs and crash.
llvm-svn: 78323
2009-08-06 17:22:51 +00:00
Daniel Dunbar
0c4a959b28
s/ccc/clang/
...
llvm-svn: 78320
2009-08-06 16:47:53 +00:00
Douglas Gregor
15acfb9f50
When we encounter a dependent type that was parsed before we know that
...
we were going to enter into the scope of a class template or class
template partial specialization, rebuild that type so that it can
refer to members of the current instantiation, as in code like
template<typename T>
struct X {
typedef T* pointer;
pointer data();
};
template<typename T>
typename X<T>::pointer X<T>::data() { ... }
Without rebuilding the return type of this out-of-line definition, the
canonical return type of the out-of-line definition (a TypenameType)
will not match the canonical return type of the declaration (the
canonical type of T*).
llvm-svn: 78316
2009-08-06 16:20:37 +00:00
Mike Stump
c255f3581a
More layout for virtual tables for virtual bases. Still in progress.
...
llvm-svn: 78314
2009-08-06 15:50:11 +00:00
Mike Stump
a60f1fc54b
Let's remember we want better codegen for these.
...
llvm-svn: 78310
2009-08-06 14:16:19 +00:00
Mike Stump
04df9b1d5e
Testcase for a recent checkin for vbase layout ordering. I hate to
...
optimize and check for non-optimal code, but until the frontend is as
powerful as fold...
llvm-svn: 78309
2009-08-06 14:12:47 +00:00
Mike Stump
6b2556f829
Layout virtual bases. Work in progress.
...
llvm-svn: 78308
2009-08-06 13:41:24 +00:00
Anton Korobeynikov
3ebc08b5bd
Add link to LLVM's Getting Started page.
...
Patch by John Thompson!
llvm-svn: 78307
2009-08-06 13:00:08 +00:00
Benjamin Kramer
bd7d13fb70
Silence gcc warning about non-virtual destructors.
...
llvm-svn: 78306
2009-08-06 12:59:58 +00:00
Mike Stump
c700b362c7
I have a dream, one day, we won't need to do this.
...
llvm-svn: 78305
2009-08-06 12:56:50 +00:00
Mike Stump
e9c85a7f58
Fix spell-o.
...
llvm-svn: 78303
2009-08-06 12:52:13 +00:00
Zhongxing Xu
99e49073bc
I forgot adding this header for r78298.
...
llvm-svn: 78302
2009-08-06 12:49:15 +00:00
Zhongxing Xu
107f75989c
Last step of template cleanup: merge *BuilderImpl to *Builder.
...
Some Builders need further cleanup.
llvm-svn: 78301
2009-08-06 12:48:26 +00:00
Zhongxing Xu
82003da8d3
Core analysis engine template cleanup step 2:
...
merge GRCoreEngineImpl and GRCoreEngine.
Introduce a new interface class GRSubEngine as the subengine of GRCoreEngine.
GRExprEngine subclasses GRSubEngine now.
llvm-svn: 78298
2009-08-06 10:00:15 +00:00
Zhongxing Xu
c5ce335f81
Fix comment.
...
llvm-svn: 78296
2009-08-06 09:22:08 +00:00
Douglas Gregor
71dc50915a
Implement transformation of template names within the generic tree
...
transform, then use the result for template instantiation. The generic
transformation fixes a few issues:
- It copes better with template template parameters and member
templates (when they're implemented).
- The logic used to replace template template parameters with their
arguments is now centralized in TransformDecl, so that it will apply
for other declaration-instantiation steps.
- The error-recovery strategy is normalized now, so that any error
results in a NULL TemplateName.
llvm-svn: 78292
2009-08-06 06:41:21 +00:00
Zhongxing Xu
c90a0c2e81
Core analysis engine template cleanup step 2:
...
merge ExplodedGraphImpl and ExplodedGraph.
llvm-svn: 78291
2009-08-06 06:28:40 +00:00
Ted Kremenek
f368fa6728
Update test case.
...
llvm-svn: 78290
2009-08-06 06:26:40 +00:00
Douglas Gregor
1135c35c7c
Implement transformation of nested-name-specifiers within the general
...
tree transformation. Template instantiation uses this general
transformation rather than implementing its own transformation.
llvm-svn: 78286
2009-08-06 05:28:30 +00:00
Ted Kremenek
54bd637f40
Fix typo reported in <rdar://problem/7121409>.
...
llvm-svn: 78285
2009-08-06 05:01:36 +00:00
Ted Kremenek
2c85f17922
Refactor RegionStoreManager::RemoveDeadBindings to also scan the bindings of LazyCompoundSVals.
...
llvm-svn: 78284
2009-08-06 04:50:20 +00:00
Douglas Gregor
3f4d51bb04
Predefine __cplusplus to the right value (199711L), except when in GNU mode.
...
llvm-svn: 78283
2009-08-06 04:09:28 +00:00
Ted Kremenek
e587ca6f25
Remove unimplemented methods 'AddRegionView' and 'RemoveRegionView'. They are no longer needed.
...
llvm-svn: 78280
2009-08-06 03:41:56 +00:00
Ted Kremenek
ed31f99efb
When profiling an ExplodedNode, don't re-profile the state: they have
...
already been uniqued.
llvm-svn: 78279
2009-08-06 03:39:20 +00:00
Douglas Gregor
d806156d54
Support nested-name-specifiers for C++ member access expressions, e.g.,
...
this->Base::foo
from James Porter!
llvm-svn: 78278
2009-08-06 03:17:00 +00:00
Ryan Flynn
aa5e5fd2f4
add support for FreeBSD's format(printf0,x,y) attribute; allows null format string.
...
llvm-svn: 78276
2009-08-06 03:00:50 +00:00
John McCall
07e91c04ba
First pass at friend semantics.
...
llvm-svn: 78274
2009-08-06 02:15:43 +00:00
Zhongxing Xu
51eeb36c8c
Completely remove the code using region cast.
...
llvm-svn: 78273
2009-08-06 02:14:29 +00:00
Daniel Dunbar
b46b5bbaa8
Add additional library paths for Linux distros on mixed 32/64-bit systems.
...
- Patch by Carl-Daniel Hailfinger.
llvm-svn: 78272
2009-08-06 01:47:11 +00:00
Daniel Dunbar
4728100e8d
Fix locating the 'lit.cfg' file when running on only a single file in the
...
current directory.
llvm-svn: 78271
2009-08-06 01:41:03 +00:00
Zhongxing Xu
20227f71d7
As GRState seems general enough, it is time to merge some template classes
...
and their impl base classes. This can greatly simply some code of the core
analysis engine. This patch merges ExplodedNodeImpl into ExplodedNode.
llvm-svn: 78270
2009-08-06 01:32:16 +00:00
Daniel Dunbar
f1ad6b7064
Fix clang breakage, CGF can be null in this context.
...
llvm-svn: 78269
2009-08-06 01:24:27 +00:00
Ted Kremenek
fa41714d8d
Implement lazy "copying" of structures and arrays in RegionStore. While
...
RegionStore already lazily abstracted the contents of arrays and structs, when
doing an assignment from one array/struct to another we did an explicit
element-wise copy, which resulted in a loss of laziness and huge performance
problem when analyzing many code bases.
Now RegionStoreManager handles such assignments using a new SVal could
'LazyCompoundSVal', which basically means the value of a given struct or array
(a MemRegion*) in a specific state (GRState). When we do a load from a field
whose encompassing struct binds to a LazyCompoundSVal, we essentially do a field
lookup in the original structure. This means we have essentially zero copying of
data for structs/arrays and everything stays lazy.
llvm-svn: 78268
2009-08-06 01:20:57 +00:00
Fariborz Jahanian
eb869768f9
Patch to optimize away copy constructor call when
...
appropriate.
llvm-svn: 78267
2009-08-06 01:02:49 +00:00
John McCall
9de556c8b6
AlisdairM pointed out that this will likely be relaxed in C++0x, so let's
...
make a note of it in the test case.
llvm-svn: 78266
2009-08-06 00:50:46 +00:00
Mike Stump
2509480813
Fixup object layout when we have a primary base (it goes first). Start preping for
...
virtual base layout.
llvm-svn: 78265
2009-08-06 00:38:46 +00:00
John McCall
13c5a27c9a
Add a test for invalid uses of non-static members from nested classes, just
...
because I was thinking about it.
llvm-svn: 78262
2009-08-05 23:56:26 +00:00
Owen Anderson
758428f4e3
Update for LLVM API change.
...
llvm-svn: 78259
2009-08-05 23:18:46 +00:00
Mike Stump
a19718af5a
Refactor some bits.
...
llvm-svn: 78254
2009-08-05 22:59:44 +00:00
Mike Stump
6d368129c5
Add another test for a recent checkin.
...
llvm-svn: 78253
2009-08-05 22:48:36 +00:00
Mike Stump
d8fe7b2792
Calculate the primary base class better and use that when laying down
...
the vtable. Still a work in progress.
llvm-svn: 78252
2009-08-05 22:37:18 +00:00
Fariborz Jahanian
01aabafee0
A blank line to separate the two blocks(per Mike comment).
...
llvm-svn: 78248
2009-08-05 21:52:02 +00:00
Benjamin Kramer
70231c99c4
Fix -fno-omit-frame-pointer bug Eli noticed.
...
llvm-svn: 78233
2009-08-05 19:47:38 +00:00
Fariborz Jahanian
daeb7d51d4
Modified test case to use FileCheck.
...
llvm-svn: 78231
2009-08-05 19:24:33 +00:00
Eli Friedman
44b83eea30
Get rid of "smart" quotes. Per report on cfe-dev.
...
llvm-svn: 78230
2009-08-05 19:21:58 +00:00
Ted Kremenek
844a729d97
Use feedback from RegionStoreSubRegionMap::add() to prune off adding a super
...
region to the worklist used to create the subregion map.
llvm-svn: 78228
2009-08-05 19:09:24 +00:00
Douglas Gregor
f9bd4ecea2
Fix canonical type construction for function types with the noreturn
...
attribute. Fixes PR4865.
llvm-svn: 78224
2009-08-05 19:03:35 +00:00
Fariborz Jahanian
d460cb4356
Handle destruction of temporaries used in default argument
...
construction of constructor calls.
llvm-svn: 78222
2009-08-05 18:17:32 +00:00
Fariborz Jahanian
aa890bf2f3
Patch to improve ir-gen for constructors with default argument
...
expressions and a test case.
llvm-svn: 78213
2009-08-05 17:03:54 +00:00
Benjamin Kramer
cf4371a689
Translate -mcmodel=X to -code-model X and pass it to clang-cc. Patch by Pawel Worach!
...
llvm-svn: 78190
2009-08-05 14:30:52 +00:00
Benjamin Kramer
72e211a47a
Add support for the -fno-omit-frame-pointer option. Patch by Roman Divacky!
...
llvm-svn: 78188
2009-08-05 12:11:11 +00:00
Douglas Gregor
99709de6ae
Fix a comment that trailed off
...
llvm-svn: 78167
2009-08-05 05:39:53 +00:00
Douglas Gregor
2211d345d2
Introduce the canonical type smart pointers, and use them in a few places to
...
tighten up the static type system.
llvm-svn: 78164
2009-08-05 05:36:45 +00:00
Ted Kremenek
68c1f010d2
Fix a bug in RegionStoreSubRegionManager::add() where multiple subregions wouldn't correctly get registered in the SubRegion map.
...
llvm-svn: 78162
2009-08-05 05:31:02 +00:00
Chris Lattner
c58e5699be
cgobjcgnu was making invalid common globals.
...
llvm-svn: 78161
2009-08-05 05:25:18 +00:00
Chris Lattner
f49573d1ee
weak globals that are const should get weak_odr linkage.
...
add a fixme about C++ const.
llvm-svn: 78159
2009-08-05 05:20:29 +00:00
Chris Lattner
c0693bc2ea
rdar://7119244 - globals with an explicit section specified don't get
...
common linkage.
llvm-svn: 78158
2009-08-05 04:56:58 +00:00
Zhongxing Xu
13ee441874
Add test case.
...
llvm-svn: 78150
2009-08-05 03:45:09 +00:00
Zhongxing Xu
fe97165587
If the UnaryOperator has non-location type, use its type to create the
...
constant value. If the UnaryOperator has location type, create the
constant with int type and pointer width.
This fixes the bug that all pointer increments 'p++' evaluated to Unknown.
llvm-svn: 78147
2009-08-05 02:51:59 +00:00
Mike Stump
1a90e38471
Remove an unused header.
...
llvm-svn: 78140
2009-08-05 01:22:47 +00:00
Fariborz Jahanian
800f37262c
Support for use of default argument in constructors.
...
work in progress.
llvm-svn: 78132
2009-08-05 00:26:10 +00:00
Douglas Gregor
e922c77ddd
Move the template instantiation logic for template arguments into the
...
general tree transformation. Also, implement template instantiation
for parameter packs.
In addition, introduce logic to enter the appropriate context for
subexpressions that are not potentially evaluated.
llvm-svn: 78114
2009-08-04 22:27:00 +00:00
Mike Stump
9beac787c1
vtable building for simple inheritance. Still in progress.
...
llvm-svn: 78110
2009-08-04 21:58:42 +00:00
Mike Stump
12b8ce168d
Canonicalize else.
...
llvm-svn: 78102
2009-08-04 21:02:39 +00:00
Mike Stump
f5fc72eea9
Test cases for some recent work.
...
llvm-svn: 78100
2009-08-04 20:37:29 +00:00
Mike Stump
7551d05358
Will I ever get used to CamelCase? Will I ever like capitols for
...
random variables?
--This line, and those below, will be ignored--
M lib/CodeGen/CGCXX.cpp
llvm-svn: 78094
2009-08-04 20:06:48 +00:00
Mike Stump
b0dd95d6d3
Add armv7 support.
...
llvm-svn: 78092
2009-08-04 19:48:52 +00:00
Anders Carlsson
5638895b2a
Revert the fix for PR3800, it broke things.
...
llvm-svn: 78084
2009-08-04 18:18:36 +00:00
Ted Kremenek
36c14a0f1a
Renable "html" indexing by default.
...
llvm-svn: 78077
2009-08-04 17:05:18 +00:00
Fariborz Jahanian
b61af4c566
Some code refactoring. Be more generous in issuance of warning
...
on method type mismatches per Chris's comment.
llvm-svn: 78075
2009-08-04 17:01:09 +00:00
Douglas Gregor
d6ff33294a
Refactor template instantiation for types into a generic tree
...
transformation template (TreeTransform) that handles the
transformation and reconstruction of AST nodes. Template instantiation
for types is a (relatively small) customization of the generic tree
transformation.
llvm-svn: 78071
2009-08-04 16:50:30 +00:00
Anders Carlsson
19702bb054
Simplify alignment handling in the record builder.
...
llvm-svn: 78069
2009-08-04 16:29:15 +00:00
Daniel Dunbar
83142021fb
lit: Some sample tests, for testing the tester
...
llvm-svn: 78050
2009-08-04 04:40:15 +00:00