summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* objc arc: allow objc_returns_inner_pointer on methods that return Fariborz Jahanian2011-09-301-1/+3
| | | | | | | a reference type, since inner reference is much like an inner pointer. // rdar://10139365 llvm-svn: 140880
* Fix compiler warning about && in ||.Benjamin Kramer2011-09-301-2/+2
| | | | | | | This time the warning found an actual bug, we don't want to handle force_align_arg_pointer differently than __force_align_arg_pointer__. llvm-svn: 140877
* Support dllimport and dllexport on x86-64 Windows. PR10978. Patch by Ruben ↵Eli Friedman2011-09-301-4/+5
| | | | | | Van Boxem. llvm-svn: 140871
* [libclang] Introduce CXCursor_CXXAccessSpecifier for C++'s ↵Argyrios Kyrtzidis2011-09-301-0/+1
| | | | | | | | public:/private:/protected: specifiers. Patch by Paolo Capriotti! llvm-svn: 140864
* Add explicit attributes to mark functions as having had theirJohn McCall2011-09-304-0/+57
| | | | | | | | | | | CoreFoundation object-transfer properties audited, and add a #pragma to cause them to be automatically applied to functions in a particular span of code. This has to be implemented largely in the preprocessor because of the requirement that the region be entirely contained in a single file; that's hard to impose from the parser without registering for a ton of callbacks. llvm-svn: 140846
* constexpr functions are implicitly const. More tests to follow.Richard Smith2011-09-301-0/+14
| | | | llvm-svn: 140831
* Suggest adding 'constexpr' if the GNU extension for in-class initializers ↵Richard Smith2011-09-301-0/+4
| | | | | | for static const float members is used in C++11 mode. llvm-svn: 140828
* Mark the ExtWarn for in-class initialization of static const float members ↵Richard Smith2011-09-291-7/+8
| | | | | | as a GNU extension. Don't extend the scope of this extension to all literal types in C++0x mode. llvm-svn: 140820
* Minor refactoring. Enumerators may inherit the deprecated/unavailable Fariborz Jahanian2011-09-291-35/+42
| | | | | | | attributes from the enumeration type. // rdar://10201690 llvm-svn: 140818
* In C++0x, static const volatile data members cannot be initialized in-class.Richard Smith2011-09-291-4/+5
| | | | llvm-svn: 140809
* constexpr: semantic checking for constexpr variables.Richard Smith2011-09-292-35/+111
| | | | | | We had an extension which allowed const static class members of floating-point type to have in-class initializers, 'as a C++0x extension'. However, C++0x does not allow this. The extension has been kept, and extended to all literal types in C++0x mode (with a fixit to add the 'constexpr' specifier). llvm-svn: 140801
* c - Enumerators may inherit the deprecated/unavailable Fariborz Jahanian2011-09-291-5/+15
| | | | | | | attributes from the enumeration type. // rdar://10201690 llvm-svn: 140800
* Add an ns_bridged attribute, used to specify that a John McCall2011-09-292-0/+35
| | | | | | | | | | | | | | pointer to the annotated struct type can be used as an Objective-C object pointer. If an argument is given, the type is actually "toll-free bridged" to the specific type named there, rather than just to 'id'. For now, we cannot rely on all types being so annotated, and we'll always have to have exceptions for things like CFTypeRef (aka const void*), but this is clearly a good foundation for improving toolage in this area. llvm-svn: 140779
* Like IBOutletCollection, it only makes sense to apply the IBOutlet ↵Ted Kremenek2011-09-291-25/+31
| | | | | | annotation to Objective-C object types. Fixes <rdar://problem/10142685>. llvm-svn: 140778
* Do not warn about empty format strings when there are no data arguments. ↵Ted Kremenek2011-09-291-7/+6
| | | | | | Fixes <rdar://problem/9473155>. llvm-svn: 140777
* Unnecessary elseDavid Blaikie2011-09-291-2/+1
| | | | llvm-svn: 140775
* objc arc: Diagnose block pointer type mismatch whenFariborz Jahanian2011-09-281-16/+4
| | | | | | | | some arguments types are ns_consumed and some otherwise matching types are not. This is objc side of // rdar://10187884 llvm-svn: 140729
* objc++ arc: Diagnose block pointer type mismatch whenFariborz Jahanian2011-09-281-0/+17
| | | | | | | | some arguments types are ns_consumed and some otherwise matching types are not. This fixes the objc++ side only *auch*. // rdar://10187884 llvm-svn: 140717
* Tweak -Wobjc-missing-super-calls to not warning about missing [super ↵Ted Kremenek2011-09-281-2/+3
| | | | | | dealloc] when in GC-only mode, and to not warning about missing [super finalize] when not using GC. llvm-svn: 140713
* For __weak/__strong/etc. ownership attributes, don't macro expand them in ↵Argyrios Kyrtzidis2011-09-281-7/+11
| | | | | | diagnostics. llvm-svn: 140711
* PR11002: Make sure we emit sentinel warnings with a valid source location. ↵Eli Friedman2011-09-271-4/+7
| | | | | | (Ideally, we want to use the location returned by getLocForEndOfToken, but that is not always successful.) llvm-svn: 140658
* Include prefix with default synthesized ivars.Ted Kremenek2011-09-271-3/+14
| | | | llvm-svn: 140657
* Only print _Bool as 'bool' when 'bool' is defined as an object-likeDouglas Gregor2011-09-277-53/+81
| | | | | | macro whose only replacement token is '_Bool'. llvm-svn: 140656
* When 'bool' is not a built-in type but is defined as a macro, printDouglas Gregor2011-09-276-33/+25
| | | | | | | 'bool' rather than '_Bool' within types, to make things a bit more readable. Fixes <rdar://problem/10063263>. llvm-svn: 140650
* objcetive-c-arc: When overriding a method, its ns_consumed patameterFariborz Jahanian2011-09-271-3/+30
| | | | | | | | attribute must match its overriden method. Same also for ns_returns_retained/not_retained on the result type. This is one half of // rdar://10187884 llvm-svn: 140649
* Get rid of useless helper Sema::CastCategory.Eli Friedman2011-09-275-16/+11
| | | | llvm-svn: 140642
* Revert r139989 and r140031, which implemented the Objective-C typeDouglas Gregor2011-09-272-33/+9
| | | | | | | | | system change in <rdar://problem/10109725> that allows conversion from 'self' in class methods to the root of the class's hierarchy. This conversion rule is a hack that has non-trivial repurcussions (particularly with overload resolution). llvm-svn: 140605
* Revert r140589. It was causing failures during llvm compilation:Bill Wendling2011-09-271-47/+1
| | | | | | | | | | | | | | llvm[1]: Compiling CommandLine.cpp for Debug+Asserts build if /Users/void/llvm/llvm-opt.obj/Release+Asserts/bin/clang++ -I/Users/void/llvm/llvm.obj/include -I/Users/void/llvm/llvm.obj/lib/Support -I/Users/void/llvm/llvm.src/include -I/Users/void/llvm/llvm.src/lib/Support -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -g -fno-exceptions -fno-common -Woverloaded-virtual -Wcast-qual -m64 -Wall -W -Wno-unused-parameter -Wwrite-strings -c -MMD -MP -MF "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp" -MT "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.o" -MT "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d" /Users/void/llvm/llvm.src/lib/Support/CommandLine.cpp -o /Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.o ; \ then /bin/mv -f "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp" "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d"; else /bin/rm "/Users/void/llvm/llvm.obj/lib/Support/Debug+Asserts/CommandLine.d.tmp"; exit 1; fi In file included from /Users/void/llvm/llvm.src/lib/Support/CommandLine.cpp:25: /Users/void/llvm/llvm.src/include/llvm/Support/system_error.h:690:14: error: unknown type name 'make_error_condition'; did you mean 'error_condition'? {*this = make_error_condition(_e);} ^~~~~~~~~~~~~~~~~~~~ error_condition ... llvm-svn: 140599
* PR11009: Fix a FIXME which was leading to an assertion failure with rvalue ↵Eli Friedman2011-09-271-4/+1
| | | | | | references. llvm-svn: 140594
* Add typo correction for the type name in C++ "new" statementsKaelyn Uhrain2011-09-271-1/+47
| | | | llvm-svn: 140589
* objc - don't complain about unimplemented property when conformingFariborz Jahanian2011-09-271-1/+2
| | | | | | | protocol declares the property, as well as one of its superclasses. Property will be implemented in the super class. // rdar://10120691 llvm-svn: 140586
* Fix regression of -Warray-bounds involving varargs functions [PR 11007].Ted Kremenek2011-09-261-0/+4
| | | | llvm-svn: 140584
* objc - compare setter/property types usingFariborz Jahanian2011-09-261-2/+2
| | | | | | hasSameUnqualifiedType in //rdar://10156674 llvm-svn: 140576
* objc - in matching setter argument type to its property type,Fariborz Jahanian2011-09-261-1/+2
| | | | | | ingore the type qualifiers. // rdar://10156674 llvm-svn: 140571
* objc-arc: mark functions which return types which can't be dealt withFariborz Jahanian2011-09-261-1/+3
| | | | | | | in arc mode and are in system headers as unavailable. // rdar://10186625 llvm-svn: 140565
* CheckStringInit has side effects; make sure we don't run it in VerifyOnly ↵Eli Friedman2011-09-261-3/+5
| | | | | | | | mode, at least for the moment. <rdar://problem/10185490>. Sebastian, please take a look at this; I'm not entirely sure it is the right thing to do. llvm-svn: 140552
* Fix a typo in the new VerifyOnly handling in SemaInit. No visible ↵Eli Friedman2011-09-261-1/+1
| | | | | | difference at the moment, as far as I can tell. llvm-svn: 140546
* Rename DiagnosticInfo to Diagnostic as per issue 5397David Blaikie2011-09-261-1/+1
| | | | llvm-svn: 140493
* Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie2011-09-2510-29/+31
| | | | llvm-svn: 140478
* Add a missing increment to avoid infinite looping in the regression test.Benjamin Kramer2011-09-251-1/+4
| | | | | | Also make sure we set the error flag when correcting a typo. llvm-svn: 140466
* Update CMake build.Benjamin Kramer2011-09-241-0/+1
| | | | llvm-svn: 140462
* Add a special note for overload resolution when an initializer list argumentSebastian Redl2011-09-241-0/+11
| | | | | | | | | cannot be converted. This is in preparation for overload resolution of initializer lists. Currently, you will always get this message when you try to pass an init list to an overloaded function. llvm-svn: 140461
* Correctly parse braced member initializers (even in delayed parsing) and ↵Sebastian Redl2011-09-243-129/+217
| | | | | | | | | | | correctly pass the information on to Sema. There's still an incorrectness in the way template instantiation works now, but that is due to a far larger underlying representational problem. Also add a test case for various list initialization cases of scalars, which test this commit as well as the previous one. llvm-svn: 140460
* Treat list-initialization of scalars as a first-class citizen in C++11.Sebastian Redl2011-09-241-5/+6
| | | | | | | | | Allow empty initializer lists for scalars, which mean value-initialization. Constant evaluation for single-element and empty initializer lists for scalars. Codegen for empty initializer lists for scalars. Test case comes in next commit. llvm-svn: 140459
* Give InitListChecker a verification-only mode, where it neither emits ↵Sebastian Redl2011-09-243-238/+357
| | | | | | | | | | | diagnostics nor builds a semantic (structured) initializer list, just reports on whether it can match the given list to the target type. Use this mode for doing init list checking in the initial step of initialization, which will eventually allow us to do overload resolution based on the outcome. llvm-svn: 140457
* In Initialization, add step kind SK_ListConstructorCall (list-initializationSebastian Redl2011-09-241-5/+21
| | | | | | | resolves to a constructor call in C++11) and failure kind FK_ListInitializationFailed (early InitListChecker run failed). llvm-svn: 140456
* Inline Sema::CheckInitList into its only user.Sebastian Redl2011-09-241-11/+4
| | | | llvm-svn: 140455
* Fix typos and non-doxygen-ness in a few comments.Sebastian Redl2011-09-241-4/+2
| | | | llvm-svn: 140454
* [microsoft] In Microsoft mode, if we are inside a template class member ↵Francois Pichet2011-09-241-0/+10
| | | | | | | | | function and we can't resolve an identifier then assume the identifier is type dependent. The goal is to postpone name lookup to instantiation time to be able to search into type dependent base classes. This fixes a few errors when parsing MFC code with clang. BTW clang trunk is now about 5 patches away to be able the parse the default wizard-generated MFC project. llvm-svn: 140452
* objc - redeclaration of property in extension classFariborz Jahanian2011-09-241-1/+7
| | | | | | | must match property type declaration in its primary class. // rdar://10142679 llvm-svn: 140438
OpenPOWER on IntegriCloud