summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema
Commit message (Collapse)AuthorAgeFilesLines
...
* reject 'typedef int y; int test(x, y)'.Chris Lattner2008-04-061-1/+0
| | | | llvm-svn: 49270
* Fix handling of implicit int, resolving PR2012 and reverting (andChris Lattner2008-04-052-2/+10
| | | | | | subsuming) my patch for PR1999. llvm-svn: 49251
* Step #1 to fixing PR2012: c89 allows declspecs to be completely Chris Lattner2008-04-051-0/+6
| | | | | | | missing from function definitions only. If we see a function definiton with missing declspecs, just fudge in an int. llvm-svn: 49250
* Add explicit support for diagnosing implicit function decls.Steve Naroff2008-04-041-0/+17
| | | | | | Without this, the diagnostic is very confusing. The diag is now consistent with gcc as well. llvm-svn: 49214
* PR1963: Address of function is a constant expressionSeo Sanghyeon2008-04-041-0/+3
| | | | llvm-svn: 49212
* Change ObjCInterfaceDecl to inherit from NamedDecl (not TypeDecl). While ↵Steve Naroff2008-04-021-2/+1
| | | | | | | | ObjCInterfaceDecl is arguably a TypeDecl, it isn't a ScopedDecl. Since TypeDecl's are scoped, it makes sense to simply treat them as NamedDecl's. I could have fiddled a bit more with the hierarchy (in terms of creating a non-scoped TypeDecl), however this probably isn't worth the effort. I also finished unifying access to scope decl change by converting Sema::getObjCInterfaceDecl() to use Sema::LookupDecl(). This is much cleaner now:-) llvm-svn: 49107
* improve error to be something end users will actually understand :)Chris Lattner2008-04-021-2/+2
| | | | llvm-svn: 49097
* 1) Enforce C99 6.7.3p2: "Types other than pointer types derived fromChris Lattner2008-04-021-0/+7
| | | | | | | | | | | | | | object or incomplete types shall not be restrict-qualified." 2) Warn about qualifiers on function types: C99 6.7.3p8: "If the specification of a function type includes any type qualifiers, the behavior is undefined." 3) Implement restrict on C++ references. 4) fix some locations for various C++ reference diagnostics. llvm-svn: 49081
* Fix several bugs in array -> pointer decomposition.Chris Lattner2008-04-021-0/+12
| | | | | | | | | | | | | | | | First, we got several CVR propagation cases wrong, which Eli pointed out in PR2039. Second, we didn't propagate address space qualifiers correctly, leading to incorrect lowering of code in CodeGen/address-space.c. Third, we didn't uniformly propagate the specifier in the array to the pointer ("int[restrict 4]" -> "int *restrict"). This adds an ASTContext::getArrayDecayedType member that handles the non-trivial logic for this seemingly simple operation. llvm-svn: 49078
* Fix PR2017 and silence some bogus errors.Chris Lattner2008-04-022-3/+10
| | | | llvm-svn: 49068
* Fairly large "cleaup" related to changing ObjCCompatibleAliasDecl superclass ↵Steve Naroff2008-04-011-4/+4
| | | | | | | | | | | | | (to inherit from NamedDecl, instead of ScopedDecl). - Added a DenseMap to associate an IdentifierInfo with the ObjCCompatibleAliasDecl. - Renamed LookupScopedDecl->LookupDecl and changed it's return type to Decl. Also added lookup for ObjCCompatibleAliasDecl's. - Removed Sema::LookupInterfaceDecl(). Converted clients to used LookupDecl(). - Some minor indentation changes. Will deal with ObjCInterfaceDecl and getObjCInterfaceDecl() in a separate commit... llvm-svn: 49058
* rename Decl::CompatibleAlias -> ObjCCompatibleAlias.Chris Lattner2008-03-311-0/+18
| | | | | | | | | | | | | | Fix objc ivar lookup. Ivar lookup should occur between lookup of method-local values and lookup of globals. Emulate this with some logic in the handling of Sema::ActOnIdentifierExpr. Two todo's left: 1) sema shouldn't turn a bare reference to an ivar into "self->ivar" in the AST. This is a hack. 2) The new ScopedDecl::isDefinedOutsideFunctionOrMethod method does not correctly handle typedefs and enum constants yet. llvm-svn: 48972
* Make sure Sema::ActOnClassMessage() correctly diagnoses "super".Steve Naroff2008-03-281-0/+6
| | | | llvm-svn: 48924
* allow the format attribute to be specified in function pointer prototypesNuno Lopes2008-03-251-0/+3
| | | | | | # this is my first commit here, so please be gentle :) llvm-svn: 48807
* Extend QualType::getAddressSpace to do the right thing for array types, and inNate Begeman2008-03-251-1/+2
| | | | | | the future, RecordTypes. llvm-svn: 48784
* Correctly error on arrays with automatic storage full of objects with Nate Begeman2008-03-141-2/+3
| | | | | | | non-default address space, and fix comment. Add a test for this. llvm-svn: 48366
* ISO/IEC TR 18037 Nate Begeman2008-03-141-0/+2
| | | | | | | | An address space name cannot be used to qualify an object that has automatic storage duration. Still not catching ASQual'd allocas of array type, just scalars at the moment. llvm-svn: 48350
* Add new testNate Begeman2008-03-071-0/+10
| | | | llvm-svn: 48018
* Patch by Nuno Lopes:Ted Kremenek2008-03-071-0/+16
| | | | | | | Added more comments for code processing attribute "format". Added more checks for corner cases, test cases, and warnings. llvm-svn: 48011
* move deprecated -> attributes.cChris Lattner2008-03-031-25/+0
| | | | llvm-svn: 47856
* Chris added this testcase with r47837. The mail only shows one todo-warning ↵Gabor Greif2008-03-031-2/+2
| | | | | | but I see 3. Strangeness. Correcting lines 16 and 24. llvm-svn: 47840
* Add a bunch of attributes, patch by Nuno Lopes.Chris Lattner2008-03-031-0/+25
| | | | llvm-svn: 47837
* Fix http://llvm.org/bugs/show_bug.cgi?id=2103.Steve Naroff2008-02-291-1/+14
| | | | llvm-svn: 47775
* Fix http://llvm.org/bugs/show_bug.cgi?id=2106.Steve Naroff2008-02-291-0/+4
| | | | llvm-svn: 47768
* testcase for attr deprecated, by Nuno Lopes.Chris Lattner2008-02-291-0/+25
| | | | llvm-svn: 47757
* add a test caseNate Begeman2008-02-211-0/+7
| | | | llvm-svn: 47455
* add some semantic checks for address spaces.Chris Lattner2008-02-211-0/+15
| | | | llvm-svn: 47423
* fix the second half of PR2041: __restrict is ok in c90 mode, even ifChris Lattner2008-02-191-1/+1
| | | | | | restrict isn't. llvm-svn: 47316
* Tweak fix for http://llvm.org/bugs/show_bug.cgi?id=2000 to work across typedefs.Steve Naroff2008-02-181-0/+10
| | | | llvm-svn: 47269
* Fix PR2042. One remaining issue: we don't currently diagnoseChris Lattner2008-02-172-1/+7
| | | | | | | | | int foobar(int); int foobar() {} which requires ifdef'ing out a testcase in predefined-function.c. llvm-svn: 47236
* Implemnt isVariablyModifiedType correctly.Eli Friedman2008-02-171-0/+3
| | | | llvm-svn: 47233
* Add more testsAnders Carlsson2008-02-161-8/+35
| | | | llvm-svn: 47217
* Make sizeof and __alignof work correctly with packed structs.Anders Carlsson2008-02-161-0/+37
| | | | llvm-svn: 47202
* Fix PR2041: restrict is not a keyword in c90.Chris Lattner2008-02-151-0/+3
| | | | llvm-svn: 47160
* Get rid of outdated code that masks type errors. Fixes PR2036.Eli Friedman2008-02-151-0/+2
| | | | llvm-svn: 47154
* Nevermind, these tests work... I messed up my testing.Eli Friedman2008-02-151-4/+2
| | | | llvm-svn: 47153
* Partial fix for struct compatibility; there's still something messy Eli Friedman2008-02-151-0/+19
| | | | | | going on with mixing scopes, though. llvm-svn: 47152
* A much better fix for http://llvm.org/bugs/show_bug.cgi?id=1987.Steve Naroff2008-02-141-3/+7
| | | | llvm-svn: 47103
* Fix a minor bug in isNullPointerConstant triggered by the linux Eli Friedman2008-02-131-0/+3
| | | | | | | | | tgmath.h. Note that there is another issue with tgmath.h, so mandel.c still doesn't work. llvm-svn: 47069
* Make typechecking for enum+int compatibility stricter.Eli Friedman2008-02-121-0/+4
| | | | llvm-svn: 47005
* Fix type compatibility between constant and variable arrays.Eli Friedman2008-02-121-0/+5
| | | | llvm-svn: 47003
* Allow the parser to detect invalid DeclSpec's. This fixes ↵Steve Naroff2008-02-121-1/+5
| | | | | | | | | | http://llvm.org/bugs/show_bug.cgi?id=1987. This commit only "guards" the call to ParseDeclarationSpecifiers() in ParseDeclarationOrFunctionDefinition(). We could consider guarding all calls, however this is a bit radical (since it effectively stops parsing the declaration once we have a bad declspec). Will discuss with Chris tomorrow. llvm-svn: 46984
* Get rid of bogus warnings when the second argument in va_start is either an ↵Anders Carlsson2008-02-111-0/+8
| | | | | | implicit cast expr or a paren expr. llvm-svn: 46950
* Tweak test...Steve Naroff2008-02-111-1/+0
| | | | llvm-svn: 46946
* Fix http://llvm.org/bugs/show_bug.cgi?id=1988.Steve Naroff2008-02-111-0/+27
| | | | | | Sema::CheckInitializerListTypes() needs to ignore invalid structures. llvm-svn: 46942
* Fix PR1992 by computing the right type for string literals, whichChris Lattner2008-02-114-8/+18
| | | | | | | | is an array type not a pointer type. This requires updating some diags that change and updating the code generator to handle the proper form of strings. llvm-svn: 46941
* Add a couple of sema tests for qualifiers with conditionals containing Eli Friedman2008-02-101-0/+4
| | | | | | void*. llvm-svn: 46939
* Fix PR1999, by emitting a hard error only if an argument declarator is ↵Chris Lattner2008-02-102-5/+8
| | | | | | | | | completely missing. Otherwise, it is an implicit int case, which is valid in c90 and invalid elsewhere, but accepted as an extension. llvm-svn: 46938
* Refine bug fix to Expr::isLvalue (commit r46917).Steve Naroff2008-02-101-1/+6
| | | | llvm-svn: 46919
* Change Expr::isLvalue() to allow the "void" type. This fixes bz2000 ↵Steve Naroff2008-02-101-1/+7
| | | | | | | | 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
OpenPOWER on IntegriCloud