summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix a couple of bugs found by Neil Booth in the const-ness checking.Eli Friedman2008-05-211-3/+8
| | | | llvm-svn: 51361
* initialize variable and fix a bunch of test failuresNuno Lopes2008-05-201-1/+1
| | | | llvm-svn: 51326
* Perform stricter/more accurate checking for C99 constant expressionsEli Friedman2008-05-202-7/+347
| | | | | | | | | | | | | in Sema, per discussion on mailing list. This doesn't cause any changes in the test results. I'll probably add some more tests at some point, but it's an open question what we need to accept to be compatible with real code. This doesn't touch the existing isConstantExpr method on Expr; that should be addressed somehow eventually (either removed or refined to whatever is appropriate). llvm-svn: 51318
* Add __builtin_frame_address and __builtin_return_address gcc builtins to Eli Friedman2008-05-202-1/+17
| | | | | | Sema. No codegen yet. llvm-svn: 51307
* Be a bit more defensive in SemaInit.Eli Friedman2008-05-201-1/+7
| | | | llvm-svn: 51301
* Add some more checking for compound literals.Eli Friedman2008-05-201-1/+14
| | | | llvm-svn: 51300
* Try to plug some memory leaks...Ted Kremenek2008-05-201-2/+9
| | | | | | | | | | | | | | | | 1) Sema::ParseAST now constructs a TranslationUnit object to own the top-level Decls, which releases the top-level Decls upon exiting ParseAST. 2) Bug fix: TranslationUnit::~TranslationUnit handles the case where a Decl is added more than once as a top-level Decl. 3) Decl::Destroy is now a virtual method, obviating the need for a special dispatch based on DeclKind. 3) FunctionDecl::Destroy now releases its Body using its Destroy method. 4) Added Stmt::Destroy and Stmt::DestroyChildren, which recursively delete the child ASTs of a Stmt and call their dstors. We may need to special case dstor/Destroy methods for particular Stmt subclasses that own other dynamically allocated objects besides AST nodes. 5) REGRESSION: We temporarily are not deallocating attributes; a FIXME is provided. llvm-svn: 51286
* Switch on SemaInit; this makes some code in SemaDecl dead, but I'll give Eli Friedman2008-05-191-1/+1
| | | | | | it a few days to make sure there aren't any significant regressions. llvm-svn: 51273
* Adjust warning so that it doesn't fire when there is an error.Eli Friedman2008-05-191-3/+4
| | | | llvm-svn: 51269
* Add errors for some illegal constructs (specifically, "int a = {{3}};" Eli Friedman2008-05-191-10/+14
| | | | | | and "int a = {};"). I'll adjust the tests in a bit. llvm-svn: 51265
* Some more SemaInit cleanup.Eli Friedman2008-05-191-36/+42
| | | | llvm-svn: 51262
* Various fixes; solves (almost) all of the test regressions that would be Eli Friedman2008-05-192-115/+84
| | | | | | caused by enabling SemaInit. llvm-svn: 51261
* Add proper type-checking for pointer additiion; before, we were acceptingEli Friedman2008-05-181-6/+27
| | | | | | addition with a pointer and an integer even when it didn't make sense. llvm-svn: 51228
* Sema-based fix for PR2334. The issue is that even if the two sides of Eli Friedman2008-05-161-2/+5
| | | | | | | | | | the condidtional have compatible types, they are not necessarily the same type. Therefore, we cast to the composite type. As a hack, for the moment we assume that the composite type is the type of the left-hand expression; this isn't correct, but it's good enough for most purposes. llvm-svn: 51202
* Review nit.Eli Friedman2008-05-161-2/+2
| | | | llvm-svn: 51196
* Clean up ownership per review comment.Eli Friedman2008-05-161-24/+13
| | | | llvm-svn: 51195
* Fixed another regression introduced by r51113 caused by some refactoringTed Kremenek2008-05-151-3/+3
| | | | | | | | | | | | | | in Sema::CheckFunctionCall: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20080512/005706.html The bug was that the logic from the helper methods used by CheckFunctionCall were being inverted (a subtle bug). This would cause the parser to discard any valid AST nodes involving several builtins (see patch). This removes the last regression failure I'm seeing in the test suite: Analysis-Apple/NoReturn. llvm-svn: 51168
* Comments fix.Argyrios Kyrtzidis2008-05-152-2/+2
| | | | llvm-svn: 51151
* Implementation of __builtin_shufflevector, a portable builtin capable of Eli Friedman2008-05-143-10/+97
| | | | | | | | | expressing the full flexibility of the LLVM shufflevector instruction. The expected immediate usage is in *mmintrin.h, so that they don't depend on the mess of gcc-inherited (and not completely implemented) shuffle builtins. llvm-svn: 51113
* Change CRLF line endings to LF.Argyrios Kyrtzidis2008-05-141-6/+6
| | | | llvm-svn: 51103
* An array of VLAs is a VLA. Shouldn't make any significant difference at Eli Friedman2008-05-141-2/+4
| | | | | | | the moment, but it what you'd expect in the AST from reading the standard, and it should make VLA codegen a bit more strightforward. llvm-svn: 51086
* Both operands to && have to be scalars, not just one.Eli Friedman2008-05-131-1/+1
| | | | llvm-svn: 51065
* Fix <rdar://problem/5924576> clang -fsyntax-only generates "redefinition" ↵Steve Naroff2008-05-121-1/+4
| | | | | | | | errors when parsing AppKit that gcc does not. Teach Sema::MergeVarDecl() about __private_extern__. llvm-svn: 51005
* Fix <rdar://problem/5928590> clang -fsyntax-only: "incompatible operand ↵Steve Naroff2008-05-121-2/+9
| | | | | | types ('int' and 'void')" on input that 'gcc -fsyntax-only' eats llvm-svn: 51002
* -Implement proper name lookup for namespaces.Argyrios Kyrtzidis2008-05-094-173/+452
| | | | | | | -identifierResolver exposes an iterator interface to get all decls through the scope chain. -The semantic staff (checking IdentifierNamespace and Doug's checking for shadowed tags were moved out of IdentifierResolver and back into Sema. IdentifierResolver just gives an iterator for all reachable decls of an identifier. llvm-svn: 50923
* Add attribute "format" support for typedefs of function pointers.Ted Kremenek2008-05-091-0/+2
| | | | llvm-svn: 50906
* Handle all attributes on a parameterNate Begeman2008-05-091-1/+2
| | | | llvm-svn: 50903
* Extend vector member references to include {.hi, .lo, .e, .o} which return aNate Begeman2008-05-091-7/+28
| | | | | | | | | | | | | vector of the same element type and half the width, with the high, low, even, and odd elements respectively. Allow member references to member references, so that .hi.hi gives you the high quarter of a vector. This is fairly convenient syntax for some insert/extract operations. Remove some unnecessary methods/types in the ExtVectorElementExpr class. llvm-svn: 50892
* simplify some code, don't assume that sizeof(long) < sizeof(long long).Chris Lattner2008-05-091-11/+12
| | | | llvm-svn: 50888
* Fix rdar://5921025 a crash on the included testcase.Chris Lattner2008-05-091-1/+2
| | | | llvm-svn: 50885
* Added initial support for supporting __NSString__ in attribute "format".Ted Kremenek2008-05-081-8/+58
| | | | | | | Still need to iron out some of the semantics (fixmes are present). This addresses <rdar://problem/5916348> llvm-svn: 50866
* Synthesized getter/setter method declarations need not haveFariborz Jahanian2008-05-071-1/+2
| | | | | | | an implementation. This fixes couple of failing prperty tests caused by my previous patch. llvm-svn: 50830
* This patch introduces declaration of getter methods for ObjC2'sFariborz Jahanian2008-05-071-8/+13
| | | | | | | properties. Couple of property tests will fail with this patch. Will fix them next. llvm-svn: 50818
* Diagnose attempts to use C++ default arguments outside of a function declarationDouglas Gregor2008-05-074-9/+46
| | | | llvm-svn: 50799
* Patch to refactor setter/getter names of property attributes into SelectorFariborz Jahanian2008-05-062-2/+5
| | | | | | | (was IdentifierInfo * before). This will make method declartations whole lot easier. llvm-svn: 50747
* Several fixes to SemaInit.cpp. It's still not enabled (since it fails a few ↵Steve Naroff2008-05-062-33/+50
| | | | | | tests). Expect to enable it very soon. llvm-svn: 50688
* Fix rdar://5905347 a crash on invalid builtin, due to theChris Lattner2008-05-051-4/+16
| | | | | | params not getting installed for builtins when synthesized. llvm-svn: 50676
* Add support for -Wimplicit-function-declaration, rdar://5907433Chris Lattner2008-05-051-2/+3
| | | | llvm-svn: 50672
* percolate @optional/@required protocols down to ASTs forFariborz Jahanian2008-05-052-2/+10
| | | | | | properties declared in the protocol. llvm-svn: 50662
* This patch is about merging ObjC2's properties declared in classFariborz Jahanian2008-05-022-13/+76
| | | | | | | protocols into class's property list and performing semantics on them for while doing so. llvm-svn: 50587
* Replace Sema::CheckInitializerListTypes() with a helper class ↵Steve Naroff2008-05-013-0/+324
| | | | | | | (InitListChecker) that synthesizes implicit InitListExpr's when appropriate (see InitListExpr comments in Expr.h for more details). I also moved the code to SemaInit.cpp, to help reduce clutter in SemaDecl.cpp. NOTE: This work is incomplete and still fails many tests (as a result, it isn't enabled yet). Nevertheless, I wanted to check it in so I can work on it from home. llvm-svn: 50544
* Implicitly defined functions were getting the DeclContext of the function ↵Argyrios Kyrtzidis2008-05-011-7/+9
| | | | | | | | where they appeared, causing the bug: http://llvm.org/bugs/show_bug.cgi?id=2266. Fix it by making implicitly defined functions get the DeclContext of translation unit. llvm-svn: 50538
* Patch to match and issue diagnostics on property type mismatch.Fariborz Jahanian2008-05-011-8/+4
| | | | llvm-svn: 50532
* More ObjC2 property semantics work. Work in progress.Fariborz Jahanian2008-05-012-23/+36
| | | | llvm-svn: 50508
* fix 'var unused' warning.Chris Lattner2008-04-301-2/+2
| | | | llvm-svn: 50484
* Parsing of namespaces:Argyrios Kyrtzidis2008-04-274-35/+133
| | | | | | | | | -NamespaceDecl for the AST -Checks for name clashes between namespaces and tag/normal declarations. This commit doesn't implement proper name lookup for namespaces. llvm-svn: 50321
* Use PushOnScopeChains to introduce a decl into scope.Argyrios Kyrtzidis2008-04-271-4/+2
| | | | llvm-svn: 50320
* initial support for recognizing __transparent_union__ attributesNuno Lopes2008-04-252-0/+27
| | | | | | comments on the ML will follow llvm-svn: 50262
* Patch to diagnose inconsistancies between properties declared in current andFariborz Jahanian2008-04-242-0/+71
| | | | | | its super class. This patch is incomplete. llvm-svn: 50228
* Patch to build AST for property implementation declarations andFariborz Jahanian2008-04-231-16/+18
| | | | | | to print declaration from its AST. llvm-svn: 50117
OpenPOWER on IntegriCloud