Commit Graph

15283 Commits

Author SHA1 Message Date
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
Chris Lattner f6bad8690f Improve the Getting Started and Hacking web pages, patch by
John Thompson!

llvm-svn: 79518
2009-08-20 06:17:11 +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
Ted Kremenek e95b439cc3 Make this test case more portable by removing its dependency on system header files.
llvm-svn: 79511
2009-08-20 04:48:23 +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
Zhongxing Xu a778b02e89 If the body of for loop is empty, set its body to the continue target.
Otherwise we get a wrong CFG.

llvm-svn: 79507
2009-08-20 02:56:48 +00:00
Mike Stump 2220447adc Ensure we don't output repeated vbase offsets. I have a testcase for
this, but need to fixup the actual offset value before I can check it
in.  WIP.

llvm-svn: 79506
2009-08-20 02:11:48 +00:00
John McCall 87a44eb98a Basic nested-template implementation.
llvm-svn: 79504
2009-08-20 01:44:21 +00:00
Zhongxing Xu 068928b2a6 Rename: ProgramPoint::getContext() => ProgramPoint::getLocationContext().
llvm-svn: 79502
2009-08-20 01:23:34 +00:00
Fariborz Jahanian dd46eb770f Test case for my last patch plus a minor clean up.
llvm-svn: 79500
2009-08-20 01:01:06 +00:00
Ted Kremenek d982f001c9 retain/release checker: Special case handling of CFAttributedStringSetAttribute,
fixing <rdar://problem/7152619>. Along the way, merge test cases in
'test/Analysis/rdar-6539791.c' into 'test/Analysis/retain-release.m'.

llvm-svn: 79499
2009-08-20 00:57:22 +00:00
Fariborz Jahanian eeb0e57247 ir-gen for multi-dimensional array construction. WIP.
llvm-svn: 79497
2009-08-20 00:15:15 +00:00
Ted Kremenek eebcf574dd Enhance diagnostics concerning attribute 'ns_returns_retained' and 'cf_returns_retained' to present the range of the attribute and have the diagnostic location be the declaration that the attribute was falsely attached to. This solves the problem where these diagnostics were being suppressed when these attributes were wrapped in a macro that was defined in a system header.
llvm-svn: 79496
2009-08-19 23:56:48 +00:00
Argyrios Kyrtzidis 20cf19141f Keep track of the right paren ')' source location in a function declarator.
llvm-svn: 79489
2009-08-19 23:14:54 +00:00
Fariborz Jahanian a8fe2c26a8 Removed unneeded code for break/continue statements in
manufactured for-loop per Anders feedback (thanks).

- Fariborz

llvm-svn: 79466
2009-08-19 21:10:38 +00:00
Fariborz Jahanian 431c883287 ir-gen for constructing arrays as non-static data members. WIP.
llvm-svn: 79464
2009-08-19 20:55:16 +00:00
Eli Friedman a9c3d71b59 Add TCE target to clang; patch by Mikael Lepistö.
llvm-svn: 79462
2009-08-19 20:47:07 +00:00
Daniel Dunbar 62c850fb8f Remove now unnecessary helper methods.
llvm-svn: 79460
2009-08-19 20:32:38 +00:00
Daniel Dunbar 58bc48c14e Switch to SmallString::str from SmallString::c_str.
- Several FIXMEs due to non-Twinification of IRBuilder.

llvm-svn: 79455
2009-08-19 20:04:03 +00:00
Daniel Dunbar dec484abfb Convert parts of Rewriter to StringRef based API.
- Please accept my sincere apologies for the gratuitous elimination of code
   duplication, manual string length counting, unnecessary strlen calls, etc.

llvm-svn: 79448
2009-08-19 19:10:30 +00:00
Daniel Dunbar 69c300d5e3 Use raw_svector_ostream for string concatenation.
llvm-svn: 79444
2009-08-19 18:30:37 +00:00
Mike Stump 3bc0a3bf7d One second thought, I think I want to limit this class to just vtable
building activities.

llvm-svn: 79438
2009-08-19 18:10:47 +00:00
Mike Stump b386941208 Cleanup: fold IndirectPrimary into builder.
llvm-svn: 79423
2009-08-19 14:40:47 +00:00
Mike Stump 3b09f004db We don't want to confuse this layout with the BLayout from the builder.
llvm-svn: 79422
2009-08-19 14:06:50 +00:00
Mike Stump 6bc4aac878 Update for recent improvements.
llvm-svn: 79421
2009-08-19 13:36:31 +00:00
Zhongxing Xu 080fa0522b Get the Decl from the current ExplodedNode. Eventually the diagnostic client
and other core analysis logic will be untied to a particular Decl.

llvm-svn: 79420
2009-08-19 12:50:00 +00:00
Benjamin Kramer a48651de2d Update CMakeLists.
llvm-svn: 79416
2009-08-19 12:02:15 +00:00
Eli Friedman 5ae98ee006 Make integer promotions work correctly on PIC16 and other platforms
where sizeof(short) == sizeof(int).  Move UsualArithmeticConversionsType 
out of Sema, since it was only there as a historical artifact.  Patch by 
Enea Zaffanella.

llvm-svn: 79412
2009-08-19 07:44:53 +00:00
Mike Stump 984c99d190 Restore vbase offsets for classes without a primary.
llvm-svn: 79402
2009-08-19 02:53:08 +00:00
Mike Stump 583ef62149 Refine vcalls a little.
llvm-svn: 79400
2009-08-19 02:06:38 +00:00
Argyrios Kyrtzidis cc06621280 Fix a comment and improve an assert message.
llvm-svn: 79399
2009-08-19 01:46:06 +00:00
Argyrios Kyrtzidis 560ac97bf3 Store/load type source info from/to PCH files.
llvm-svn: 79396
2009-08-19 01:28:35 +00:00
Argyrios Kyrtzidis c7148c974d Use Sema's LocInfoType to pass and preserve type source info through the Parser.
llvm-svn: 79395
2009-08-19 01:28:28 +00:00
Argyrios Kyrtzidis e918926d31 Introduce LocInfoType which is a Sema-specific implementation detail.
This is a Type subclass that can hold a DeclaratorInfo* when we have type source info coming
out of a declarator that we want to preserve. This is used only at the "border" of Parser/Sema for
passing/getting QualTypes, it does not participate in the type system semantics in any way.

llvm-svn: 79394
2009-08-19 01:28:17 +00:00
Argyrios Kyrtzidis fc8b022810 Create and instantiate a DeclaratorInfo using a newly introduced Sema::GetDeclaratorInfoForDeclarator().
llvm-svn: 79393
2009-08-19 01:28:06 +00:00
Argyrios Kyrtzidis 60ed560428 Introduce DeclaratorDecl and pass DeclaratorInfo through the Decl/Sema interfaces.
DeclaratorDecl contains a DeclaratorInfo* to keep type source info.
Subclasses of DeclaratorDecl are FieldDecl, FunctionDecl, and VarDecl.
EnumConstantDecl still inherits from ValueDecl since it has no need for DeclaratorInfo.

Decl/Sema interfaces accept a DeclaratorInfo as parameter but no DeclaratorInfo is created yet.

llvm-svn: 79392
2009-08-19 01:27:57 +00:00
Argyrios Kyrtzidis 3f79ad7405 Introduce DeclaratorInfo and TypeLoc, intended to be used for storing and reading source information for types.
DeclaratorInfo will contain a flat memory block for source information about a type that came out of a declarator.
TypeLoc and its subclasses will be used by clients as wrappers to "traverse" the memory block and read the information.

Both DeclaratorInfo and TypeLoc are not utilized in this commit.

llvm-svn: 79391
2009-08-19 01:27:32 +00:00
Anders Carlsson ddd0b3c72a Update Xcode project.
llvm-svn: 79390
2009-08-19 01:17:32 +00:00
Mike Stump 6fe6ca11da Cleanup.
llvm-svn: 79374
2009-08-18 22:04:08 +00:00
Mike Stump 494c42526b Add some documentation.
llvm-svn: 79373
2009-08-18 21:59:28 +00:00
Mike Stump 07347353a0 Cleanups. Move GenerateRtti to CodeGenModule.
llvm-svn: 79372
2009-08-18 21:49:00 +00:00
Fariborz Jahanian 19380c4b88 Renamed ClassProp data member of ObjCImplctSetterGetterRefExpr
to InterfaceDecl, as it is unrelated to any property and
holds the InterfaceDecl needed for accessing class getter/setter
methods using the dot-syntax.

llvm-svn: 79371
2009-08-18 21:37:33 +00:00
Mike Stump ee81dca8c7 Move the rest of the vtable building code into the new builder.
llvm-svn: 79370
2009-08-18 21:30:21 +00:00
Mike Stump 1f18b9a301 Suck up method generation.
llvm-svn: 79367
2009-08-18 21:03:28 +00:00
Mike Stump 5cb34077ef Split out vtable bulding code into a builder.
llvm-svn: 79366
2009-08-18 20:50:28 +00:00
Fariborz Jahanian 88cc2340de Renamed ObjCKVCRefExpr to ObjCImplctSetterGetterRefExpr.
Removed an unnecessary loop to get to setters incoming
argument. Added DoxyGen comments. Still more work
to do in this area (WIP).

llvm-svn: 79365
2009-08-18 20:50:23 +00:00
Anders Carlsson a192947509 Change ActOnReturnStmt to not take a FullExprArg. Instead, Sema will wrap the return expr inside a CXXExprWithTemporaries if needed.
llvm-svn: 79342
2009-08-18 16:11:00 +00:00