summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* Add a helper function for determining whether an expressionJohn McCall2011-10-171-1/+1
| | | | | | has placeholder type. llvm-svn: 142203
* Revert r142142: "Make a C-style cast a const-cast, to suppress a GCC warning."Sebastian Redl2011-10-171-1/+1
| | | | | | Richard already fixed the underlying issue, so the cast was superfluous. llvm-svn: 142192
* For modules, all macros that aren't include guards are implicitlyDouglas Gregor2011-10-171-28/+0
| | | | | | | public. Add a __private_macro__ directive to hide a macro, similar to the __module_private__ declaration specifier. llvm-svn: 142188
* Perform an lvalue-to-rvalue conversion on an array index in a ↵Richard Smith2011-10-171-1/+5
| | | | | | __builtin_offsetof expression. llvm-svn: 142179
* Slightly simplify a constant expression check. No functional change.Richard Smith2011-10-161-3/+3
| | | | llvm-svn: 142167
* Add sema checks for calls to functions taking static array parametersPeter Collingbourne2011-10-162-0/+68
| | | | llvm-svn: 142157
* Implement overload resolution from init lists for scalar parameter types.Sebastian Redl2011-10-161-0/+86
| | | | llvm-svn: 142148
* Diagnose when omitting braces in direct list-initialization in C++0x.Sebastian Redl2011-10-161-10/+25
| | | | | | This also applies to C99-style aggregate literals, should they be used in C++11, since they are effectively identical to constructor call list-initialization syntax. llvm-svn: 142147
* In the verify-only pass, check that items that don't have an initializer in ↵Sebastian Redl2011-10-161-17/+62
| | | | | | an init list can be value-initialized, at least when designated initializers are not involved. No test case yet, since early failures cannot be distinguished from late failures until overload resolution works. llvm-svn: 142146
* Check for unavailable declarations in Sema::CanUseDecl.Sebastian Redl2011-10-161-0/+6
| | | | llvm-svn: 142145
* Drop the Diagnose parameter from Sema::PerformImplicitConversion again and ↵Sebastian Redl2011-10-162-11/+20
| | | | | | instead use TryImplicitConversion in CheckSingleAssignmentConstraints when that function is in no-diagnostics mode. llvm-svn: 142143
* Make a C-style cast a const-cast, to suppress a GCC warning. I should fix ↵Sebastian Redl2011-10-161-1/+1
| | | | | | the underlying issue eventually, but this interface will probably change anyway. llvm-svn: 142142
* Avoid duplicate unavailbility diagnostics in objc++.Fariborz Jahanian2011-10-151-1/+3
| | | | | | // rdar://10268422 llvm-svn: 142078
* obj-c++: allow the getter/setter to return/take parametersFariborz Jahanian2011-10-152-4/+8
| | | | | | by reference. // rdar://10188258 llvm-svn: 142075
* Add -Wc++98-compat warning for deduced 'auto' type specifier.Richard Smith2011-10-151-1/+3
| | | | llvm-svn: 142057
* Provide half floating point support as a storage only type.Anton Korobeynikov2011-10-147-12/+71
| | | | | | Lack of half FP was a regression compared to llvm-gcc. llvm-svn: 142016
* Attempt to fix Windows buildbot, round 2.Eli Friedman2011-10-141-1/+1
| | | | llvm-svn: 142014
* Add template instantiation support for AtomicExpr.Eli Friedman2011-10-142-25/+49
| | | | llvm-svn: 142012
* Attempt to fix buildbot failure on Windows.Eli Friedman2011-10-141-1/+2
| | | | llvm-svn: 142008
* Don't try to diagnose anything when we're passing incomplete typesDouglas Gregor2011-10-141-1/+4
| | | | | | | | through varargs. This only happens when we're in an unevaluated context, where we don't want to trigger an error anyway. Fixes PR11131 / <rdar://problem/10288375>. llvm-svn: 141986
* Reinstate r141898 (reverted in r141921), without the ↵Richard Smith2011-10-141-2/+5
| | | | | | | | -Wc++98-compat-variadic-templates flag. Consensus is that -Wc++98-compat is a useful addition to clang, but per-C++11-feature warnings may not be. Original patch by Jeffrey Yasskin. llvm-svn: 141985
* [temp.explicit]p1: constexpr cannot be specified in explicit instantiations.Richard Smith2011-10-141-3/+6
| | | | llvm-svn: 141982
* Change operator<< for raw_ostream and NamedDecl to take a reference instead ↵Benjamin Kramer2011-10-143-4/+4
| | | | | | | | of a pointer. Passing a pointer was a bad idea as it collides with the overload for void*. llvm-svn: 141971
* Fix misplaced comment.Fariborz Jahanian2011-10-141-3/+3
| | | | llvm-svn: 141967
* Make value kind based on the return type of the getter, notFariborz Jahanian2011-10-141-4/+4
| | | | | | | property type, for when getter may be a reference type. // rdar://10188258 revised. llvm-svn: 141966
* Under ARC, merge the bit corresponding to the ns_returns_retainedDouglas Gregor2011-10-141-0/+12
| | | | | | | attribute from the first declaration to later declarations. Fixes <rdar://problem/10142572>. llvm-svn: 141957
* Only warn in -Wliteral-conversion if the conversion loses informationMatt Beaumont-Gay2011-10-141-19/+7
| | | | llvm-svn: 141955
* When declaring an out-of-line template, attempt to rebuild any typesDouglas Gregor2011-10-142-0/+58
| | | | | | | within the template parameter list that may have changed now that we know the current instantiation. Fixes <rdar://problem/10194295>. llvm-svn: 141954
* Added clang_getCompletionAnnotation and clang_getCompletionNumAnnotations toErik Verbruggen2011-10-142-4/+34
| | | | | | retrieve annotations from completion string. llvm-svn: 141953
* Really protect from infinite loop when there are objc method redeclarations.Argyrios Kyrtzidis2011-10-141-2/+2
| | | | | | Serialization part will come later. llvm-svn: 141950
* Keep track of objc method redeclarations in the same interface.Argyrios Kyrtzidis2011-10-141-0/+4
| | | | | | Avoid possible infinite loop when iterating over an ObjCMethod's redeclarations. llvm-svn: 141946
* Revert the -Wc++98-compat flag because dgregor doesn't like it.Jeffrey Yasskin2011-10-141-5/+2
| | | | llvm-svn: 141921
* objc-arc: 'Class' property is implicitly __unsafe_unretained.Fariborz Jahanian2011-10-131-1/+1
| | | | | | // rdar://10239594 llvm-svn: 141915
* Extend -Wno-sizeof-array-argument to strncpy and friends.Nico Weber2011-10-131-4/+43
| | | | | | This finds 2 bugs in chromium and 1 in hunspell, with 0 false positives. llvm-svn: 141902
* Implement the first piece of a -Wc++98-compat flag so that people can build inJeffrey Yasskin2011-10-131-2/+5
| | | | | | | | C++11 mode but keep their sources compatible with C++98. This patch implements the -Wc++98-compat-variadic-templates sub-flag and -Wc++98-compat to include it. llvm-svn: 141898
* Tweak -Wuninitialized's handling of 'int x = x' to report that as the root ↵Ted Kremenek2011-10-131-24/+46
| | | | | | cause of an uninitialized variable IFF there are other uses of that uninitialized variable. Fixes <rdar://problem/9259237>. llvm-svn: 141881
* HasFormOfMemberPointer implies IsAddressOfOperand for an overload set. SimplifyDouglas Gregor2011-10-132-3/+3
| | | | llvm-svn: 141878
* Allow calling an overloaded function set by taking the address of theDouglas Gregor2011-10-132-6/+4
| | | | | | functions, e.g., (&f)(0). Fixes <rdar://problem/9803316>. llvm-svn: 141877
* Allow for annotate attributes after access specifiers. When suchErik Verbruggen2011-10-132-4/+21
| | | | | | attributes are found, propagate them to subsequent declarations. llvm-svn: 141861
* When we determine that a function template specialization produced asDouglas Gregor2011-10-121-9/+9
| | | | | | | | | | | | | | | part of template argument deduction is ill-formed, we mark it as invalid and treat it as a deduction failure. If we happen to find that specialization again, treat it as a deduction failure rather than silently building a call to the declaration. Fixes PR11117, a marvelous bug where deduction failed after creating an invalid specialization, causing overload resolution to pick a different candidate. Then we performed a similar overload resolution later, and happily picked the invalid specialization to call... resulting in a silent link failure. llvm-svn: 141809
* Add returns_twice to functions that are known to return twice. This implementsRafael Espindola2011-10-121-0/+3
| | | | | | the same behavior of gcc by keeping the attribute out of the function type. llvm-svn: 141803
* Fix typo in name of diagnostic.Ted Kremenek2011-10-121-1/+1
| | | | llvm-svn: 141793
* Teach __has_nothrow_assign not to complain about access (GCC and EDGDouglas Gregor2011-10-121-1/+5
| | | | | | | ignore access entirely for it) and not to crash on assignment operator templates. Fixes PR11110. llvm-svn: 141777
* constexpr: don't consider class types with mutable members to be literal types.Richard Smith2011-10-121-0/+3
| | | | | | | The standard doesn't allow this, but mutable constexpr variables break the semantics so badly that we can't reasonably accept them. llvm-svn: 141768
* objc: note location of the previously declaredFariborz Jahanian2011-10-121-1/+3
| | | | | | property in the diagnostic. llvm-svn: 141745
* Catch placeholder types in DefaultLvalueConversionJohn McCall2011-10-116-115/+226
| | | | | | | | | | | and DefaultFunctionArrayLvalueConversion. To prevent significant regression for should-this-be-a-call fixits, and to repair some such regression from the introduction of bound member placeholders, make those placeholder checks try to build calls appropriately. Harden the build-a-call logic while we're at it. llvm-svn: 141738
* Rename SemaCXXCast.cpp to SemaCast.cpp.John McCall2011-10-112-3/+6
| | | | llvm-svn: 141686
* Get rid of ShouldDeleteMoveConstructor.Alexis Hunt2011-10-111-177/+31
| | | | llvm-svn: 141650
* Consolidate copy constructor deletion into ShouldDeleteSpecialMember.Alexis Hunt2011-10-111-181/+69
| | | | llvm-svn: 141645
* Initial implementation of __atomic_* (everything except __atomic_is_lock_free).Eli Friedman2011-10-112-0/+177
| | | | llvm-svn: 141632
OpenPOWER on IntegriCloud