summaryrefslogtreecommitdiffstats
path: root/clang/AST
Commit message (Collapse)AuthorAgeFilesLines
...
* Add wchar_t type to ASTContext. Will be needed for wide strings, since Eli Friedman2008-02-121-0/+9
| | | | | | they are of type wchar_t[]. llvm-svn: 47004
* Fix type compatibility between constant and variable arrays.Eli Friedman2008-02-121-0/+4
| | | | llvm-svn: 47003
* Refine bug fix to Expr::isLvalue (commit r46917).Steve Naroff2008-02-101-0/+4
| | | | llvm-svn: 46919
* Change Expr::isLvalue() to allow the "void" type. This fixes bz2000 ↵Steve Naroff2008-02-101-3/+0
| | | | | | | | submitted by Neil Booth. Neil, can you point me to the place in the C99 spec that says this is allowed? I thought Expr::isLvalue() conformed to the spec, which says "C99 6.3.2.1: an lvalue is an expression with an object type or an incomplete type other than void.". Please advise. llvm-svn: 46917
* Put back the top-level asm code; all tests pass now.Anders Carlsson2008-02-082-1/+29
| | | | llvm-svn: 46868
* Back out 46855 for now, it causes test failures on Darwin.Anders Carlsson2008-02-082-29/+1
| | | | llvm-svn: 46867
* Handle top-level asm declarations.Anders Carlsson2008-02-072-1/+29
| | | | llvm-svn: 46855
* Minor reordering of the serialization of the fields of MemberExpr to resultTed Kremenek2008-02-061-2/+2
| | | | | | in a smaller encoding on disk. llvm-svn: 46832
* Make sure to propagate qualifiers through the member operator.Eli Friedman2008-02-061-1/+3
| | | | llvm-svn: 46830
* Fix the codegen of structs with flexible array members.Eli Friedman2008-02-061-4/+16
| | | | llvm-svn: 46806
* Be a bit stricter about array type compatibility.Eli Friedman2008-02-061-6/+10
| | | | llvm-svn: 46799
* move the codegen ASTConsumer out of the driver into libcodegen,Chris Lattner2008-02-061-1/+2
| | | | | | | eliminating a bunch of forwarding methods and generally simplifying things. llvm-svn: 46792
* Handle simple asm statements correctly.Anders Carlsson2008-02-052-3/+6
| | | | llvm-svn: 46777
* Add experimental support for address space qualified types. Address spaceChristopher Lamb2008-02-043-16/+150
| | | | | | qualifiers use the __attribute__((address_space(id))) syntax. llvm-svn: 46691
* For ObjCAtCatchStmt, removed field 'NextAtCatchStmt' (which referenced the ↵Ted Kremenek2008-02-012-10/+8
| | | | | | | | | | | | | | next @catch) and put the the next ObjcAtCatchStmt* as part of SubExprs. This fixes a bug with iterating over the children of ObjcAtCatch, where the next @catch was not properly being iterated over as a child. Altered serialization of ObjCAtCatchStmt to reflect this new layout of its subexpressions, and fixed an ownership issue with the next @catch not being serialized as an owned pointer. llvm-svn: 46647
* Make CallExpr::isBuiltinConstantExpr slightly more efficient.Anders Carlsson2008-01-311-3/+10
| | | | llvm-svn: 46594
* Add support for CallExpr::isBuiltinConstantExpr(). For now, this hook is ↵Steve Naroff2008-01-311-0/+20
| | | | | | | | | | | | | | used to support CFConstantStrings. Can be extended to support other built-in functions. This allows the following code to compile without error... #include <CoreFoundation/CoreFoundation.h> #define CONST_STRING_DECL(S, V) const CFStringRef S = (const CFStringRef)__builtin___CFStringMakeConstantString(V); CONST_STRING_DECL(kCFTimeZoneSystemTimeZoneDidChangeNotification, "kCFTimeZoneSystemTimeZoneDidChangeNotification") llvm-svn: 46592
* Added method "printTerminator" to CFGBlock so that external clients canTed Kremenek2008-01-301-12/+14
| | | | | | | | | | pretty-print a block's terminator. When building CFGs, for IfStmts ('if'), we no longer add the ParenExpr that is the subexpression of the IfStmt to the CFG; instead we add its first descendant subexpression that is not a ParenExpr. llvm-svn: 46580
* Implement first round of feedback on __builtin_overloadNate Begeman2008-01-302-3/+3
| | | | llvm-svn: 46572
* Abolish a bunch of Xcode inserted tabs.Steve Naroff2008-01-301-5/+5
| | | | llvm-svn: 46566
* Fixed misc. issues raised by Chris L. on @synchronized implementation.Fariborz Jahanian2008-01-301-7/+4
| | | | llvm-svn: 46558
* move some constructors out of line and fix indentation in ↵Chris Lattner2008-01-301-13/+43
| | | | | | ObjCAtThrowStmt::getSourceRange. llvm-svn: 46547
* Rewriting of @synchronized. This has one FIXME in it. But this should allow ↵Fariborz Jahanian2008-01-292-8/+6
| | | | | | @sychronized to be rewritten. llvm-svn: 46533
* - Hooked up deserialization of ObjCAtSynchronizedStmt Stmt::Create().Ted Kremenek2008-01-291-14/+17
| | | | | | | | | - Some minor optimizations of the encoding format for ObjCAtSynchronizedStmt. - Reordered methods so that the deserialization methods for ObjCAtSynchronizedStmt appear in alphabetical order with the corresponding methods of the other AST nodes. llvm-svn: 46529
* AST for @synchronized.Fariborz Jahanian2008-01-292-0/+24
| | | | llvm-svn: 46524
* Tighten up ASTContext::typesAreCompatible()...it needs to make sure the ↵Steve Naroff2008-01-291-0/+3
| | | | | | | | qualifiers match. The comment and C99 citation for this routine were correct...the code needed to conform to the comment/spec. This fixes the test added below. Tightening up this routine forced tweaks to Sema::CheckSubtractionOperands() and Sema::CheckCompareOperands(). For example, they both need to operate on the unqualified pointee... llvm-svn: 46522
* Bunch of type defs, etc. for @synchronized.Fariborz Jahanian2008-01-291-0/+11
| | | | llvm-svn: 46520
* Implement __builtin_offsetof.Anders Carlsson2008-01-291-1/+47
| | | | llvm-svn: 46515
* Fix bz1950. ASTContext::functionTypesAreCompatible() needs to operate on the ↵Steve Naroff2008-01-291-1/+4
| | | | | | unqualified parameter types (per C99 6.7.5.3p15). llvm-svn: 46472
* Added back logic in patch r46361 ↵Ted Kremenek2008-01-261-8/+40
| | | | | | | | | | | | (http://llvm.org/viewvc/llvm-project?rev=46361&view=rev) with the addition of some previously missing NULL pointer checks. Modified the UninitializedValues analysis to not expect that every Expr* at the block-level is a block-level expression (we probably need to change the name of such expressions to something truer to their meaning). llvm-svn: 46380
* Reverting r46361 (http://llvm.org/viewvc/llvm-project?rev=46361&view=rev) untilTed Kremenek2008-01-251-35/+8
| | | | | | I diagnose the source of the failures it causes in the test suite. llvm-svn: 46376
* fix isIntegerConstantExpr evaluation of unary !.Chris Lattner2008-01-251-1/+1
| | | | llvm-svn: 46364
* When adding assignment expressions to the set of block-level expressions, onlyTed Kremenek2008-01-251-8/+35
| | | | | | | include the assignment expressions whose result (as in the value of the expression) is used by other expressions. llvm-svn: 46361
* Support checking and codegen of constant vector globalsNate Begeman2008-01-251-1/+2
| | | | llvm-svn: 46343
* Exclude vectors from Type::isScalar() predicate.Steve Naroff2008-01-241-1/+0
| | | | llvm-svn: 46328
* Missing ObjC stuff. Patch by Mike Stump.Fariborz Jahanian2008-01-231-2/+13
| | | | llvm-svn: 46268
* Problem with ObjC's type-encoding of nested structs causing infinit recursion.Fariborz Jahanian2008-01-221-10/+22
| | | | llvm-svn: 46260
* Add a predicate/getter when checking for incomplete array types ("[]").Steve Naroff2008-01-211-0/+16
| | | | llvm-svn: 46231
* Modified the notion of "Block-level expressions" in CFGs to include Stmt*. ThisTed Kremenek2008-01-171-11/+15
| | | | | | | | | | | | | | | | | | | | | | | | is because GNU-style Statement-expressions cause the last statement in the statement-expression to act like an expression. We now have two notions: block-level statements and block-level expressions. The former are all Stmt* that appear in the list of statements in CFGBlocks. The latter is the subset of the former; these block-level statements are used as subexpressions somewhere in the AST. CFG::isBlockExpr() returns true for the latter, not the former (previously isBlockExpr() always returned true for non-Expr Stmt*). Modified the LiveVariables analysis to also track liveness state for block-level expressions (using the updated definition of block-level expressions). Modified the dataflow solver so that when it records values for block-level statements, it records the dataflow value *before* the transfer function for a Stmt* is evaluated (not after). This is more in sync in what clients will want. Modified CFGStmtVisitor to record the current block-level statement. llvm-svn: 46143
* Implement basic overload support via a new builtin, __builtin_overload.Nate Begeman2008-01-172-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | __builtin_overload takes 2 or more arguments: 0) a non-zero constant-expr for the number of arguments the overloaded functions will take 1) the arguments to pass to the matching overloaded function 2) a list of functions to match. The return type of __builtin_overload is inferred from the function whose args match the types of the arguments passed to the builtin. For example: float a; float sinf(float); int sini(int); float b = __builtin_overload(1, a, sini, sinf); Says that we are overloading functions that take one argument, and trying to pass an argument of the same type as 'a'. sini() does not match since it takes and argument of type int. sinf does match, so at codegen time this will turn into float b = sinf(a); llvm-svn: 46132
* Renamed getSynthesizedSelectorSize to getSynthesizedMethodSize. Compute ↵Fariborz Jahanian2008-01-171-4/+11
| | | | | | | | method name size in accordance with how rewriter synthesizes method name. llvm-svn: 46131
* Added method Expr::IgnoreParens(), which returns the first non-ParenExpr Expr*.Ted Kremenek2008-01-171-0/+8
| | | | | | | Refactored the use of this method into both the Sema module and Analysis module, which were using their own static functions that did the same thing. llvm-svn: 46129
* Computed length of a __func__ identifier used in an objective-c method ↵Fariborz Jahanian2008-01-171-0/+9
| | | | | | | | correctly, when creating its type. llvm-svn: 46109
* Simplify comment.Steve Naroff2008-01-161-2/+1
| | | | llvm-svn: 46103
* Type::isArithmeticType(): disallow incomplete enum decls.Steve Naroff2008-01-161-2/+5
| | | | | | Bug submitted by Eli. llvm-svn: 46102
* - Change Type::isComplexType() to exlude GCC's complex integer extension. In ↵Steve Naroff2008-01-151-1/+3
| | | | | | | | | | general, we will keep the lowest level Type predicates "pure" (i.e. true to the C99 spec). - Modify Sema::UsualArithmeticConversions() to work with the new definition of Type::isComplexType(). This is a nice cleanup and also fixes a bug submitted by Eli (which I've added to the test suite). llvm-svn: 46005
* Rework commit r45976, which was incorrect.Steve Naroff2008-01-151-3/+23
| | | | | | | | - Add Type::isComplexIntegerType(), Type::getAsComplexIntegerType(). - Don't inlude complex types with Type::isIntegerType(), which is too general. - Use the new predicates in Sema::UsualArithmeticConversions() to recognize/convert the types. llvm-svn: 45992
* Teach Type::isIntegerType() about GCC's __complex__ integer extensions...Steve Naroff2008-01-141-0/+3
| | | | | | Bug submitted by Eli. llvm-svn: 45976
* When serializing CompoundLiteralExpr, serialize out the file scope flag beforeTed Kremenek2008-01-141-2/+2
| | | | | | | serializing the subexpression (Init), as this results in a more efficient encoding in the bitstream. llvm-svn: 45967
* Record if a compound literal expression is @ file scope. This allows us to ↵Steve Naroff2008-01-142-1/+5
| | | | | | | | implement C99 6.5.2.5p6. This could have been done without modifying the AST (by checking the decl type and passing the info down to isContextExpr), however we concluded this is more desirable. Bug/patch by Eli Friedman! llvm-svn: 45966
OpenPOWER on IntegriCloud