summaryrefslogtreecommitdiffstats
path: root/clang/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed StmtPrinter to handle GCC extension to the ternary operator "?:" whereTed Kremenek2007-11-261-3/+10
| | | | | | the LHS subexpression can be NULL. Patch provided by Nuno Lopes! llvm-svn: 44328
* Fixed bug in CFG construction where we did not properly handle the GCCTed Kremenek2007-11-261-5/+34
| | | | | | | | | | | | extension "?:" for the ternary operator, e.g.: x ?: y; This expression is represented in the clang ASTs as a ConditionalOperator whose LHS expression is NULL. Now we handle this special case, causing the block containing the condition to be a predecessor to the block that "merges" the values of the ternary operator. Thanks to Nuno Lopes for identifying and diagnosing this bug! llvm-svn: 44327
* sizeof() return size in bytes, not bits, patch by Nuno Lopes!Chris Lattner2007-11-251-1/+1
| | | | llvm-svn: 44316
* Keep track of whether the asm is volatile or not.Anders Carlsson2007-11-233-3/+11
| | | | llvm-svn: 44297
* Store output and input operands as well as clobber information in the ↵Anders Carlsson2007-11-223-1/+124
| | | | | | AsmStmt. Ted, could you please review the serialization/deserialization code? llvm-svn: 44266
* Store inline asm code in the AST.Anders Carlsson2007-11-202-2/+6
| | | | llvm-svn: 44255
* Put back the flags field in the constant CF string type.Anders Carlsson2007-11-191-5/+7
| | | | llvm-svn: 44222
* Fixed bug in WalkaST_VisitDeclSubExprs where we failed to properly check ifTed Kremenek2007-11-181-3/+4
| | | | | | | | | | the StmtIterator referring to the initializers of a chain of Decls was equal to the "end" iterator. The particular bug manifested when an iterator was created on a chain of decls with no initializers. Thanks to Nuno Lopes for reporting this bug and providing a patch. llvm-svn: 44220
* Now that we are passing back "free standing decls", make sure -ast-dump ↵Steve Naroff2007-11-171-1/+9
| | | | | | | | works like -ast-print. Also added a cast to be safe... llvm-svn: 44209
* Make sure Sema::ParsedFreeStandingDeclSpec() returns a decl representing the ↵Steve Naroff2007-11-171-1/+9
| | | | | | | | type. Adding basic printing to StmtPrinter::PrintRawDecl(). llvm-svn: 44208
* Added assertion in serialization of DeclRefExprs. DeclRefExprs can onlyTed Kremenek2007-11-161-7/+12
| | | | | | | own the decl they reference if it is a FunctionDecl. Note that his ownership property is still considered a hack, and should be fixed. llvm-svn: 44192
* Fixed bug in the serialization of FunctionDecls. We would incorrectlyTed Kremenek2007-11-161-5/+5
| | | | | | | query for the number of parameters for FunctionDecls that had type FunctionTypeNoProto. llvm-svn: 44191
* Added hack when serializing DeclRefExprs. This should probably be fixed.Ted Kremenek2007-11-151-5/+30
| | | | | | | | | | | | | | | | Some FunctionDecls do not appear at the top-level or are owned by a DeclStmt. In calls to implicitly defined functions, a FunctionDecl is created, but only the DeclRefExprs reference them. Since an implicitly defined function may be called multiple times, there is no clear ownership model for such objects. Temporary solution: when serializing out DeclRefExprs, emit an ownership bit for the Decl. This bit is determined by querying the serializer to see if the Decl has already been serialized. If it hasn't, emit the Decl as an owned pointer. I repeat: this is a hack. This should be fixed. llvm-svn: 44176
* Started separate section for method definitions for ObjC serialization.Ted Kremenek2007-11-151-13/+29
| | | | | | Added missing deserialization case in Stmt::Create() switch statement. llvm-svn: 44175
* Finish up variadic methods/messages.Steve Naroff2007-11-151-10/+10
| | | | llvm-svn: 44172
* Fixed bug in serialization of EnumConstantDecl where we improperlyTed Kremenek2007-11-141-2/+2
| | | | | | | "default constructed" an APSInt. Fixed another bug in the same method where we did not allow the NextDeclarator to be NULL. llvm-svn: 44147
* Fixed bug when serializing QualTypes where we were serializing in theTed Kremenek2007-11-141-1/+1
| | | | | | qualifiers as part of the pointer address. llvm-svn: 44146
* Added QualType::ReadBackpatch to allow QualType initialization withTed Kremenek2007-11-142-9/+9
| | | | | | | | | | | | | | | backpatching. This original was available, but then we removed it. It is back again to help with deserialization of FieldDecls. Because FieldDecls are currently owned by RecordDecls, which are owned by a TagType, the type of the FieldDecl may not be deserialized prior to deserializing the FieldDecl. Thus backpatching solves the problem of constructing a FieldDecl that references a type that has not yet been deserialized. Simplified serialization of TagType to not require passing in the SerializedPtrID. Registration of the materialized type object is done after the CreateImpl method returns (as with other types). llvm-svn: 44143
* Implemented serialization of InitListExpr.Ted Kremenek2007-11-141-1/+22
| | | | llvm-svn: 44137
* Implemented serialization of CompoundLiteralExpr.Ted Kremenek2007-11-141-0/+14
| | | | llvm-svn: 44134
* Added serialization of Union decls.Ted Kremenek2007-11-141-1/+2
| | | | llvm-svn: 44133
* Removed assertion inserted only for temporary debugging.Ted Kremenek2007-11-141-1/+0
| | | | llvm-svn: 44131
* Added missing break statement.Ted Kremenek2007-11-141-12/+13
| | | | | | | Reordered serialization methods for FunctionTypeProto and FunctionTypeNoProto to be alphabetical by serialized type name. llvm-svn: 44130
* Implemented serialization of EnumDecl and EnumConstantDecl.Ted Kremenek2007-11-141-2/+68
| | | | llvm-svn: 44127
* Implemented serialization of FieldDecls.Ted Kremenek2007-11-141-0/+21
| | | | llvm-svn: 44126
* Implemented serialization of RecordDecls. Changed serialization of TagType toTed Kremenek2007-11-142-6/+61
| | | | | | | have an owning pointer to the referred TagDecl. This should hopefully fix a bug where TagDecls (including decls from structs, etc.) were not serialized. llvm-svn: 44106
* Implemented serialization of FunctionTypeNoProto.Ted Kremenek2007-11-141-4/+20
| | | | llvm-svn: 44094
* Implemented serialization of VariableArrayTypes.Ted Kremenek2007-11-141-0/+23
| | | | llvm-svn: 44093
* Implemented serialization of TypedefType.Ted Kremenek2007-11-141-0/+26
| | | | llvm-svn: 44092
* Implemented serialization of ConstantArrayType.Ted Kremenek2007-11-141-0/+25
| | | | llvm-svn: 44091
* Implemented serialization of TagTypes.Ted Kremenek2007-11-141-1/+19
| | | | llvm-svn: 44090
* Modified ASTContext::getTagDeclType() to accept a NULL pointer for the passedTed Kremenek2007-11-141-4/+11
| | | | | | | | | | | | in TagDecl*. This allows the deserializer to use ASTContext to create the TagTypes. Deserialize TagTypes then rely on pointer-backpatching to resolve the decls. This may not be the interface that we want, but as the implementation of TagTypes will potentially change significantly in the future, I'm leaving this for now. An appropriate FIXME is in place. llvm-svn: 44089
* Type encoding for structs.Fariborz Jahanian2007-11-131-1/+11
| | | | llvm-svn: 44087
* Implemented serialization of AsmStmt (or rather what is currently implementedTed Kremenek2007-11-131-0/+15
| | | | | | in AsmStmt). llvm-svn: 44077
* Fixed bug in FunctionDecl serialization where we crashed when theTed Kremenek2007-11-131-7/+17
| | | | | | | FunctionDecl had decls for its parameters but still had greater than 0 arguments. llvm-svn: 44076
* Implemented serialization for SizeOfAlignOfTypeExpr.Ted Kremenek2007-11-131-0/+21
| | | | llvm-svn: 44075
* Implemented serialization for MemberExpr.Ted Kremenek2007-11-131-0/+19
| | | | llvm-svn: 44074
* Rewrote type serialization to used the same methodology as we do for Decls.Ted Kremenek2007-11-132-456/+82
| | | | | | | | Removed tons of dead code in ASTContext concerning how types use to be serialized. Removed serialization methods from QualType that are no longer used. llvm-svn: 44070
* improve handling of address of global when checking forChris Lattner2007-11-131-0/+22
| | | | | | constants and initializers. Patch by Sanghyeon Seo, thanks! llvm-svn: 44049
* Renamed all serialization "Materialize" methods to "Create" to conform withTed Kremenek2007-11-133-13/+13
| | | | | | the new serialization API. llvm-svn: 44035
* Restructured serialization code for decls to make it cleaner, easier toTed Kremenek2007-11-131-114/+188
| | | | | | | understand, and batched the emission owned subobjects (using BatchEmitOwnedPtr) to get a smaller output bitcode size. llvm-svn: 44033
* Patch to do statically typed ivar references.Fariborz Jahanian2007-11-121-0/+4
| | | | llvm-svn: 44028
* Add category method definitions incrementally, removing a FIXME (like we do ↵Steve Naroff2007-11-121-20/+27
| | | | | | for class implementations). llvm-svn: 44027
* In Stmt serialization, renamed directEmit to EmitImpl andTed Kremenek2007-11-121-105/+105
| | | | | | directMaterialize to CreateImpl. llvm-svn: 44020
* Now that we can refer to instance variables, make sure they are considered ↵Steve Naroff2007-11-121-0/+2
| | | | | | lvalues. llvm-svn: 44017
* Implement instance variable references.Steve Naroff2007-11-123-0/+22
| | | | llvm-svn: 44016
* - Minor cleanup to yesterday's changes to Sema::ObjcActOnStartOfMethodDef();Steve Naroff2007-11-121-0/+17
| | | | | | | | - Add Sema::CurMethodDecl, in preparation for adding ObjcIvarRefExpr. - Add ObjcInterfaceDecl::lookupInstanceVariable(), in prep for adding ivars. - A couple renames in ObjcInterfaceDecl, while I was in the vicinity:-) llvm-svn: 44015
* This is the last 5% of the solution to teaching Sema::ActOnInstanceMessage() ↵Steve Naroff2007-11-111-22/+2
| | | | | | | | | | | | | | | about private methods (r43989). While the diff is large, the idea is very simple. When we parse method definitions (in an @implementation), we need to add them incrementally (rather than wait until the @end). Other details... - Renamed Sema::ActOnAddMethodsToObjcDecl() to Sema::ActOnAtEnd(). The methods are now optional arguments. - Removed Parser::AllImplMethods (a nice cleanup). - Added location info to ObjcImplementationDecl (since we will need it very soon:-) - Modified message.m test to no longer allow the bogus diagnostic. llvm-svn: 43995
* Teach Sema::ActOnInstanceMessage() about private methods. That is, methods ↵Steve Naroff2007-11-111-0/+27
| | | | | | | | | | declared in an implementation (but not listed in the interface). This commit is only 95% of the bug fix. The last piece to this puzzle is to add the method decls to the implementation incrementally (as we encounter them). At the moment, the methods aren't added until we see an @end (which is too late). I will complete this later... llvm-svn: 43989
* Recognize ObjCStringLiteral as a constant expression.Steve Naroff2007-11-091-0/+1
| | | | llvm-svn: 43946
OpenPOWER on IntegriCloud