Chris Lattner
84cffc22d4
adjust for raw_fd_ostream api change.
...
llvm-svn: 79809
2009-08-23 02:59:41 +00:00
Anders Carlsson
622ddae92b
Whoops, comment this out for now. I'll fix it shortly.
...
llvm-svn: 79806
2009-08-23 01:28:08 +00:00
Anders Carlsson
d606de72ab
More work towards zero-initializing structs that contain member pointers in constant expressions.
...
llvm-svn: 79805
2009-08-23 01:25:01 +00:00
Anders Carlsson
beac2bef4d
Remove the PaddingFields member from CGRecordLayout, it wasn't used anyway.
...
llvm-svn: 79799
2009-08-23 01:01:04 +00:00
Eli Friedman
16c209610c
Catch a few more cases of illegal comparisons.
...
llvm-svn: 79793
2009-08-23 00:27:47 +00:00
Chris Lattner
d99bd52c73
Eli points out that we really must diagnose "void* > 0" as an extension.
...
Explicitly add it as an EXTENSION instead of an EXTWARN so that it only
comes out with -pedantic. Thanks Eli!
llvm-svn: 79791
2009-08-23 00:03:44 +00:00
Anders Carlsson
faeccc622f
Handle CK_NullToMemberPointer casts in the constant expr emitter.
...
llvm-svn: 79790
2009-08-23 00:02:11 +00:00
Anders Carlsson
3b0c5dcdd2
Change the constant expression emitter to look at the cast kind for to-union casts.
...
llvm-svn: 79789
2009-08-22 23:54:44 +00:00
Anders Carlsson
d7923c6ed7
Add CK_NullToMemberPointer and CK_BaseToDerivedMemberPointer cast kinds. Make -ast-dump print out the cast kinds of cast expressions.
...
llvm-svn: 79787
2009-08-22 23:33:40 +00:00
Anders Carlsson
9cedbefb24
Add a -fno-elide-constructors option to clang-cc.
...
llvm-svn: 79782
2009-08-22 22:30:33 +00:00
Fariborz Jahanian
a83c016d22
Type of a ?: expression whose either expression is a built-in 'id'
...
type is 'id' type.
llvm-svn: 79781
2009-08-22 22:27:17 +00:00
Fariborz Jahanian
cbf10f5de5
Don't issue warning on multiple selector found when
...
selector name is for a @selector expression.
llvm-svn: 79776
2009-08-22 21:13:55 +00:00
Chris Lattner
f8344dbfdd
tweak some pointer sema checking stuff (which was added to implement PR4175) to
...
avoid emitting a warning on "someptr > 0". This is obviously questionable (they
could use != instead) but is reasonable, and the warning "ordered comparison
between pointer and integer" didn't make a ton of sense because 0 is a valid
null pointer constant.
Just silence the warning in this case, it is unlikely to indicate a bug.
llvm-svn: 79743
2009-08-22 18:58:31 +00:00
Edward O'Callaghan
856e4ff78d
Second half of, clang, AuroraUX toolchain support.
...
llvm-svn: 79713
2009-08-22 01:06:46 +00:00
Douglas Gregor
c45a40afd1
Implement delayed parsing for member function templates. Fixes PR4608.
...
llvm-svn: 79709
2009-08-22 00:34:47 +00:00
Ted Kremenek
cdf5f4aa7b
Remove 'AnalysisContext::setDecl()', as we the Decl associated with an
...
AnalysisContext should never change. Along the way, propagate some constness
around.
llvm-svn: 79701
2009-08-21 23:58:43 +00:00
Ted Kremenek
00aeae98b5
Constify LocationContext* (parent) and Stmt* fields in LocationContext.
...
llvm-svn: 79700
2009-08-21 23:39:58 +00:00
Ted Kremenek
608677a2e1
Remove 'SelfRegion' field from both BasicStoreManager and RegionStoreManager.
...
SelfRegion represented the object bound to 'self' (when analyzing Objective-C
methods) upon entry to a method. Having this region stored on the side ignores
the current stack frame that we might be analyzing (among other things), and is
a problem for interprocedural analysis.
For RegionStoreManager, the value for SelfRegion is just lazily created.
For BasicStoreManager, the value for SelfRegion is bound eagerly to 'self', but
no explicit tracking of SelfRegion on the side is made.
As part of this change, remove the restriction in BasicStoreManager that we only
track ivars for 'self'. This shouldn't actually change anything in terms of
precision, and simplifies the logic.
llvm-svn: 79694
2009-08-21 23:25:54 +00:00
Douglas Gregor
05155d8d7b
Implement conversion function templates, along with the ability to use
...
template argument deduction from a conversion function (C++
[temp.deduct.conv]) with implicit conversions.
llvm-svn: 79693
2009-08-21 23:19:43 +00:00
Mike Stump
0b8c5ae7af
Calculate the address point for a vtable better, and start fleshing out the vcall
...
calculations better.
llvm-svn: 79687
2009-08-21 23:09:30 +00:00
Douglas Gregor
e839486de9
Refactor instantiation of destructors to use the common CXXMethodDecl
...
code, fixing a problem where instantiations of out-of-line destructor
definitions would had the wrong lexical context.
Introduce tests for out-of-line definitions of the constructors,
destructors, and conversion functions of a class template partial
specialization.
llvm-svn: 79682
2009-08-21 22:43:28 +00:00
Fariborz Jahanian
8adc973483
Patch to ir-gen copy assigning array members when synthesizing
...
a copy assignment operator function.
llvm-svn: 79681
2009-08-21 22:34:55 +00:00
Ted Kremenek
14536f6ee0
Add LocationContext* field to VarRegion. This is needed for interprocedural analysis.
...
llvm-svn: 79680
2009-08-21 22:28:32 +00:00
Douglas Gregor
e5bbb7d4ef
Fix parsing for out-of-line definitions of constructors and
...
destructors of class templates.
llvm-svn: 79678
2009-08-21 22:16:40 +00:00
Douglas Gregor
5ed5ae476e
Introduce support for constructor templates, which can now be declared
...
and will participate in overload resolution. Unify the instantiation
of CXXMethodDecls and CXXConstructorDecls, which had already gotten
out-of-sync.
llvm-svn: 79658
2009-08-21 18:42:58 +00:00
Fariborz Jahanian
5626384384
Patch to provide ir-gen support in copying array members
...
when synthesizing a copy constructor. Arrays's base element
may have a trivial or non-trivial copy constructor.
llvm-svn: 79653
2009-08-21 18:30:26 +00:00
Fariborz Jahanian
7481bd88bb
Array member construction in prologue of user-declared
...
constructors.
llvm-svn: 79640
2009-08-21 17:09:38 +00:00
Fariborz Jahanian
6c9e5a2b9e
Introduce getConstantArrayElementCount API and use it in
...
construction/destruction of array members.
llvm-svn: 79637
2009-08-21 16:31:06 +00:00
Zhongxing Xu
54f87880e7
Eagerly bind 'self' to SelfRegion. Thus we do not need to get code decl from
...
GRStateManager to create the SelfRegion.
llvm-svn: 79628
2009-08-21 13:25:15 +00:00
Sanjiv Gupta
91f8cd9a91
Reversing part of 79544.
...
Need to find a new way to do target specific semanitc checking.
llvm-svn: 79596
2009-08-21 04:58:03 +00:00
Zhongxing Xu
71900fbac7
Get the code decl from the initial location context.
...
llvm-svn: 79591
2009-08-21 03:05:36 +00:00
Zhongxing Xu
871918c76f
Get the code decl from the initial location context.
...
llvm-svn: 79590
2009-08-21 02:58:11 +00:00
Daniel Dunbar
6d886b056a
gcc told me to add these.
...
llvm-svn: 79589
2009-08-21 02:43:05 +00:00
Zhongxing Xu
6be1a4e832
Tie the local check NSErrorCheck to a Decl to pave the way
...
to untie the ExplodedGraph from a specific Decl.
llvm-svn: 79588
2009-08-21 02:18:44 +00:00
Mike Stump
a002945a20
We now support overriding base functions in vtables. WIP.
...
llvm-svn: 79587
2009-08-21 01:45:00 +00:00
Argyrios Kyrtzidis
6032ef1aa3
Remove TypeSpecStartLocation from VarDecl/FunctionDecl/FieldDecl, and use DeclaratorInfo to get this information.
...
llvm-svn: 79584
2009-08-21 00:31:54 +00:00
Douglas Gregor
a8eed7dabb
Make the new Objective-C "id" and "Class" redefinition types special
...
types that are preloaded by the PCH file. Fixes PCH breakage
introduced in r79248.
llvm-svn: 79583
2009-08-21 00:27:50 +00:00
Douglas Gregor
97628d6a4c
Implement support for calling member function templates, which involves:
...
- Allowing one to name a member function template within a class
template and on the right-hand side of a member access expression.
- Template argument deduction for calls to member function templates.
- Registering specializations of member function templates (and
finding them later).
llvm-svn: 79581
2009-08-21 00:16:32 +00:00
Fariborz Jahanian
1a606ab12a
Patch to ir-gen destruction of array member elements in revers order
...
of their construction.
llvm-svn: 79571
2009-08-20 23:02:58 +00:00
Douglas Gregor
3447e76762
Initial support for parsing and representation of member function templates.
...
llvm-svn: 79570
2009-08-20 22:52:58 +00:00
Fariborz Jahanian
9c83720d17
ir-gen patch to destruct array members. WIP.
...
llvm-svn: 79565
2009-08-20 20:54:15 +00:00
Douglas Gregor
468535e552
Fix a typo in a variable name
...
llvm-svn: 79558
2009-08-20 18:46:05 +00:00
Sanjiv Gupta
b841d1baa1
Issue an error if the user specifies parameters in a function marked as ISR.
...
llvm-svn: 79544
2009-08-20 17:48:52 +00:00
Fariborz Jahanian
9a84665921
Using "ObjCImplicitSetterGetterRefExpr" instead of "ObjCImplctSetterGetterRefExpr".
...
A field rename and more comments.
llvm-svn: 79537
2009-08-20 17:02:02 +00:00
Mike Stump
cae6178b3b
Refine vbase offsets for the inductive case. Things are now starting
...
to come together nicely. Still a WIP.
llvm-svn: 79521
2009-08-20 07:22:17 +00:00
John McCall
950aac085d
Add syntax examples for the friend declaration types.
...
Remove an assert trivialized by dominating code.
llvm-svn: 79520
2009-08-20 07:19:42 +00:00
Douglas Gregor
ebe1010b0f
Refactor the instantiation of statements into a generic tree
...
transformation.
llvm-svn: 79519
2009-08-20 07:17:43 +00:00
Ted Kremenek
815fbb6026
retain/release checker: Treat NSObject method '-awakeAfterUsingCoder:'
...
just as if it behaved like an init function. This fixes <rdar://problem/7129086>.
llvm-svn: 79515
2009-08-20 05:13:36 +00:00
Eli Friedman
629ffb9ad3
Fix bit-field promotion to be a bit closer to the behavior of gcc.
...
Patch by Enea Zaffanella, with some simplifications/corrections to
isPromotableBitField by me.
llvm-svn: 79510
2009-08-20 04:21:42 +00:00
Zhongxing Xu
1a3ec57520
If the 'while' has an empty body, set the body to the continue target block.
...
Although this does not make the CFG more correct, it makes the CFG more
beautiful without multiple roots.
llvm-svn: 79509
2009-08-20 03:21:49 +00:00