summaryrefslogtreecommitdiffstats
path: root/clang/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Removed CFG.cpp's dependence on #including iostream.Ted Kremenek2007-12-171-3/+3
| | | | llvm-svn: 45116
* Fixed another case where sizeof() returns the size in bytes, not bits.Ted Kremenek2007-12-171-2/+8
| | | | | | | | | | | This parallels a previous patch (duplicate logic caused the bug to appear in multiple locations): r44316 (http://llvm.org/viewvc/llvm-project?rev=44316&view=rev). Patch provided by Nuno Lopes. llvm-svn: 45098
* Removed "isSizeOfExpr" mode from StmtIterator. It turned out not to beTed Kremenek2007-12-151-2/+2
| | | | | | so useful and introduced a few bugs. llvm-svn: 45051
* Added "mode" to StmtIterator to record if the expression being iteratedTed Kremenek2007-12-142-4/+4
| | | | | | | | | over is the subexpression of a sizeof(expression). Different clients will wish to handle iteration over such subexpressions differently, and can now easily query if they are iterating over such statements using the StmtIterator's inSizeOfExpr(). llvm-svn: 45047
* - Remove getInstanceMethods/getClassMethods API on ObjcInterfaceDecl, ↵Steve Naroff2007-12-141-60/+47
| | | | | | | | | | ObjcProtocolDecl, and ObjcCategoryDecl. These methods are replaced by the respective iterators on each class. - Add getInstanceMethodForSelector to ObjcInterfaceDecl, ObjcProtocolDecl, and ObjcCatgoryDecl. This hook will do a "shallow" lookup. This is a convenience method that reducing some of the iterator usage. - Various changes to convert all clients to the above API's... llvm-svn: 45046
* Added support to StmtIterator to traverse the size expression of a VLA typeTed Kremenek2007-12-142-4/+17
| | | | | | | | | | | declared in a sizeof. For example: sizeof(int[foo()]); the expression "foo()" is an expression that is executed during the evaluation of sizeof. llvm-svn: 45043
* CFG bug fix: for sizeof(expressions), don't expand the control-flowTed Kremenek2007-12-131-6/+21
| | | | | | of "expressions", since they are not really evaluated. llvm-svn: 45015
* Patch to make ObjcQualifiedInterfaceType inherit ObjcInterfaceTypeFariborz Jahanian2007-12-132-12/+7
| | | | llvm-svn: 45014
* Updated serialization of ParmVarDecl to serialize out objcDeclQualifier.Ted Kremenek2007-12-131-5/+7
| | | | | | | Previously this field was serialized out in VarDecl (a parent class), but now the field belongs to ParmVarDecl. llvm-svn: 44989
* Moved ObjcDeclQualifier to ParmVarDecl from VarDecl.Fariborz Jahanian2007-12-131-3/+5
| | | | | | Ted, this change necessitates (de)/serialization of ParmVarDecl. llvm-svn: 44972
* TargetInfo no longer includes a reference to SourceManager.Ted Kremenek2007-12-122-12/+35
| | | | | | | | | | | | | | | Moved all clients of Diagnostics to use FullSourceLoc instead of SourceLocation. Added many utility methods to FullSourceLoc to provide shorthand for: FullLoc.getManager().someMethod(FullLoc.getLocation()); instead we have: FullLoc.someMethod(); Modified TextDiagnostics (and related classes) to use this short-hand. llvm-svn: 44957
* Encode enumeral types.Steve Naroff2007-12-121-1/+3
| | | | llvm-svn: 44956
* fix typoChris Lattner2007-12-121-2/+2
| | | | llvm-svn: 44932
* more cleanups changing things like getInstanceVariables to iterators.Chris Lattner2007-12-121-5/+4
| | | | llvm-svn: 44930
* resolve some fixmes and clean up some code by eliminating the get*Vars apis ↵Chris Lattner2007-12-121-21/+11
| | | | | | to some classes and use iterators instead. llvm-svn: 44927
* start cleaning up interfaces for objc bits and pieces by switching to anChris Lattner2007-12-121-17/+13
| | | | | | iterator interface. llvm-svn: 44926
* Added back VisitDeclStmt() to the StmtDumper, essentially reverting r44920:Ted Kremenek2007-12-121-9/+28
| | | | | | | | | | | | | http://llvm.org/viewvc/llvm-project?rev=44920&view=rev Putting VisitDeclStmt() was motivated because it called DumpDeclarator(), which printed out a little bit more information than just using the child_iterator interface to visit the subexpressions of DeclStmt. To avoid printing the initializers twice, DumpSubTree() now specially checks for DeclStmts; in such cases it calls VisitDeclStmt() without using the child_iterators to visit the subexpressions. llvm-svn: 44924
* Removed VisitDeclStmt(). The initializers of a DeclStmt are now automaticallyTed Kremenek2007-12-121-15/+0
| | | | | | | printed out by DumpSubTree() via the child_iterator interface. This fixes a bug where the initializers were being dumped twice. llvm-svn: 44920
* Unbreak -stats on cocoa.hChris Lattner2007-12-121-1/+6
| | | | llvm-svn: 44919
* Implemented type checking for pointer of objects of protocol-qualified types.Fariborz Jahanian2007-12-121-0/+30
| | | | | | | | Note that incompatible-protocol-qualified-types.m is currently failing. This is unrelated to this patch and Steve is looking at the general problem of not reporting incompitible pointer types in return stetement.. llvm-svn: 44897
* Fix a case where we'd return "is not a constant expr" withoutChris Lattner2007-12-111-2/+7
| | | | | | return a location. llvm-svn: 44889
* Fixed bug in CFG::PopulateBlkExprMap where the orderingTed Kremenek2007-12-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | between fetching the size of the expression map (for use as the next integer id for an Expr*) and the creation of the entry in the map could be non-deterministic. This could cause the size of the map to be incremented prior to the index being determine. On Linux the map entry would be created first, causing the map to the "size" to be incremented prior to it being queried. On Mac OS X we had the reverse behavior. Now the size is always queried prior to the new id being inserted into the map. This was the real cause of the bit-overrun triggered in PR 1847: http://llvm.org/bugs/show_bug.cgi?id=1847 Also reverted the change in patch 44813, which was a bogus fix to this problem: http://llvm.org/viewvc/llvm-project?rev=44813&view=rev llvm-svn: 44822
* Implemented when static typing is combined with protocols and use as receiverFariborz Jahanian2007-12-071-0/+42
| | | | | | type. llvm-svn: 44685
* Patch to implement "Protocol" as a built-in type declared asFariborz Jahanian2007-12-071-7/+2
| | | | | | "@class Protocol;" llvm-svn: 44670
* Fix a bug handling typedefs of functions, patch by Nuno Lopes!Chris Lattner2007-12-061-2/+2
| | | | llvm-svn: 44661
* make it more clear what 'foo' isChris Lattner2007-12-061-1/+1
| | | | llvm-svn: 44653
* Recognize CompoundLiteralExpr's as valid lvalue's.Steve Naroff2007-12-051-0/+2
| | | | | | Also updated a FIXME in Sema::CheckInitializer()... llvm-svn: 44602
* Implemented serialization of: ObjCEncodeExpr, ObjCSelectorExpr.Ted Kremenek2007-12-051-0/+37
| | | | llvm-svn: 44593
* Implemented serialization of ObjCStringLiteral.Ted Kremenek2007-12-041-1/+17
| | | | llvm-svn: 44568
* Implemented serialization for ObjcAtThrowStmt.Ted Kremenek2007-12-041-0/+14
| | | | llvm-svn: 44567
* Implemented serialization of ObjcAtTryStmt.Ted Kremenek2007-12-041-1/+16
| | | | llvm-svn: 44566
* Implemented serialization for ObjcAtFinallyStmt.Ted Kremenek2007-12-041-0/+14
| | | | llvm-svn: 44564
* Implemented serialization for ObjcAtCatchStmt.Ted Kremenek2007-12-041-0/+22
| | | | llvm-svn: 44563
* Fix for testcase that assigns a dereferenced reference to a pointer. TheBill Wendling2007-12-031-3/+10
| | | | | | | standard says that we should adjust the "reference to T" type to "T" before analysis. llvm-svn: 44530
* Fix isStructureType and isUnionType to ignore typedefs, as statedSeo Sanghyeon2007-12-021-2/+2
| | | | | | in the header. Patch by Cédric Venet. llvm-svn: 44519
* Compute side-effect for conditional expression.Fariborz Jahanian2007-12-011-0/+7
| | | | llvm-svn: 44492
* make the unused expression warning less noisy by not warning about comma ↵Chris Lattner2007-12-011-2/+9
| | | | | | | | exprs whose LHS and RHS both have side effects. llvm-svn: 44486
* simplify some code, add support for functions without a protoChris Lattner2007-12-011-1/+2
| | | | llvm-svn: 44485
* String literals are always valid LValues.Anders Carlsson2007-11-301-0/+1
| | | | llvm-svn: 44472
* GCC has an extension where the left hand side of the ? : operator can be ↵Anders Carlsson2007-11-301-3/+5
| | | | | | omitted. Handle this in a few more places. llvm-svn: 44462
* Added method "HandleTopLevelDeclaration" to ASTConsumer. This will eventuallyTed Kremenek2007-11-291-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | be the new hook that ASTStreamer calls to feed top-level Decls to ASTConsumers. The difference between "HandleTopLevelDeclaration" and "HandleTopLevelDecl" is that "HandleTopLevelDecl" is currently called by ASTStreamer for every top-level declaration, including those that appear within a Decl chain. Using the new interface, ASTStreamer would only call HandleTopLevelDeclaration for Decls that appear that the beginning of a Decl chain (i.e., a group of related decls). To preserve the behavior that all subclasses of ASTConsumer currently expect, the default implementation of HandleTopLevelDeclaration simply calls HandleTopLevelDecl, and for decl chains it calls HandleTopLevelDecl for each Decl* in a chain of Decls. The advantage of this interface is that some subclasses of ASTConsumer only really want the Decl chain, and not each individual Decl passed to them. This extra level of indirection allows subclasses to override the default behavior if they so desire. llvm-svn: 44444
* Added "isExact" field to FloatingLiteral. This flag indicates whether or notTed Kremenek2007-11-291-1/+3
| | | | | | | | the APFloat representing the parsed literal can represent the literal value exactly. This is useful when performing various semantic checks on the code, and issuing appropriate warnings to users. llvm-svn: 44423
* Add more intrinsics. We can now correctly parse both Carbon.h and Cocoa.h ↵Anders Carlsson2007-11-281-5/+9
| | | | | | without having to do -arch ppc. llvm-svn: 44392
* fix compilation error noticed by Nuno LopesChris Lattner2007-11-281-1/+2
| | | | llvm-svn: 44388
* add several cases that Expr::hasStaticStorage missed, pointed out by Oliver HuntChris Lattner2007-11-271-0/+9
| | | | llvm-svn: 44376
* sizeof is defined by bitsin(char) not by units of 8 bits.Chris Lattner2007-11-271-4/+7
| | | | llvm-svn: 44369
* handle __vector_size__ like vector_sizeChris Lattner2007-11-271-1/+1
| | | | llvm-svn: 44358
* Add builtin type signature support for vector types. Add correct type ↵Anders Carlsson2007-11-271-4/+16
| | | | | | signatures for a bunch of MMX builtins. We now parse all the intrinsics in mmintrin.h llvm-svn: 44357
* Removed dependence on #including iostream.Ted Kremenek2007-11-261-3/+2
| | | | llvm-svn: 44338
* Reverted changed to getTagDeclType() introduced in patch 44089:Ted Kremenek2007-11-261-8/+5
| | | | | | | | http://llvm.org/viewvc/llvm-project?view=rev&revision=44089 "Decl" once again can no longer be NULL, so the NULL checks are not needed. llvm-svn: 44336
OpenPOWER on IntegriCloud