summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
...
* Slightly improve the diagnostic when using a qualified function typedef to ↵Sebastian Redl2010-07-091-5/+6
| | | | | | declare nonmember or static member functions. llvm-svn: 108018
* Rip out the floating point return type handling from the atomic builtin. It'sChandler Carruth2010-07-091-2/+1
| | | | | | | wrong, and we don't handle floating point value type arguments yet anyways. Will add correct logic for both when I finish the patch. llvm-svn: 108004
* Fix PR7600, and correctly convert the result of an atomic builtin to theChandler Carruth2010-07-092-29/+59
| | | | | | | | | expected value type. This is necessary as the builtin is internally represented as only operating on integral types. Also, add a FIXME to add support for floating point value types. llvm-svn: 108002
* Instantiation of block literal expressions. wip.Fariborz Jahanian2010-07-093-9/+74
| | | | llvm-svn: 108000
* Introduce -f{no-}spell-checking options to enable/disableDouglas Gregor2010-07-091-1/+1
| | | | | | | spell-checking. By default, spell-checking is enabled for Clang (obviously) but disabled in CIndex for performance reasons. llvm-svn: 107992
* Support code completion for parameter names in Objective-C methodDouglas Gregor2010-07-082-0/+16
| | | | | | declarations. llvm-svn: 107933
* Introduce a new code-completion point prior to an identifier in theDouglas Gregor2010-07-082-132/+201
| | | | | | | | | | | | selector of an Objective-C method declaration, e.g., given - (int)first:(int)x second:(int)y; this code completion point triggers at the location of "second". It will provide completions that fill out the method declaration for any known method, anywhere in the translation unit. llvm-svn: 107929
* When looking for an entity's Scope, don't consider scopes that can't contain ↵Sebastian Redl2010-07-081-3/+6
| | | | | | declarations. Fixes PR7594. llvm-svn: 107927
* During code completion, give the "nil" and "NULL" macros the sameDouglas Gregor2010-07-081-4/+22
| | | | | | | priority as other constants. And, if we're in a place where we prefer a pointer type, consider "nil" and "NULL" to be close matches. llvm-svn: 107910
* Allow C-style casts and reinterpret_casts between block pointers andDouglas Gregor2010-07-081-7/+29
| | | | | | either integer values or other pointers. Fixes <rdar://problem/8134521>. llvm-svn: 107905
* When performing substitution of template arguments within the body ofDouglas Gregor2010-07-086-25/+59
| | | | | | | a template, be sure to include the template arguments from the injected-class-name. Fixes PR7587. llvm-svn: 107895
* Add support for differentiating between attributes ignored when handled andChandler Carruth2010-07-081-1/+2
| | | | | | | | unknown attributes that we discard. Add a diagnostic group for unknown attribute warnings to allow turning these off when we don't care. Also consolidates the tests for this case. llvm-svn: 107864
* Reinstate the fix for PR7556. A silly use of isTrivial() wasDouglas Gregor2010-07-084-39/+24
| | | | | | suppressing copies of objects with trivial copy constructors. llvm-svn: 107857
* Revert r107828 and r107827, the fix for PR7556, which seems to beDouglas Gregor2010-07-074-24/+39
| | | | | | breaking bootstrap on Linux. llvm-svn: 107837
* Rip out the C++0x-specific handling of destructor names. The specification ↵Sebastian Redl2010-07-071-45/+25
| | | | | | is still in flux and unclear, and our interim workaround was broken. Fixes PR7467. llvm-svn: 107835
* A using declaration can redeclare a typedef to the same type. TheseDouglas Gregor2010-07-071-2/+25
| | | | | | | | typedefs won't have the same canonical declaration (since they are distinct), so we need to check for this case specifically. Fixes <rdar://problem/8018262>. llvm-svn: 107833
* Rename CXXZeroInitValueExpr to CXXScalarValueInitExpr, to reflect itsDouglas Gregor2010-07-073-9/+9
| | | | | | newly-narrowed scope. No functionality change. llvm-svn: 107828
* Do not use CXXZeroValueInitExpr for class types. Instead, useDouglas Gregor2010-07-073-30/+15
| | | | | | | | | CXXConstructExpr/CXXTemporaryObjectExpr/CXXNewExpr as appropriate. Fixes PR7556, and provides a slide codegen improvement when copy-initializing a POD class type from a value-initialized temporary. Previously, we weren't eliding the copy. llvm-svn: 107827
* Fix an issue with opencl init list checking.Nate Begeman2010-07-071-2/+7
| | | | llvm-svn: 107824
* Introduce Decl::hasBody() and FunctionDecl::hasBody() and use them instead ↵Argyrios Kyrtzidis2010-07-076-13/+13
| | | | | | | | of getBody() when we are just checking the existence of a body, to avoid de-serialization of the body from PCH. Makes de-serialization of the function body even more "lazier". llvm-svn: 107768
* implement PR7569, warning about assignment to null, which Chris Lattner2010-07-071-0/+17
| | | | | | | | people seem to write when they want a deterministic trap. Suggest instead that they use a volatile pointer or __builtin_trap. llvm-svn: 107756
* Fix multiple emission of the this-> fixit for each instantiation by fixing theNick Lewycky2010-07-063-5/+38
| | | | | | AST during the instantiation. Fixes PR7417! llvm-svn: 107690
* Correctly set the location of the "template" keyword for a classDouglas Gregor2010-07-061-1/+2
| | | | | | template specialization, from Peter Collingbourne. llvm-svn: 107682
* Remove my egregious hack that forced deserialization of visibleDouglas Gregor2010-07-061-31/+0
| | | | | | | | declarations when implicitly declaring the default constructor, copy constructor, destructor, and copy-assignment operators of a class. Argiris fixed the underlying problem in r107596. llvm-svn: 107681
* fix a bug I introduced in r107624Chris Lattner2010-07-051-5/+2
| | | | llvm-svn: 107626
* rearrange some logic, no functionality change.Chris Lattner2010-07-051-19/+30
| | | | llvm-svn: 107624
* Don't try to install the __[u]int128_t identifier if it is already installed ↵Argyrios Kyrtzidis2010-07-041-1/+3
| | | | | | | | | | by PCHReader. Currently, adding it to visible decls of a PCH'ed translation unit has no effect because adding visible decls before deserialization has no effect (the decls won't be visible). This will be fixed in a future commit; then it will force deserialization of visible decls, so avoid pointlessly installing it. llvm-svn: 107595
* Mark the operator delete associated with a virtual destructor as referenced.John McCall2010-07-031-0/+2
| | | | llvm-svn: 107573
* Lazily declare default constructors. We now delay the construction ofDouglas Gregor2010-07-032-20/+84
| | | | | | | | | | | | | | | | | | declarations for implicit default constructors, copy constructors, copy assignment operators, and destructors. On a "simple" translation unit that includes a bunch of C++ standard library headers, we generate relatively few of these implicit declarations now: 4/159 implicit default constructors created 18/236 implicit copy constructors created 70/241 implicit copy assignment operators created 0/173 implicit destructors created And, on this translation unit, this optimization doesn't really provide any benefit. I'll do some more performance measurements soon, but this completes the implementation work for <rdar://problem/8151045>. llvm-svn: 107551
* Lazily declare implicit copy constructors.Douglas Gregor2010-07-022-18/+53
| | | | llvm-svn: 107543
* Introduce a new routine, LookupConstructors(), and use it for allDouglas Gregor2010-07-024-21/+16
| | | | | | constructor-name lookup. llvm-svn: 107536
* Lazily declare copy-assignment operators.Douglas Gregor2010-07-022-29/+146
| | | | llvm-svn: 107521
* Lazily declare the implicitly-declared destructor in a C++ class.Douglas Gregor2010-07-024-6/+74
| | | | llvm-svn: 107510
* Move the "current scope" state from the Parser into Action. ThisDouglas Gregor2010-07-024-40/+53
| | | | | | | | | | | | | | allows Sema some limited access to the current scope, which we only use in one way: when Sema is performing some kind of declaration that is not directly driven by the parser (e.g., due to template instantiatio or lazy declaration of a member), we can find the Scope associated with a DeclContext, if that DeclContext is still in the process of being parsed. Use this to make the implicit declaration of special member functions in a C++ class more "scope-less", rather than using the NULL Scope hack. llvm-svn: 107491
* Add a new routine Sema::LookupDestructor and make all destructor-lookup ↵Douglas Gregor2010-07-016-18/+27
| | | | | | calls use that routine llvm-svn: 107444
* Provide exception specifications for implicitly-declared default constructors.Douglas Gregor2010-07-011-5/+46
| | | | llvm-svn: 107437
* Move the implicit declaration of a default constructor into a separateDouglas Gregor2010-07-012-32/+48
| | | | | | routine; no functionality change. llvm-svn: 107434
* Provide exception specifications for implicitly-declared copy constructors.Douglas Gregor2010-07-011-2/+47
| | | | llvm-svn: 107429
* Move the implicit declaration of a constructor out to a separateDouglas Gregor2010-07-012-68/+90
| | | | | | method. No functionality change. llvm-svn: 107415
* Teach DeclareImplicitCopyConstructor how to cope with virtual basesDouglas Gregor2010-07-011-7/+17
| | | | | | | and multi-dimensional array fields. Fixes several bugs found by inspection. llvm-svn: 107411
* Move declaration of a class's implicit copy constructor into aDouglas Gregor2010-07-012-86/+111
| | | | | | | separate function. Aside from making the loops infinitely faster, no functionality change. llvm-svn: 107407
* Provide an exception-specification for an implicitly-declaredDouglas Gregor2010-07-011-2/+31
| | | | | | copy-assignment operator. llvm-svn: 107406
* Move the implicit declaration of a class's copy-assignment operatorDouglas Gregor2010-07-012-99/+114
| | | | | | into a separate routine. No functionality change. llvm-svn: 107402
* Make loops infinitely faster. No functionality change.Douglas Gregor2010-07-011-5/+7
| | | | llvm-svn: 107398
* Remove unnecessary ASTContext parameter fromDouglas Gregor2010-07-014-16/+15
| | | | | | CXXRecordDecl::getDestructor(); no functionality change. llvm-svn: 107394
* Reinstate fix for PR7526, which was failing because, now that weDouglas Gregor2010-07-013-17/+116
| | | | | | | | | | | | | | | aren't dropping all exception specifications on destructors, the exception specifications on implicitly-declared destructors were detected as being wrong (which they were). Introduce logic to provide a proper exception-specification for implicitly-declared destructors. This also fixes PR6972. Note that the other implicitly-declared special member functions also need to get exception-specifications. I'll deal with that in a subsequent commit. llvm-svn: 107385
* When performing copy initialization via user-defined conversions,Douglas Gregor2010-07-011-13/+3
| | | | | | don't allow two user-defined conversions. Fixes PR6595 (again). llvm-svn: 107379
* Revert r107374, which broke bootstrap.Douglas Gregor2010-07-013-18/+15
| | | | llvm-svn: 107378
* When building the type of a destructor, make sure to keep theDouglas Gregor2010-07-013-15/+18
| | | | | | exception specification. Fixes PR7526. llvm-svn: 107374
* Extend the "cannot convert from base class pointer to derived classDouglas Gregor2010-07-011-6/+14
| | | | | | pointer" diagnostic to handle references, too. llvm-svn: 107372
OpenPOWER on IntegriCloud