summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
...
* Push the range associated with a nested-name-specifier further throughDouglas Gregor2010-09-081-12/+21
| | | | | | | | TreeTransform, since we were getting an empty source range where we shouldn't. Sadly, the test case is Boost.Proto, and isn't worth reducing. llvm-svn: 113446
* Fix a few minor issues with parsing and semantic analysis of C++Douglas Gregor2010-09-082-14/+16
| | | | | | | | typeid expressions: - make sure we have a proper source location for the closing ')' - cache the declaration of std::type_info once we've found it llvm-svn: 113441
* When providing a completion for a function/method parameter of blockDouglas Gregor2010-09-081-16/+21
| | | | | | pointer type, actually provide a usable block literal expression. llvm-svn: 113431
* Clean up some of the CMake dependenciesDouglas Gregor2010-09-081-0/+2
| | | | llvm-svn: 113416
* Use the new-initialization code for initializing scalars with aDouglas Gregor2010-09-082-40/+21
| | | | | | | | function-style cast. Previously, we had a (redundant, incorrect) semantic-checking path for non-class types, which allowed value-initialization of a reference type and then crashed. llvm-svn: 113415
* Reverse r113397 until we decide what to do withFariborz Jahanian2010-09-081-5/+1
| | | | | | | use of 'struct objc_object*' for 'is' (and others) in clang. llvm-svn: 113414
* Initialize the MSVCGuidDecl variable in the correct order.Bill Wendling2010-09-081-2/+3
| | | | llvm-svn: 113412
* Fix a crash when overloading id with objc_object*.Fariborz Jahanian2010-09-081-1/+5
| | | | | | Radar 8400356. llvm-svn: 113397
* Microsoft's __uuidof operator implementation part 1.Francois Pichet2010-09-083-1/+120
| | | | llvm-svn: 113356
* Allow type definitions inside anonymous struct/union in Microsoft mode.Francois Pichet2010-09-081-5/+19
| | | | llvm-svn: 113354
* Don't give 'global constructor' warnings for function statics, even if they ↵Sebastian Redl2010-09-081-1/+1
| | | | | | have a direct initializer. Fixes PR8095. llvm-svn: 113344
* Allow (cv) void and incomplete arrays to be passed to the type traits.Sebastian Redl2010-09-081-2/+6
| | | | | | Fixes PR8110, and thus PR8109, PR8097, and parts of PR8101, PR8105 and PR8107. Only a few traits have tests for incomplete arrays, since I'm not yet clear what the result for them should be; Howards wants to file a DR to change the standard. llvm-svn: 113326
* add a fixit when 'main' does ot return 'int'; review welcomeGabor Greif2010-09-081-3/+9
| | | | llvm-svn: 113324
* Provide proper type-source location information forDouglas Gregor2010-09-083-99/+86
| | | | | | | | CXXTemporaryObjectExpr, CXXScalarValueInitExpr, and CXXUnresolvedConstructExpr, getting rid of a bunch of FIXMEs in the process. llvm-svn: 113319
* Improve source-location information for CXXNewExpr, by hanging on toDouglas Gregor2010-09-072-31/+31
| | | | | | the TypeSourceInfo for the allocated type. Fixes PR7501. llvm-svn: 113291
* Have Sema check for validity of CGString literalFariborz Jahanian2010-09-071-4/+17
| | | | | | instead of asserting in IRGen. Fixes radar 8390459. llvm-svn: 113253
* Provide a specific diagnostic when trying to redefine an "externDouglas Gregor2010-09-071-1/+6
| | | | | | | inline" function outside of GNU89 mode. Fixes <rdar://problem/6880464>. llvm-svn: 113204
* PR8023: Don't crash on invalid uses of __real__ on class types in C++.Eli Friedman2010-09-051-1/+1
| | | | llvm-svn: 113124
* zap more dead code.Chris Lattner2010-09-041-4/+1
| | | | llvm-svn: 113076
* zap dead code.Chris Lattner2010-09-041-6/+2
| | | | llvm-svn: 113074
* Synchronize code-completion cursor kinds with indexing cursorDouglas Gregor2010-09-032-87/+68
| | | | | | kinds. How shameful that this code was duplicated! llvm-svn: 113033
* Fix PR7402 when it strikes via template instantiation.Chandler Carruth2010-09-031-0/+5
| | | | llvm-svn: 113019
* It's OK for classes to have flexible array elements (but not unions).Anders Carlsson2010-09-031-1/+1
| | | | llvm-svn: 113018
* Allow anonymous and local types. The support was already in place for these,Chandler Carruth2010-09-031-21/+23
| | | | | | but this makes them work even as an extension in C++98. This resolves PR8077. llvm-svn: 113011
* Simplify code-completion result sorting a bitDouglas Gregor2010-09-031-8/+0
| | | | llvm-svn: 112968
* Add a quick-and-dirty hack to give a better diagnostic for [class.protected]John McCall2010-09-031-0/+55
| | | | | | | | | | restrictions. The note's not really on the right place given its wording, but putting a second note on the call site (or muddying the wording) doesn't appeal. There are corner cases where this can be wrong, but I'm not concerned. llvm-svn: 112950
* "I see dead code". IdempotentOperationChecker::isTruncationExtensionAssignmentChris Lattner2010-09-031-1/+0
| | | | | | | | | should probably be removed if it has no purpose, but I just #if'd it out in case it's usefulIdempotentOperationChecker::isTruncationExtensionAssignment should probably be removed if it has no purpose, but I just #if'd it out in case it's useful llvm-svn: 112949
* Devirtualize Sema, kill off DeleteExpr and DeleteStmt, and reformat.John McCall2010-09-035-14/+0
| | | | llvm-svn: 112945
* Add symantic support for the Pascal calling convention viaDawn Perchik2010-09-033-0/+8
| | | | | | | "__attribute((pascal))" or "__pascal" (and "_pascal" under -fborland-extensions). Support still needs to be added to llvm. llvm-svn: 112939
* Static local variables don't result in global constructors being emitted.Anders Carlsson2010-09-031-2/+2
| | | | llvm-svn: 112933
* Remove now unused function.Anders Carlsson2010-09-031-8/+0
| | | | llvm-svn: 112927
* Get rid of the "functions declared 'noreturn' should have a 'void' result ↵Anders Carlsson2010-09-031-5/+0
| | | | | | | | | type" warning. The rationale behind this is that it is normal for callback functions to have a non-void return type and it should still be possible to mark them noreturn. (JavaScriptCore is a good example of this). llvm-svn: 112918
* Eliminate CXXBindReferenceExpr, which was used in a ton ofDouglas Gregor2010-09-021-10/+0
| | | | | | well-intentioned but completely unused code. llvm-svn: 112868
* Enhance return-stack-address check (in Sema) to handle fields that ↵Ted Kremenek2010-09-021-3/+8
| | | | | | themselves are references. (Fixes PR 7999; fix by Chandler Carruth). llvm-svn: 112792
* Transfer calling-convention attributes down to member function pointers.Douglas Gregor2010-09-011-2/+10
| | | | llvm-svn: 112715
* Split ObjCInterfaceDecl::ReferencedProtocols into two lists: ↵Ted Kremenek2010-09-014-24/+31
| | | | | | | | | | | | | ReferencedProtocols and AllReferencedProtocols. ReferencedProtocols (and thus protocol_begin(), protocol_end()) now only contains the list of protocols that were directly referenced in an @interface declaration. 'all_referenced_protocol_[begin,end]()' now returns the set of protocols that were referenced in both the @interface and class extensions. The latter is needed for semantic analysis/codegen, while the former is needed to maintain the lexical information of the original source. Fixes <rdar://problem/8380046>. llvm-svn: 112691
* Make inline namespace not be transparent after all. The concept simply ↵Sebastian Redl2010-08-311-3/+7
| | | | | | doesn't fit. Instead, special-case the few places where transparent contexts have the desired behavior for inline namespaces. Fixes a redeclaration issue in inline namespaces. llvm-svn: 112637
* AST work to support [C++] [IRgen] for ?: with missing LHSFariborz Jahanian2010-08-311-4/+7
| | | | | | | This is also pr7726 and wip. No change in functionality at this time. llvm-svn: 112612
* Implement basic support for indexing function templates inDouglas Gregor2010-08-311-1/+2
| | | | | | | | | | | | | | libclang. This includes: - Cursor kind for function templates, with visitation logic - Cursor kinds for template parameters, with visitation logic - Visitation logic for template specialization types, qualified type locations - USR generation for function templates, template specialization types, template parameter types. Also happens to fix PR7804, which I tripped across while testing. llvm-svn: 112604
* Fix a regression that allowed clearly ill formed code. The diagnostic is stillChandler Carruth2010-08-311-0/+2
| | | | | | terrible, FIXME left to do a proper job of diagnosing this. llvm-svn: 112581
* When provide code completions for a variadic Objective-C methodDouglas Gregor2010-08-311-15/+24
| | | | | | | | declaration send or a variadic function call, collapse the ", ..." into the parameter before it, so that we don't get a second placeholder. llvm-svn: 112579
* Add a forgotten place where the enclosing namespace set matters, plus a big ↵Sebastian Redl2010-08-311-2/+2
| | | | | | testcase for inline namespace fun. llvm-svn: 112565
* Enable inline namespaces in the AST.Sebastian Redl2010-08-311-0/+21
| | | | llvm-svn: 112564
* Rename DeclContext::getLookupContext to getRedeclContext and change its ↵Sebastian Redl2010-08-3111-54/+52
| | | | | | semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them. llvm-svn: 112563
* When instantiating a function type, instantiate the return type beforeDouglas Gregor2010-08-311-6/+13
| | | | | | | | | | | | | | | | | | | instantiating the parameters. In a perfect world, this wouldn't matter, and compilers are free to instantiate in any order they want. However, every other compiler seems to instantiate the return type first, and some code (in this case, Boost.Polygon) depends on this and SFINAE to avoid instantiating something that shouldn't be instantiated. We could fight this battle, and insist that Clang is allowed to do what it does, but it's not beneficial: it's more predictable to instantiate this way, in source order. When we implement late-specified return types, we'll need to instantiate the return type last when it was late-specified, hence the FIXME. We now compile Boost.Polygon properly. llvm-svn: 112561
* Add a missing return. Bug noticed by Dawn Perchik!Douglas Gregor2010-08-301-0/+1
| | | | llvm-svn: 112552
* When template substitution into a template parameter reduces the levelDouglas Gregor2010-08-301-6/+8
| | | | | | | | | | | | of that parameter, reduce the level by the number of active template argument lists rather than by 1. The number of active template argument lists is only > 1 when we have a class template partial specialization of a member template of a class template that itself is a member template of another class template. ... and Boost.MSM does this. Fixes PR7669. llvm-svn: 112551
* zap tabsGabor Greif2010-08-301-1/+1
| | | | llvm-svn: 112541
* fix dual aspect of PR8007,Gabor Greif2010-08-301-3/+19
| | | | | | | | | | namely when the friend function prototype is already used at the point of the template definition that is supposed to inject the friend function. Testcase verifies four scenarios. I would like receive some code review for this. llvm-svn: 112524
* Perform the function-to-pointer adjustment during template argumentDouglas Gregor2010-08-301-31/+43
| | | | | | | | | deduction where the parameter is a function reference, function pointer, or member function pointer and the argument is an overloaded function. Fixes <rdar://problem/8360106>, a template argument deduction issue found by Boost.Filesystem. llvm-svn: 112523
OpenPOWER on IntegriCloud