summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* Early support for __format__attribute on blocks.Fariborz Jahanian2009-05-151-4/+32
| | | | | | Work in progress... llvm-svn: 71908
* Basic support for member exprs where the base expr type is dependent.Anders Carlsson2009-05-151-1/+15
| | | | llvm-svn: 71907
* Template instantiation for break and continue statements.Douglas Gregor2009-05-151-0/+11
| | | | llvm-svn: 71903
* Template instantiation for "for" loopsDouglas Gregor2009-05-152-2/+30
| | | | llvm-svn: 71901
* Template instantiation for do-while statements.Douglas Gregor2009-05-152-11/+31
| | | | llvm-svn: 71899
* Template instantiation for WhileStmt and CXXConditionDeclExpr.Douglas Gregor2009-05-153-11/+44
| | | | llvm-svn: 71896
* Make sure that we use the canonical type for the names of instantiatedDouglas Gregor2009-05-151-2/+5
| | | | | | | | | | constructors and destructors. This is a requirement of DeclarationNameTable::getCXXSpecialName that we weren't assert()'ing, so it should have been caught much earlier :( Big thanks to Anders for the test case. llvm-svn: 71895
* improved on diagnosing misplacement of sentinel attributes.Fariborz Jahanian2009-05-152-5/+6
| | | | | | No change in functionality. llvm-svn: 71894
* Allow instantiation of NULL expressions and statementsDouglas Gregor2009-05-152-0/+6
| | | | llvm-svn: 71889
* This patch finishes off the sentinel attribute handling forFariborz Jahanian2009-05-152-9/+34
| | | | | | blocks and function pointers. llvm-svn: 71888
* I take it back, InstantiateExpr does not check for null.Anders Carlsson2009-05-151-4/+7
| | | | llvm-svn: 71887
* Instantiation support for 'this'Anders Carlsson2009-05-151-0/+12
| | | | llvm-svn: 71886
* No need to null check the expr, Sema::SemaRef.InstantiateExpr handles all that.Anders Carlsson2009-05-151-7/+4
| | | | llvm-svn: 71885
* Make sure that the type associated with a class template is dependent.Douglas Gregor2009-05-151-1/+10
| | | | llvm-svn: 71878
* Template instantiation for "if" statements. Also:Douglas Gregor2009-05-152-12/+36
| | | | | | | | - Skip semantic analysis of the "if" condition if it is type-dependent. - Added the location of the "else" keyword into IfStmt, so that we can provide it for type-checking after template instantiation. llvm-svn: 71875
* Move statement instantiation into its own file. No functionality changeDouglas Gregor2009-05-153-132/+153
| | | | llvm-svn: 71872
* Call ActOnStartOfFunctionDecl/ActOnFinishFunctionBody whenDouglas Gregor2009-05-154-15/+25
| | | | | | instantiating the definition of a function from a template. llvm-svn: 71869
* Instantiate return statements.Anders Carlsson2009-05-152-1/+15
| | | | llvm-svn: 71825
* Add NullStmt::Clone and use itAnders Carlsson2009-05-151-1/+1
| | | | llvm-svn: 71823
* Instantiate goto and label statements. (Very useful, I know)Anders Carlsson2009-05-151-0/+18
| | | | llvm-svn: 71822
* Implement template instantiation for DeclStmtDouglas Gregor2009-05-153-2/+34
| | | | llvm-svn: 71818
* Don't warn if result/argument type of an implemented Fariborz Jahanian2009-05-143-2/+15
| | | | | | | method is a qualified id which conforms to the matching type of its method declaration. llvm-svn: 71817
* Template instantiation for the NULL statement. Lame, I knowDouglas Gregor2009-05-141-0/+5
| | | | llvm-svn: 71816
* Introduce basic support for instantiating the definitions of memberDouglas Gregor2009-05-145-15/+121
| | | | | | | functions of class templates. Only compound statements and expression statements are currently implemented. llvm-svn: 71814
* Check that the function being overridden is virtual.Anders Carlsson2009-05-142-4/+6
| | | | llvm-svn: 71802
* Improvements to the FunctionDecl getters/setters.Anders Carlsson2009-05-141-1/+1
| | | | llvm-svn: 71800
* Introduce a stack of instantiation scopes that are used to store the mapping ↵Douglas Gregor2009-05-144-1/+87
| | | | | | from variable declarations that occur within templates to their instantiated counterparts llvm-svn: 71799
* Link FunctionDecls instantiated from the member functions of a classDouglas Gregor2009-05-141-6/+22
| | | | | | | | template to the FunctionDecls from which they were instantiated. This is a necessary first step to support instantiation of the definitions of such functions, but by itself does essentially nothing. llvm-svn: 71792
* updated comments.Fariborz Jahanian2009-05-141-3/+2
| | | | llvm-svn: 71790
* Adds recognition of sentinel attribute on block declarations.Fariborz Jahanian2009-05-142-3/+37
| | | | llvm-svn: 71788
* Better diagnostics for covariance when checking overriding return types.Anders Carlsson2009-05-141-6/+65
| | | | llvm-svn: 71786
* When there are any member new operators, global versions aren't looked up at ↵Sebastian Redl2009-05-141-2/+0
| | | | | | all. llvm-svn: 71780
* Diagnose missing sentinel argument on a funciton callFariborz Jahanian2009-05-141-17/+39
| | | | | | with sentinel attribute. llvm-svn: 71778
* In C++, warn when something previously declared as a "struct" is laterDouglas Gregor2009-05-143-34/+57
| | | | | | | declared as a "class", or vice-versa. This warning is under the control of -Wmismatched-tags, which is off by default. llvm-svn: 71773
* Add return type checking for overriding virtual functions. We currently ↵Anders Carlsson2009-05-143-4/+59
| | | | | | don't check covariance but that's next. llvm-svn: 71759
* Implement explicit instantiations of member classes of class templates, e.g.,Douglas Gregor2009-05-146-10/+99
| | | | | | | | | | | | | | | | | | | | | | | | | template<typename T> struct X { struct Inner; }; template struct X<int>::Inner; This change is larger than it looks because it also fixes some a problem with nested-name-specifiers and tags. We weren't requiring the DeclContext associated with the scope specifier of a tag to be complete. Therefore, when looking for something like "struct X<int>::Inner", we weren't instantiating X<int>. This, naturally, uncovered a problem with member pointers, where we were requiring the left-hand side of a member pointer access expression (e.g., x->*) to be a complete type. However, this is wrong: the semantics of this expression does not require a complete type (EDG agrees). Stuart vouched for me. Blame him. llvm-svn: 71756
* Look for and diagnose missing sentinel argument on messageFariborz Jahanian2009-05-132-2/+45
| | | | | | dispatch arguments which have sentinel attribute. llvm-svn: 71737
* Use an iterator type for found_decls_begin/found_decls_end.Anders Carlsson2009-05-132-4/+5
| | | | llvm-svn: 71721
* Add a new, more advanced CheckDerivedToBaseConversion that takes custom ↵Anders Carlsson2009-05-133-9/+33
| | | | | | diagnostic IDs. llvm-svn: 71720
* Add some basic type checking for attributes ns_returns_retained andTed Kremenek2009-05-131-39/+39
| | | | | | | | | | | | | | cf_returns_retained. Currently this attribute can now be applied to any Objective-C method or C function that returns a pointer or Objective-C object type. Modify the tablegen definition of diagnostic 'warn_attribute_wrong_decl_type' to expect that the diagnostics infrastructure will add quotes around the attribute name when appropriate. Alonq with this change, I modified the places where this warning is issued to passed the attribute's IdentifierInfo* instead of having a hard-coded C constant string. llvm-svn: 71718
* Explicit instantiations of templates now instantiate the definitionsDouglas Gregor2009-05-134-3/+83
| | | | | | | | of class members (recursively). Only member classes are actually instantiated; the instantiation logic for member functions and variables are just stubs. llvm-svn: 71713
* Disable access control by default. It can be enabled with the ↵Anders Carlsson2009-05-131-0/+3
| | | | | | -faccess-control option. When we have better support for it, we can enable it by default again. llvm-svn: 71706
* Improve the semantic checking for explicit instantiations ofDouglas Gregor2009-05-133-32/+114
| | | | | | | | | | | | | | | | templates. In particular: - An explicit instantiation can follow an implicit instantiation (we were improperly diagnosing this as an error, previously). - In C++0x, an explicit instantiation that follows an explicit specialization of the same template specialization is ignored. In C++98, we just emit an extension warning. - In C++0x, an explicit instantiation must be in a namespace enclosing the original template. C++98 has no such requirement. Also, fixed a longstanding FIXME regarding the integral type that is used for the size of a constant array type when it is being instantiated. llvm-svn: 71689
* Some early declarations to support sentinel attribute onFariborz Jahanian2009-05-133-0/+13
| | | | | | | message dispatches (and function calls later). No change in functionality. llvm-svn: 71683
* Fix <rdar://problem/6880975> [format string] Assertion failed: (Arg < ↵Ted Kremenek2009-05-131-25/+27
| | | | | | | | | NumArgs && "Arg access out of range!"). For format string checking, only check the type of the format specifier for non-vararg functions. llvm-svn: 71672
* Fix rdar://6880951 by rejecting vectors of vectors.Chris Lattner2009-05-131-2/+3
| | | | | | | | It seems dubious to me that isIntegerType() returns true for vectors of integers, but not complex integers. This should probably be rethought, I'll file a bugzilla. llvm-svn: 71640
* reject use of the GNU _Decimal32 extension with a diagnostic, not an abort.Chris Lattner2009-05-131-1/+4
| | | | | | rdar://6880104 llvm-svn: 71639
* eli correctly points out that this code is dead, just rip it out forChris Lattner2009-05-131-7/+0
| | | | | | now until someone does it right llvm-svn: 71638
* add support for __sync_nand_and_fetch and __sync_fetch_and_nand,Chris Lattner2009-05-131-9/+15
| | | | | | rdar://6880573 llvm-svn: 71636
* Fix rdar://6881069, a crash on a form of vector_size that weChris Lattner2009-05-131-1/+2
| | | | | | | | | don't support. While it would be nice to support this eventually, this form is not common at all (just seen in gcc testsuite) and it might be better to model vector_size as a type attribute anyway. For now just emit a nice error on it. llvm-svn: 71633
OpenPOWER on IntegriCloud