summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Instantiation support for 'this'Anders Carlsson2009-05-151-0/+8
| | | | llvm-svn: 71886
* Template instantiation for "if" statements. Also:Douglas Gregor2009-05-151-0/+17
| | | | | | | | - 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
* A C++ member function always has either weak linkage (if it's inline or ↵Anders Carlsson2009-05-151-1/+8
| | | | | | defined inline) or strong linkage (other cases). llvm-svn: 71873
* When word-wrapping, be more defensive about a ridiculously small number of ↵Douglas Gregor2009-05-151-1/+1
| | | | | | columns. Fixes <rdar://problem/6892178> llvm-svn: 71870
* Call ActOnStartOfFunctionDecl/ActOnFinishFunctionBody whenDouglas Gregor2009-05-151-1/+9
| | | | | | instantiating the definition of a function from a template. llvm-svn: 71869
* Name mangling for class template specializations and template arguments.Anders Carlsson2009-05-151-1/+27
| | | | llvm-svn: 71861
* Fix crash when deriving the enclosing summary of a method whose first ↵Ted Kremenek2009-05-151-0/+13
| | | | | | selector slot has a null IdentifierInfo*. This happens when analyzing Growl. llvm-svn: 71857
* Instantiate return statements.Anders Carlsson2009-05-151-0/+13
| | | | llvm-svn: 71825
* Instantiate goto and label statements. (Very useful, I know)Anders Carlsson2009-05-151-0/+11
| | | | llvm-svn: 71822
* Implement template instantiation for DeclStmtDouglas Gregor2009-05-151-0/+3
| | | | llvm-svn: 71818
* Don't warn if result/argument type of an implemented Fariborz Jahanian2009-05-142-3/+24
| | | | | | | 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/+11
| | | | llvm-svn: 71816
* Introduce basic support for instantiating the definitions of memberDouglas Gregor2009-05-142-2/+16
| | | | | | | 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-141-0/+13
| | | | llvm-svn: 71802
* Introduce a stack of instantiation scopes that are used to store the mapping ↵Douglas Gregor2009-05-141-4/+1
| | | | | | from variable declarations that occur within templates to their instantiated counterparts llvm-svn: 71799
* Fix <rdar://problem/6859457> [NSData dataWithBytesNoCopy] does not return a ↵Ted Kremenek2009-05-141-0/+26
| | | | | | retained object. llvm-svn: 71797
* Fix the same speling error in the test case (Duh).Anders Carlsson2009-05-141-1/+1
| | | | llvm-svn: 71793
* Link FunctionDecls instantiated from the member functions of a classDouglas Gregor2009-05-141-0/+13
| | | | | | | | 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
* Adds recognition of sentinel attribute on block declarations.Fariborz Jahanian2009-05-141-1/+1
| | | | llvm-svn: 71788
* Better diagnostics for covariance when checking overriding return types.Anders Carlsson2009-05-141-1/+81
| | | | llvm-svn: 71786
* When there are any member new operators, global versions aren't looked up at ↵Sebastian Redl2009-05-141-2/+4
| | | | | | all. llvm-svn: 71780
* Diagnose missing sentinel argument on a funciton callFariborz Jahanian2009-05-141-0/+30
| | | | | | with sentinel attribute. llvm-svn: 71778
* Avoid generating temp in source directoryDaniel Dunbar2009-05-141-1/+1
| | | | llvm-svn: 71776
* Skip the asm prefix when storing the name in block info.Daniel Dunbar2009-05-141-1/+10
| | | | | | | | | | | - Otherwise we emit internal names with embedded '\01' characters, which confuses some tools. - Ideally all the code which wants to get a "display name" for the given function should follow one code path, but this should be a monotonic improvement for now. llvm-svn: 71774
* In C++, warn when something previously declared as a "struct" is laterDouglas Gregor2009-05-141-5/+5
| | | | | | | declared as a "class", or vice-versa. This warning is under the control of -Wmismatched-tags, which is off by default. llvm-svn: 71773
* We need to specify the "linkage name" to the subprogram now that weDaniel Dunbar2009-05-141-1/+4
| | | | | | | emit the correct "display name". I suspect we need more work here, see FIXME for example. llvm-svn: 71761
* Add return type checking for overriding virtual functions. We currently ↵Anders Carlsson2009-05-141-0/+13
| | | | | | 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-144-7/+46
| | | | | | | | | | | | | | | | | | | | | | | | | 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-131-0/+37
| | | | | | dispatch arguments which have sentinel attribute. llvm-svn: 71737
* Make sure not to include the LLVM asm prefix in function names forDaniel Dunbar2009-05-131-0/+7
| | | | | | debug info. llvm-svn: 71736
* Add a test case to showcase a difference in #pragma pack handlingDaniel Dunbar2009-05-131-0/+34
| | | | | | | | compared to gcc. This is worrisome, but I believe we are doing the "correct" thing, and if I recall correctly I previously verified this versus MSVC. llvm-svn: 71723
* Add some basic type checking for attributes ns_returns_retained andTed Kremenek2009-05-131-2/+8
| | | | | | | | | | | | | | 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-131-1/+26
| | | | | | | | 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-132-2/+2
| | | | | | -faccess-control option. When we have better support for it, we can enable it by default again. llvm-svn: 71706
* Enhance diagnostics value tracking logic for null dereferences and ↵Ted Kremenek2009-05-132-2/+3
| | | | | | uninitialized values. llvm-svn: 71700
* ABI handling: Fix invalid assertion, it is possible for a validDaniel Dunbar2009-05-132-4/+10
| | | | | | | | coercion to be specified which truncates padding bits. It would be nice to still have the assert, but we don't have any API call for the unpadding size of a type yet. llvm-svn: 71695
* Improve the semantic checking for explicit instantiations ofDouglas Gregor2009-05-132-5/+29
| | | | | | | | | | | | | | | | 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
* Fix crasher reported in PR 4209 caused by an invalid summaryTed Kremenek2009-05-131-0/+70
| | | | | | | | generation when EvalObjCMessageExpr() did not resolve the ObjCInterfaceDecl* for a receiver when the receiver's symbolic value wasn't being explicitly tracked. llvm-svn: 71685
* Fix <rdar://problem/6880975> [format string] Assertion failed: (Arg < ↵Ted Kremenek2009-05-131-0/+5
| | | | | | | | | 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 crasher in CFRefCount.cpp reported by Nikita Zhuk due to recently added ↵Ted Kremenek2009-05-131-3/+28
| | | | | | autorelease tracking. llvm-svn: 71647
* Fix rdar://6880630 - # in _Pragma does not start a preprocessor directive.Chris Lattner2009-05-131-1/+7
| | | | llvm-svn: 71643
* convert test to use -verify Chris Lattner2009-05-131-2/+2
| | | | llvm-svn: 71642
* rename testChris Lattner2009-05-131-0/+0
| | | | llvm-svn: 71641
* Fix rdar://6880951 by rejecting vectors of vectors.Chris Lattner2009-05-131-0/+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-0/+4
| | | | | | rdar://6880104 llvm-svn: 71639
* implement __sync_synchronize and __sync_lock_release,Chris Lattner2009-05-131-0/+6
| | | | | | rdar://6880573 llvm-svn: 71637
* Fix rdar://6880874 - [sema] crash on array types with different index sizesChris Lattner2009-05-131-0/+11
| | | | llvm-svn: 71634
* Fix rdar://6881069, a crash on a form of vector_size that weChris Lattner2009-05-131-0/+6
| | | | | | | | | 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
* When we expect two arguments but have zero, make sure to addChris Lattner2009-05-131-0/+3
| | | | | | | | | two empty arguments. Also, add an assert so that this bug manifests as an assertion failure, not a valgrind problem. This fixes rdar://6880648 - [cpp] crash in ArgNeedsPreexpansion llvm-svn: 71616
* Changed wording of warning when attribute is onFariborz Jahanian2009-05-132-3/+3
| | | | | | method definition. llvm-svn: 71615
OpenPOWER on IntegriCloud