summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* Invalidate the alloca region by setting its default value to conjured symbol.Zhongxing Xu2009-06-291-0/+12
| | | | llvm-svn: 74419
* Move the check for vprintf* functions inside of SemaCheckStringLiteral. ↵Anders Carlsson2009-06-281-0/+11
| | | | | | Fixes PR4470. llvm-svn: 74413
* make these tests pass with the stack canary stuff even on targets where they ↵Chris Lattner2009-06-282-3/+3
| | | | | | default to on. llvm-svn: 74412
* Now this test case passes.Zhongxing Xu2009-06-281-2/+2
| | | | llvm-svn: 74410
* Invalidate a field of struct type by setting its default value to conjured Zhongxing Xu2009-06-281-0/+11
| | | | | | symbol. llvm-svn: 74408
* Add stack protector support to clang. This generates the 'ssp' and 'sspreq'Bill Wendling2009-06-281-0/+22
| | | | | | | | function attributes. There are predefined macros that are defined when stack protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with -fstack-protector-all. llvm-svn: 74405
* OpenCL 1.0 support: Nate Begeman2009-06-281-0/+22
| | | | | | | | Handle rules for ExtVector + ExtVector and ExtVector + Scalar operations. Fix problem Eli noticed where we were allowing pointer types to be splatted to vector elements. llvm-svn: 74404
* Improve support for overloaded operator templates.Douglas Gregor2009-06-271-0/+2
| | | | llvm-svn: 74390
* Fix the parser error hanlding for __builtin_offsetof to actually print Eli Friedman2009-06-271-0/+7
| | | | | | out an error for a malformed __builtin_offsetof. llvm-svn: 74388
* Fix a bogus error overloading an operator where the only class Eli Friedman2009-06-271-0/+14
| | | | | | parameter has a dependent type. llvm-svn: 74380
* Implement support for the format_arg attribute. Fixes PR4442.Anders Carlsson2009-06-271-0/+11
| | | | llvm-svn: 74369
* Make it possible for using decls to point to operators. Fixes PR4441.Anders Carlsson2009-06-271-0/+8
| | | | llvm-svn: 74362
* During template argument deduction from a function call, allowDouglas Gregor2009-06-261-1/+10
| | | | | | | | deduction from pointer and pointer-to-member types to work even in the presence of a qualification conversion (C++ [temp.deduct.type]p3 bullet 2). llvm-svn: 74354
* More auto work.Anders Carlsson2009-06-261-0/+9
| | | | llvm-svn: 74339
* Fix test.Anders Carlsson2009-06-261-1/+1
| | | | llvm-svn: 74335
* A little template argument deduction test uncovered an "oops". As partDouglas Gregor2009-06-261-0/+7
| | | | | | | | | | of template instantiation, we were dropping cv-qualifiers on the instantiated type in a few places. This change reshuffles the type-instantiation code a little bit so that there's a single place where we add qualifiers to the instantiated type, so that we won't end up with this same bug in the future. llvm-svn: 74331
* Template argument deduction is no longer responsible for checkingDouglas Gregor2009-06-261-1/+18
| | | | | | | | | | | | | non-dependent parameter types. Instead, class template partial specializations perform a final check of all of the instantiated arguments. This model is cleaner, and works better for function templates where the "final check" occurs during overload resolution. Also, cope with cv-qualifiers when the parameter type was originally a reference type, so that the deduced argument can be more qualified than the transformed argument. llvm-svn: 74323
* Can't have arrays of auto.Anders Carlsson2009-06-261-0/+6
| | | | llvm-svn: 74314
* An auto variable can't appear in its own initializer.Anders Carlsson2009-06-261-0/+4
| | | | llvm-svn: 74312
* Implement enough of the 'auto' keyword so we can claim to support N2546.Anders Carlsson2009-06-262-0/+10
| | | | llvm-svn: 74307
* Revrt PR4228 fix for now.Devang Patel2009-06-262-18/+0
| | | | llvm-svn: 74304
* Improve template argument deduction for reference parameters whenDouglas Gregor2009-06-262-0/+75
| | | | | | | deducing template arguments from a function call. Plus, add a bunch of tests. llvm-svn: 74301
* OpenCL 1.0 Support:Nate Begeman2009-06-261-0/+2
| | | | | | Add support for scalar to vector and partially initialized vector constant initializers. llvm-svn: 74299
* Improve error recovery in C++: when we hit 'implicit int' cases in C++,Chris Lattner2009-06-261-2/+1
| | | | | | | | | | these are usually because the parser was thoroughly confused. In addition to typing the value being declared as an int and hoping for the best, we mark the value as invalid so we don't get chains of errors when it is used downstream. In C, implicit int actually is valid, so typing the thing as int is good and marking it invalid is bad. :) llvm-svn: 74266
* fix PR4452, a crash on invalid. The error recovery is still terrible in ↵Chris Lattner2009-06-261-0/+24
| | | | | | | | this case but at least we don't crash :) llvm-svn: 74264
* Fix another assert related to using decls.Anders Carlsson2009-06-261-0/+8
| | | | llvm-svn: 74262
* When creating LookupResults, see through UsingDecls. Fixes PR4450.Anders Carlsson2009-06-261-0/+15
| | | | llvm-svn: 74258
* Fix PR4448.Anders Carlsson2009-06-261-0/+8
| | | | llvm-svn: 74257
* OpenCL 1.0 support: explicit casts to ext-vector typesNate Begeman2009-06-262-2/+25
| | | | llvm-svn: 74247
* Implicit instantiation for function template specializations.Douglas Gregor2009-06-261-1/+10
| | | | | | | | | For a FunctionDecl that has been instantiated due to template argument deduction, we now store the primary template from which it was instantiated and the deduced template arguments. From this information, we can instantiate the body of the function template. llvm-svn: 74232
* Introduce a new concept to the static analyzer: SValuator.Ted Kremenek2009-06-2616-23/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | GRTransferFuncs had the conflated role of both constructing SVals (symbolic expressions) as well as handling checker-specific logic. Now SValuator has the role of constructing SVals from expressions and GRTransferFuncs just handles checker-specific logic. The motivation is by separating these two concepts we will be able to much more easily create richer constraint-generating logic without coupling it to the main checker transfer function logic. We now have one implementation of SValuator: SimpleSValuator. SimpleSValuator is essentially the SVal-related logic that was in GRSimpleVals (which is removed in this patch). This includes the logic for EvalBinOp, EvalCast, etc. Because SValuator has a narrower role than the old GRTransferFuncs, the interfaces are much simpler, and so is the implementation of SimpleSValuator compared to GRSimpleVals. I also did a line-by-line review of SVal-related logic in GRSimpleVals and cleaned it up while moving it over to SimpleSValuator. As a consequence of removing GRSimpleVals, there is no longer a '-checker-simple' option. The '-checker-cfref' did everything that option did but also ran the retain/release checker. Of course a user may not always wish to run the retain/release checker, nor do we wish core analysis logic buried in the checker-specific logic. The next step is to refactor the logic in CFRefCount.cpp to separate out these pieces into the core analysis engine. llvm-svn: 74229
* Test case for my last patch.Fariborz Jahanian2009-06-251-0/+74
| | | | llvm-svn: 74216
* Improved semantic analysis and AST respresentation for functionDouglas Gregor2009-06-254-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | templates. For example, this now type-checks (but does not instantiate the body of deref<int>): template<typename T> T& deref(T* t) { return *t; } void test(int *ip) { int &ir = deref(ip); } Specific changes/additions: * Template argument deduction from a call to a function template. * Instantiation of a function template specializations (just the declarations) from the template arguments deduced from a call. * FunctionTemplateDecls are stored directly in declaration contexts and found via name lookup (all forms), rather than finding the FunctionDecl and then realizing it is a template. This is responsible for most of the churn, since some of the core declaration matching and lookup code assumes that all functions are FunctionDecls. llvm-svn: 74213
* OpenCL 1.0 Support, patch 1/N: upper case swizzle operator and hex element ↵Nate Begeman2009-06-251-0/+5
| | | | | | index. llvm-svn: 74202
* Introduce tools/index-test.Argyrios Kyrtzidis2009-06-251-0/+24
| | | | | | | | This tool will be the test bed for indexing related operations. It basically reads PCH files passed by the command line and performs various operations. Currently it can accept a file:line:column which resolves to a declaration/statement and displays some information about them. llvm-svn: 74198
* Decltype needs to have a dependent type if the expr passed to it is type ↵Anders Carlsson2009-06-251-0/+6
| | | | | | dependent. Fixes PR4444. llvm-svn: 74175
* C++ decltype support (N2343)Anders Carlsson2009-06-241-0/+21
| | | | llvm-svn: 74118
* Fix a clang crash caused by incorrect user code.Fariborz Jahanian2009-06-241-0/+7
| | | | llvm-svn: 74080
* Implement matching of function templates, so that one can declare overloaded ↵Douglas Gregor2009-06-242-0/+40
| | | | | | function templates. C++ [temp.over.link] paragraphs 4-8. llvm-svn: 74079
* Add test for [class.local]p2.Anders Carlsson2009-06-241-0/+12
| | | | llvm-svn: 74051
* Make sure that the template parameter lists get from the parser down to ↵Douglas Gregor2009-06-241-1/+1
| | | | | | ActOnFunctionDeclarator for function template definitions llvm-svn: 74040
* Add test for [class.nested.type]p1Anders Carlsson2009-06-241-0/+11
| | | | llvm-svn: 74033
* Support for [class.local]p4.Anders Carlsson2009-06-241-0/+10
| | | | llvm-svn: 74030
* [class.local] p1 and p3. Also, add back the xcodeproj file.Anders Carlsson2009-06-242-0/+48
| | | | llvm-svn: 74027
* Start propagating template parameter lists to the right places toDouglas Gregor2009-06-231-0/+3
| | | | | | | handle function templates. There's no actual code for function templates yet, but at least we complain about typedef templates. llvm-svn: 74021
* Patch fixes an obscure bug when 'used' attribute is applied toFariborz Jahanian2009-06-231-0/+9
| | | | | | | | | variables in ObjC's Next runtime mode. Next runtime also implicitly applies 'used' attribute on some of its meta-data. This results in two 'llvm.used' arrays to be generated, and one of them is renamed to 'llvm.used1'. llvm-svn: 74008
* Make sure that argument-dependent lookup looks into the global scopeDouglas Gregor2009-06-231-0/+13
| | | | | | when it should. llvm-svn: 73992
* Add a test illustrating our current inability to properly cope with the ↵Douglas Gregor2009-06-231-0/+32
| | | | | | point of instantation of a member function of a class template specialization llvm-svn: 73956
* New test for when the subexpressions within a typeid are potentially ↵Douglas Gregor2009-06-231-0/+36
| | | | | | evaluated. We seem to be the only ones to get this right. llvm-svn: 73955
* fix PR4423.Chris Lattner2009-06-231-0/+4
| | | | llvm-svn: 73938
OpenPOWER on IntegriCloud