summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* objective-c++ must take into account qualifiers when Fariborz Jahanian2010-03-151-0/+6
| | | | | | considering valid objc pointer converions. llvm-svn: 98557
* During C++ name lookup, use DeclContext::Equals() rather thanDouglas Gregor2010-03-151-5/+3
| | | | | | | comparing DeclContext pointers, to avoid having to remember to call getPrimaryContext() everywhere. This is the last part PR6594. llvm-svn: 98546
* Implement C++ [temp.local]p8, which specifies that a templateDouglas Gregor2010-03-151-10/+93
| | | | | | | | | | | parameter hides a namespace-scope declararion with the same name in an out-of-line definition of a template. The lookup requires a strange interleaving of lexical and semantic scopes (go C++), which I have not yet handled in the typo correction/code completion path. Fixes PR6594. llvm-svn: 98544
* Add support for -Wwrite-strings. Patch by Mike M! Fixes PR 4804.John McCall2010-03-152-2/+2
| | | | llvm-svn: 98541
* Remember declaration scope qualifiers in the AST. Imposes no memory overheadJohn McCall2010-03-154-0/+100
| | | | | | | | | | | on unqualified declarations. Patch by Enea Zaffanella! Minimal adjustments: allocate the ExtInfo nodes with the ASTContext and delete them during Destroy(). I audited a bunch of Destroy methods at the same time, to ensure that the correct teardown was being done. llvm-svn: 98540
* Fix PR6562. If a type is dependent, we don't know if it will have implicitRafael Espindola2010-03-131-0/+5
| | | | | | destructors. llvm-svn: 98440
* Use SmallString instead of SmallVectorKovarththanan Rajaratnam2010-03-131-173/+173
| | | | llvm-svn: 98436
* Allow users to set CPPFLAGS and CXXFLAGS on the make command line.Jeffrey Yasskin2010-03-121-1/+1
| | | | | Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test) llvm-svn: 98399
* Use llvm::SmallVector instead of std::vector.Ted Kremenek2010-03-121-2/+3
| | | | llvm-svn: 98397
* Preserve the inherited-default-argument bit through instantiation.John McCall2010-03-121-0/+2
| | | | llvm-svn: 98375
* Remember whether a ParmVarDecl was spelled with a default argument orJohn McCall2010-03-121-0/+1
| | | | | | | | whether it inherited one from a previous declaration. Patch by Enea Zaffanella! llvm-svn: 98362
* Improve the unused-value check to look into comma expressions and filter outJohn McCall2010-03-121-4/+3
| | | | | | | | voids in sub-expressions. Patch by Mike M! Fixes PR4806. llvm-svn: 98335
* Split Sema::ActOnProperty() into two recursive functions to clearly separateTed Kremenek2010-03-122-106/+184
| | | | | | the handling of class extensions from other cases. llvm-svn: 98326
* Implement basic support for friend types and functions in non-dependentJohn McCall2010-03-121-2/+27
| | | | | | contexts. llvm-svn: 98321
* Fix 80 col violations.Ted Kremenek2010-03-121-15/+16
| | | | llvm-svn: 98320
* Move 'ActOn' methods to the beginning of the fileTed Kremenek2010-03-121-395/+404
| | | | | | so we can clearly see the parser entry points. llvm-svn: 98319
* Update CMake build.Ted Kremenek2010-03-121-0/+1
| | | | llvm-svn: 98318
* Split Sema logic for ObjC @property and @synthesize intoTed Kremenek2010-03-122-1006/+1025
| | | | | | a separate file. llvm-svn: 98317
* For ivars created using @synthesize, set their DeclContext to beTed Kremenek2010-03-111-1/+3
| | | | | | | | | | | | the @implementation (instead of the @interface) and actually add the ivar to the DeclContext (which we weren't doing before). This allows us to simplify ASTContext::CollectNonClassIvars() by removing ASTContext::CollectProtocolSynthesizedIvars(). Now all ivars can be found by either inspecting the ObjCInterfaceDecl and its companion ObjCImplementationDecl. llvm-svn: 98280
* Warn about comparing an unsigned expression with 0 in tautological ways.John McCall2010-03-114-12/+43
| | | | | | Patch by mikem! llvm-svn: 98279
* Implement -Wmissing-field-initializers. Patch by mikem!John McCall2010-03-111-0/+20
| | | | llvm-svn: 98275
* Fix a self-host problem caused by this over-eager assertion. I'm not sureJohn McCall2010-03-111-2/+0
| | | | | | there's a good equivalent that's actually true, unfortunately. llvm-svn: 98253
* Maintain type source information for functions through templateJohn McCall2010-03-116-95/+193
| | | | | | | | | | | instantiation. Based on a patch by Enea Zaffanella! I found a way to reduce some of the redundancy between TreeTransform's "standard" FunctionProtoType transformation and TemplateInstantiator's override, and I killed off the old SubstFunctionType by adding type source info for the last cases where we were creating FunctionDecls without TSI (at least that get passed through template instantiation). llvm-svn: 98252
* Split C++ friend declarations into their own header/implementation file.John McCall2010-03-112-2/+2
| | | | | | | | | I'm expecting this portion of the AST to grow and change, and I'd like to be able to do that with minimal recompilation. If this proves unnecessary when access control is fully-implemented, I'll fold the classes back into DeclCXX.h. llvm-svn: 98249
* Statement expressions can be used in global- or namespace-scoped blocksDouglas Gregor2010-03-101-1/+2
| | | | llvm-svn: 98135
* Create a new InjectedClassNameType to represent bare-word references to the John McCall2010-03-108-87/+90
| | | | | | | | | | | | | injected class name of a class template or class template partial specialization. This is a non-canonical type; the canonical type is still a template specialization type. This becomes the TypeForDecl of the pattern declaration, which cleans up some amount of code (and complicates some other parts, but whatever). Fixes PR6326 and probably a few others, primarily by re-establishing a few invariants about TypeLoc sizes. llvm-svn: 98134
* Delay codegen of vtables when handling implicit instantiations.Rafael Espindola2010-03-101-4/+7
| | | | | | This fixes PR6474. llvm-svn: 98123
* Extend ObjCMessageExpr for class method sends with the source locationDouglas Gregor2010-03-081-6/+6
| | | | | | of the class name. llvm-svn: 97943
* Keep track of type source information in the return type of anDouglas Gregor2010-03-081-3/+5
| | | | | | | | | | Objective-C method declaration, e.g., for - (Foo *)myMethod; we now have TypeSourceInfo for the Foo*. llvm-svn: 97942
* Remove unused headers.Duncan Sands2010-03-081-1/+0
| | | | llvm-svn: 97941
* Make a note for the C++0x future, when we'll have to revisit the ↵Douglas Gregor2010-03-081-0/+2
| | | | | | jump-diagnostics handling for variables without initializers llvm-svn: 97929
* In C++98/03, an uninitialized variable that has POD class type will beDouglas Gregor2010-03-081-15/+29
| | | | | | | | | uninitialized. This seems not to be the case in C++0x, where we still call the (trivial) default constructor for a POD class (!). Previously, we had implemented only the C++0x rules; now we implement both. Fixes PR6536. llvm-svn: 97928
* Downgrade errors when trying to catch a pointer or reference toDouglas Gregor2010-03-081-3/+10
| | | | | | | | | incomplete type to warnings; GCC (and EDG in GCC compatibility mode) permit such handles. Fixes PR6527. (For real this time) llvm-svn: 97927
* Robustify callers that rebuild typename type nodes again NULL returnDouglas Gregor2010-03-072-0/+6
| | | | | | types. Fixes PR6463. llvm-svn: 97924
* Perform overload resolution when static_cast'ing from aDouglas Gregor2010-03-071-4/+34
| | | | | | | pointer-to-member-to-derived to a pointer-to-member-to-base. Fixes PR6072. llvm-svn: 97923
* Reference binding via user-defined conversion can compute a bindingDouglas Gregor2010-03-072-14/+24
| | | | | | | that is not reference-related (because it requires another implicit conversion to which we can find). Fixes PR6483. llvm-svn: 97922
* Fix for PR6294: we should only delay recording nested dynamic classes if theyEli Friedman2010-03-071-1/+1
| | | | | | | are lexically nested. Othewise, we never end up recording semantically nested classes. llvm-svn: 97900
* Fix 80 col violation.Tanya Lattner2010-03-071-1/+2
| | | | llvm-svn: 97898
* Fix indentation, use string directly instead of StringRef.Tanya Lattner2010-03-071-5/+4
| | | | llvm-svn: 97896
* Fix some weird patch issue.Tanya Lattner2010-03-071-1/+1
| | | | llvm-svn: 97894
* Implement missing-braces warning and add a test case.Tanya Lattner2010-03-071-0/+15
| | | | llvm-svn: 97893
* Allow use of byref (__block attributed) arrays insideFariborz Jahanian2010-03-061-1/+1
| | | | | | the block. Fixes radar 7671883. llvm-svn: 97863
* When declaring a catch block in C++, make sure that the type beingDouglas Gregor2010-03-051-5/+26
| | | | | | caught can be copy-initialized and destructed. Fixes PR6518. llvm-svn: 97853
* Patch to build qualifier on objective-cFariborz Jahanian2010-03-051-1/+2
| | | | | | pointer types. Fixes radar 7626768. llvm-svn: 97847
* Reinstate r97674 with a fix for the assertion that was firing in <list>Douglas Gregor2010-03-036-48/+140
| | | | llvm-svn: 97686
* Revert r97674; it's causing failuresDouglas Gregor2010-03-036-138/+46
| | | | llvm-svn: 97677
* Implement disambiguation of base class members via aDouglas Gregor2010-03-036-46/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | nested-name-specifier. For example, this allows member access in diamond-shaped hierarchies like: struct Base { void Foo(); int Member; }; struct D1 : public Base {}; struct D2 : public Base {}; struct Derived : public D1, public D2 { } void Test(Derived d) { d.Member = 17; // error: ambiguous cast from Derived to Base d.D1::Member = 17; // error: okay, modify D1's Base's Member } Fixes PR5820 and <rdar://problem/7535045>. Also, eliminate some redundancy between Sema::PerformObjectMemberConversion() and Sema::PerformObjectArgumentInitialization() -- the latter now calls the former. llvm-svn: 97674
* Suppress implicit member redeclarations arising from explicit instantiationJohn McCall2010-03-021-0/+1
| | | | | | | | | | | | declarations after the member has been explicitly specialized. We already did this after explicit instantiation definitions; not doing it for declarations meant that subsequent definitions would see a previous member declaration with specialization kind "explicit instantiation decl", which would then happily get overridden. Fixes PR 6458. llvm-svn: 97605
* During codegen assert that any copy assignment, destructor or constructor thatRafael Espindola2010-03-022-43/+87
| | | | | | | | we need to synthesize has been marked as used by Sema. Change Sema to avoid these asserts. llvm-svn: 97589
* Diagnose the declaration of enum templates. Also, be a bit moreDouglas Gregor2010-03-021-3/+4
| | | | | | careful about value-dependent enumerators. Fixes PR5786. llvm-svn: 97570
OpenPOWER on IntegriCloud