aboutsummaryrefslogtreecommitdiff
path: root/AST
AgeCommit message (Collapse)Author
2008-01-14Change uses of std::cerr/std::cout to llvm::Lcerr/llvm::cout, and removeTed Kremenek
#include<iostream>. Patch provided by Sam Bishop. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45962 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14Revert r45951, Chris says it violates the C99 spec.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45961 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14Fix ASTContext::typesAreCompatible when analyzing a function type with Chris Lattner
proto and function type without proto. It would never call 'functionTypesAreCompatible' because they have different type classes. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45952 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-14Rewrite Expr::isNullPointerConstant() to deal with multiple levels of ↵Steve Naroff
explicit casts. Now, isNullPointerConstant() will return true for the following: "(void*)(double*)0" git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45951 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-12Fix the type of predefined identifiers like __func__. Patch byChris Lattner
Eli Friedman! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45906 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-12Add first pieces of support for parsing and representing Chris Lattner
extern "C" in C++ mode. Patch by Mike Stump! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45904 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-11Renamed ProgramEdge to ProgramPoint and changed subclasses of ProgramEdgeTed Kremenek
to have a much simpler, cleaner interpretation of what is a "location" in a function (as encoded by a CFG). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45846 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10- Teach Expr::isConstantExpr() about InitListExpr's (and offsetof, since I ↵Steve Naroff
noticed it was missing). - Rename CheckInitializer() to CheckInitializerTypes(). - Removed the isStatic argument to CheckInitializerTypes() and all of it's subroutines. Checking for constant expressions is now done separately. - Added CheckForConstantInitializer(). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45840 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-10Allow messaging expression as foreach's collection expression.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45793 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09Add a FIXME to commit r45784. Thanks mrs!Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45790 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09Fix ASTContext::typesAreCompatible to allow for int/enum compatibility (C99 ↵Steve Naroff
6.7.2.2p4). Fix Sema::MergeFunctionDecl to allow for function type compatibility (by using the predicate on ASTContext). Function types don't have to be identical to be compatible... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45784 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09Fix isIntegerConstantExpr to compare against zero for casts to bool instead ofChris Lattner
truncating. This allows us to compile: void foo() { static _Bool foo = 4; } into: @foo1 = internal global i8 1 instead of: @foo1 = internal global i8 4 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45779 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-09Teach Expr::isConstantExpr() about CompoundLiterals.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45764 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-08Added VISIBILITY_HIDDEN to classes/structs in anonymous namespace.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45749 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Verify/add code to make sure types passed to interfaceTypesAreCompatibleFariborz Jahanian
are canonical. Asst in interfaceTypesAreCompatible if they are not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45717 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Substituted all instances of the string "Objc" for "ObjC". This fixesTed Kremenek
some naming inconsistencies in the names of classes pertaining to Objective-C support in clang. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45715 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-07Minor tweak to serialization of ObjcForCollectionStmt: the three owned pointersTed Kremenek
are now emitted in a batch, which reduces the metadata overhead in the serialized bitcode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45710 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-05Moved serialization code for ObjcForCollectionStmt to be in alphabetical orderTed Kremenek
with the rest of the Objective-C serialization code. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45609 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-04Minor changes as suggested by Chris L.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45598 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03Couple more uninitialized before use warning elimination.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45547 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-03Remove cause of misc. "variable might be used uninitialized in this ↵Fariborz Jahanian
function" warnings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45546 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02New declarations/defs for Objc2's foreach-statement. This is work in progress.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45511 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02Fix PR1895: a crash on an ugly gcc extension.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45505 91177308-0d34-0410-b5e6-96231b3b80d8
2008-01-02Compute the proper sourcerange for an CompoundLiteralExpr.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45504 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29remove attribution from makefiles.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45412 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Don't attribute in file headers anymore. See llvmdev for theChris Lattner
discussion of this change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45410 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-29Fix OCUVector case in struct layout code.Christopher Lamb
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45396 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-28Add accessors + iterator interface.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45378 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21This patch implements some of the more obscure type-checking involvingFariborz Jahanian
'id' quallified with protocols and static types which have categories and inheritance which implement these protocols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45294 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Fixed successor order for CFG basic blocks when handling: x && y. The bugTed Kremenek
is best explained by illustration: [ B2 ] 1: x T: [B2.1] && ... Predecessors (1): B4 Successors (2): B3 B1 Block "B3" should be the block where we evaluate "y" when "x" evaluates to true. Previously we had the successor list reversed. Now this behavior matches with how we handle other conditional branches. Thanks to Nuno Lopes for reporting this problem. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45288 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21Patch to compare to objective-c static types where one or the otherFariborz Jahanian
(but not both) may be a protocol qualified static type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45283 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-21More objective-c type analysis. This time involving objective typesFariborz Jahanian
of conforming protocols (or not). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45276 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20More objective-c type checking. This time comparing objective-c known objects.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45269 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20Converted uses of scoped_ptr to OwningPtr.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45265 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-20Patch to do type-checking for objctive-c's object types.Fariborz Jahanian
More is yet to come. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45263 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Various tweaks to the get/lookup instance/class method API's.Steve Naroff
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45224 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Removed "SourceFile" from TranslationUnit. This same information will (soon)Ted Kremenek
be available by querying the SourceManager within the ASTContext referenced by the TranslationUnit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45223 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19Removed storing inode and device number in TranslationUnit.Ted Kremenek
Added "SourceFile" string to TranslationUnit to record corresponding source file. Updated serialization of TranslationUnits and logic in the driver to correctly pass the source file information to the serializer. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45211 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19fix some crazy indentationChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45210 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-19This patch concludes implementation of dynamic objective-c type qualified byFariborz Jahanian
protocol list. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45203 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Moved ReadBitcodeFile and EmitBitcodeFile out of TranslationUnit and made themTed Kremenek
the standalone functions ReadASTBitcodeFile and EmitASTBitcodeFile respectively. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45180 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Fixed broken includes introduced by recent (incomplete) patch toTed Kremenek
TranslationUnit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45177 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Moved TranslationUnit.h to include path.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45176 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Moved TranslationUnit from Driver to AST library.Ted Kremenek
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45175 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Refactoring work. ObjcQualifiedIdType is now derived from 'Type'.Fariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45174 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18remove the loc argument to Type::isConstantSizeType, which isn't useful.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45155 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Fix the location we emit the "not a constant" error for this:Chris Lattner
int foo() { typedef int x[foo()]; static int y = sizeof(x); } previously we'd emit it on the typedef, which made not sense at all. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45154 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-18Fix PR1863: an assertion due to not setting a location on return fromChris Lattner
this method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45153 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Fixed a comment describing a functionFariborz Jahanian
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45125 91177308-0d34-0410-b5e6-96231b3b80d8
2007-12-17Patch to implemented objective-c's dynamic object pointer qualified withFariborz Jahanian
the protocol list (id<P,...> types). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45121 91177308-0d34-0410-b5e6-96231b3b80d8