summaryrefslogtreecommitdiffstats
path: root/clang/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* Get rid of the [[final]] C++0x attribute.Anders Carlsson2011-01-235-57/+17
| | | | llvm-svn: 124083
* Teach -Wuninitialized-experimental about sizeof().Ted Kremenek2011-01-231-0/+10
| | | | llvm-svn: 124076
* Tweak diagnostic:Ted Kremenek2011-01-231-1/+2
| | | | | | | | | | | | | error: no super class declared in @interface for 'XXX' to be: error: 'X' cannot use 'super' because it is a root class The latter explains what the user actually did wrong. Fixes: <rdar://problem/8904409> llvm-svn: 124074
* Null initialize a few variables flagged byTed Kremenek2011-01-233-6/+5
| | | | | | | | | | clang's -Wuninitialized-experimental warning. While these don't look like real bugs, clang's -Wuninitialized-experimental analysis is stricter than GCC's, and these fixes have the benefit of being general nice cleanups. llvm-svn: 124072
* Accept the C++0x override control keywords as an extension in C++98. This is ↵Anders Carlsson2011-01-221-2/+10
| | | | | | OK since the new syntax is unambiguous and can't be confused with C++98 syntax. If anyone disagrees, please shout! llvm-svn: 124048
* Implement [class.derived]p8.Anders Carlsson2011-01-221-0/+20
| | | | llvm-svn: 124047
* Serialize and deserialize IsMarkedFinal/IsMarkedExplicit.Anders Carlsson2011-01-222-0/+5
| | | | llvm-svn: 124041
* Mark classes final and/or explicit during class template instantiation.Anders Carlsson2011-01-221-0/+3
| | | | llvm-svn: 124040
* Mark classes as final or explicit. Diagnose when a class marked 'final' is ↵Anders Carlsson2011-01-223-1/+19
| | | | | | used as a base. llvm-svn: 124039
* Add final/explicit getters and setters to CXXRecordDecl.Anders Carlsson2011-01-221-0/+1
| | | | llvm-svn: 124037
* Parse class-virt-specifier-seqs.Anders Carlsson2011-01-222-16/+73
| | | | llvm-svn: 124036
* More work on ClassVirtSpecifiers.Anders Carlsson2011-01-222-3/+32
| | | | llvm-svn: 124035
* revert r123977 and r123978 to fix PR9026.Rafael Espindola2011-01-222-59/+76
| | | | llvm-svn: 124033
* Start stubbing out a ClassVirtSpecifiers class.Anders Carlsson2011-01-221-9/+8
| | | | llvm-svn: 124032
* A member function template cannot be virtual.Anders Carlsson2011-01-221-1/+8
| | | | llvm-svn: 124031
* Use a FunctionType::get overload that doesn't require an empty vector.Benjamin Kramer2011-01-221-5/+2
| | | | llvm-svn: 124029
* Improve our parse recovery on 'case blah;' and 'default;'.John McCall2011-01-221-6/+18
| | | | llvm-svn: 124025
* Send code generation for xvalues down the same path as lvaluesDouglas Gregor2011-01-222-2/+2
| | | | llvm-svn: 124023
* Debug info generation for rvalue referencesDouglas Gregor2011-01-222-6/+10
| | | | llvm-svn: 124020
* Update const_cast semantics for rvalue references. Add tests forDouglas Gregor2011-01-221-5/+4
| | | | | | reinterpret_cast and const_cast using rvalue references. llvm-svn: 124007
* Teach static_cast and dynamic_cast about rvalue references.Douglas Gregor2011-01-221-13/+13
| | | | llvm-svn: 124006
* Provide -Wuninitialized-experimental fixitsTed Kremenek2011-01-211-3/+10
| | | | | | | for floats, and also check if 'nil' is declared when suggesting it for initializing ObjC pointers. llvm-svn: 124004
* When throwing an elidable object, first try to treat the subexpressionDouglas Gregor2011-01-211-5/+6
| | | | | | | as an rvalue per C++0x [class.copy]p33. If that fails, try again with the original subexpression. llvm-svn: 124002
* Generalize the NRVO move-construction-based initialization routine. No ↵Douglas Gregor2011-01-211-30/+32
| | | | | | functionality change llvm-svn: 123996
* Add basic fixits for -Wuninitialized-experimentalTed Kremenek2011-01-211-1/+20
| | | | | | | to suggest initializations for pointer and ObjC pointer types. llvm-svn: 123995
* Enhance -Wuninitialized-experimental diagnosticsTed Kremenek2011-01-211-3/+51
| | | | | | | | to issue the warning at an uninitialized variable's declaration, but to issue notes at possible uninitialized uses (which could be multiple). llvm-svn: 123994
* Implement the preference for move-construction over copy-constructionDouglas Gregor2011-01-213-26/+113
| | | | | | | | | | | | when returning an NRVO candidate expression. For example, this properly picks the move constructor when dealing with code such as MoveOnlyType f() { MoveOnlyType mot; return mot; } The previously-XFAIL'd rvalue-references test case now works, and has been moved into the appropriate paragraph-specific test case. llvm-svn: 123992
* We love parenthesesDouglas Gregor2011-01-211-2/+2
| | | | llvm-svn: 123983
* Promote the static getNRVOCandidate() function, which computed theDouglas Gregor2011-01-213-23/+32
| | | | | | | | | | | | | NRVO candidate for a return statement, to Sema::getCopyElisionCandidate(), and teach it enough to also determine the NRVO candidate for a throw expression. We still don't use the latter information, however. Along the way, implement core issue 1148, which eliminates copy elision from catch parameters and clarifies that copy elision cannot occur from function parameters (which we already implemented). llvm-svn: 123982
* Implement core issue 1164, which concerns the partial ordering ofDouglas Gregor2011-01-211-47/+87
| | | | | | f(T&) and f(T&&). llvm-svn: 123981
* Add test for overload resolution's preference for binding an rvalueDouglas Gregor2011-01-211-3/+3
| | | | | | | reference to an rvalue rather than binding a const-qualified lvalue reference to that rvalue. llvm-svn: 123979
* Eliminate an unused variableDouglas Gregor2011-01-211-4/+0
| | | | llvm-svn: 123978
* Update the reference-binding implementation used for overloadDouglas Gregor2011-01-212-72/+59
| | | | | | | | resolution to match the latest C++0x working paper's semantics. The implementation now matching up with the reference-binding implementation used for initialization. llvm-svn: 123977
* Implement the special template argument deduction rule for T&& in aDouglas Gregor2011-01-212-3/+40
| | | | | | | | | | | call (C++0x [temp.deduct.call]p3). As part of this, start improving the reference-binding implementation used in the computation of implicit conversion sequences (for overload resolution) to reflect C++0x semantics. It still needs more work and testing, of course. llvm-svn: 123966
* Sema: process non-inheritable attributes on function declarations earlyPeter Collingbourne2011-01-212-28/+28
| | | | | | | This allows us to simplify the handling for the overloadable attribute, removing a number of FIXMEs. llvm-svn: 123961
* Sema: support for processing non-inheritable declaration attributes earlyPeter Collingbourne2011-01-211-22/+49
| | | | llvm-svn: 123960
* Generalise support for non-inheritable attributesPeter Collingbourne2011-01-213-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Inheritable attributes on declarations may be inherited by any later redeclaration at merge time. By contrast, a non-inheritable attribute will not be inherited by later redeclarations. Non-inheritable attributes may be semantically analysed early, allowing them to influence the redeclaration/overloading process. Before this change, the "overloadable" attribute received special handling to be treated as non-inheritable, while all other attributes were treated as inheritable. This patch generalises the concept, while removing a FIXME. Some CUDA location attributes are also marked as non-inheritable in order to support special overloading semantics (to be introduced in a later patch). The patch introduces a new Attr subclass, InheritableAttr, from which all inheritable attributes derive. Non-inheritable attributes simply derive from Attr. N.B. I did not review every attribute to determine whether it should be marked non-inheritable. This can be done later on an incremental basis, as this change does not affect default functionality. llvm-svn: 123959
* Move cheking of kext into canDevirtualizeMemberFunctionCalls().Fariborz Jahanian2011-01-211-15/+16
| | | | | | Improve on test case. Per Doug's comment. wip. llvm-svn: 123954
* Improve the diagnostic that complains about binding an rvalueDouglas Gregor2011-01-211-0/+1
| | | | | | reference to an lvalue. llvm-svn: 123953
* More work to bring reference binding up to the latest C++0xDouglas Gregor2011-01-211-6/+11
| | | | | | | | | | specification. In particular, an rvalue reference can bind to an initializer expression that is an lvalue if the referent type and the initializer expression type are not reference-related. This is a newer formulation to the previous "rvalue references can never bind to lvalues" rule. llvm-svn: 123952
* When performing reference binding via a conversion function, performDouglas Gregor2011-01-211-7/+2
| | | | | | | type checking based on the actual reference type we're trying to bind the result to, rather than stripping the reference. llvm-svn: 123950
* Initialize a variable, found by Ted.Fariborz Jahanian2011-01-201-1/+1
| | | | llvm-svn: 123948
* Fix a use of uninitialized variables, found by Ted!Douglas Gregor2011-01-201-7/+9
| | | | llvm-svn: 123947
* Removing debug printing logic from UninitializedValuesV2.Ted Kremenek2011-01-201-16/+0
| | | | llvm-svn: 123944
* Relax CFG assertions in UninitializedValuesV2 whenTed Kremenek2011-01-201-14/+13
| | | | | | | | | | | handling pseudo-path sensitivity, and instead use those assertion conditions as dynamic checks. These assertions would be violated when analyzing a CFG where some branches where optimized away during CFG construction because their branch conditions could be trivially determined. llvm-svn: 123943
* Add rudimentary path-sensitivity to UnintializedValuesV2Ted Kremenek2011-01-201-17/+120
| | | | | | | | | | | | analysis for short-circuited operations. For branch written like "if (x && y)", we maintain two sets of dataflow values for the outgoing branches. This suppresses some common false positives for -Wuninitialized-experimental. This change introduces some assertion failures when running on the LLVM codebase. WIP. llvm-svn: 123923
* apple kext abi requires all vf calls, including qualifiedFariborz Jahanian2011-01-203-3/+47
| | | | | | vf calls, be made indirect. This patch is towards that goal. llvm-svn: 123922
* Enhance AnalysisConsumer to also visit functionsTed Kremenek2011-01-201-39/+47
| | | | | | and methods defined within 'namespace X { ... }'. llvm-svn: 123921
* Start refactoring reference binding to more closely match the C++0xDouglas Gregor2011-01-201-34/+35
| | | | | | | working paper's structure. The only functional change here is that we now handling binding to array rvalues, which we would previously reject. llvm-svn: 123918
* Diagnose when a virtual member function marked final is overridden.Anders Carlsson2011-01-202-14/+17
| | | | llvm-svn: 123916
OpenPOWER on IntegriCloud