summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema
Commit message (Collapse)AuthorAgeFilesLines
* 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
* [Microsoft] If -fms-compatibility, then downgrade missing typename error to ↵Francois Pichet2011-10-111-3/+4
| | | | | | warning at function prototype scope. llvm-svn: 141630
* Add typo correction for type names.Kaelyn Uhrain2011-10-111-1/+47
| | | | | | | | The main motivation was to do typo correction in C++ "new" statements, though picking it up in other places where type names are expected was pretty much a freebie. llvm-svn: 141621
* Clean up DiagnoseInvalidRedeclaration a bitKaelyn Uhrain2011-10-111-26/+31
| | | | llvm-svn: 141612
* Move a couple chunks of ActOnFunctionDeclarator to separate functionsKaelyn Uhrain2011-10-111-186/+202
| | | | llvm-svn: 141611
* Move some bool flags out of function parameter lists.Kaelyn Uhrain2011-10-114-99/+104
| | | | llvm-svn: 141610
* Only accept a typo correction if it doesn't trigger additional errorsKaelyn Uhrain2011-10-111-30/+101
| | | | llvm-svn: 141609
* Don't crash in Sema::IsSimplyAccessible if the declaration is not a C++ ↵Douglas Gregor2011-10-101-1/+1
| | | | | | class member. Fixes PR11108. llvm-svn: 141600
* When performing a user-defined conversion via a constructor, be sureDouglas Gregor2011-10-101-6/+10
| | | | | | | to check whether the constructor is accessible. Fixes <rdar://problem/10202900>. llvm-svn: 141588
* Rework construction of CXXForRangeStmt not to recycle the same DeclRefExpr ↵Ted Kremenek2011-10-101-11/+33
| | | | | | | | | | in multiple subexpressions. This breaks the tree structure of the AST and completely breaks the CFG invariants. Patch by Jim Goodnow II and reviewed by Richard Smith! llvm-svn: 141586
* objc: err on a property designated both atomic andFariborz Jahanian2011-10-101-0/+7
| | | | | | nonatomic. // rdar://10260017 llvm-svn: 141580
* When substituting into a sizeof parameter pack expression in a contextDouglas Gregor2011-10-101-5/+19
| | | | | | | where we can't expand (i.e., multi-level substitution), be sure to substitute the pack with its level-reduced pack. Fixes PR10230. llvm-svn: 141568
* Constant expression evaluation refactoring:Richard Smith2011-10-107-45/+31
| | | | | | | | | | | - Remodel Expr::EvaluateAsInt to behave like the other EvaluateAs* functions, and add Expr::EvaluateKnownConstInt to capture the current fold-or-assert behaviour. - Factor out evaluation of bitfield bit widths. - Fix a few places which would evaluate an expression twice: once to determine whether it is a constant expression, then again to get the value. llvm-svn: 141561
* Don't suggest 'noreturn' for function template instantiations, becauseDouglas Gregor2011-10-101-1/+17
| | | | | | | it might be wrong for other instantiations of the same function template. Fixes PR10801. llvm-svn: 141559
* Give nicer note when a member redeclaration has or lacks 'const'Kaelyn Uhrain2011-10-101-1/+11
| | | | llvm-svn: 141555
* objc: Some refactoring of overriding method decl. codeFariborz Jahanian2011-10-101-14/+30
| | | | | | for future work. llvm-svn: 141553
* Don't analyze comparisons in type- or value-dependentDouglas Gregor2011-10-101-0/+3
| | | | | | subexpressions. Fixes PR10291. llvm-svn: 141552
* Per C++ [class.bit]p2, unnamed bit-fields are not members. Fixes PR10289.Douglas Gregor2011-10-102-5/+37
| | | | llvm-svn: 141549
* constexpr: Disable checking of constructor member initializer lists forRichard Smith2011-10-101-1/+2
| | | | | | | | | | constexpr constructor templates. Such checking is optional, and currently hard to get right since clang doesn't generate implicit member initializers until instantiation (even for non-dependent members). This is needed for clang to accept libstdc++ from g++4.6 in c++0x mode. llvm-svn: 141547
* Don't complain about qualified property or ivar access when theDouglas Gregor2011-10-101-2/+2
| | | | | | qualifier itself is invalid. Crasher noticed by Fariborz. llvm-svn: 141544
* When adding a direct initializer to a declaration, allow theDouglas Gregor2011-10-101-1/+7
| | | | | | | | initializer to update the type of the declaration. For example, this allows us to determine the size of an incomplete array from its initializer. Fixes PR10288. llvm-svn: 141543
* Parse the initializer for a class member after handling itsDouglas Gregor2011-10-101-11/+1
| | | | | | | declarator, so that the declarator is in scope for the initializer. Fixes PR9989. llvm-svn: 141539
* Always add the built-in overload candidates for operators &&, ||, andDouglas Gregor2011-10-101-1/+5
| | | | | | !. Fixes PR9865. llvm-svn: 141537
* Begin work consolidating ShouldDelete* functions.Alexis Hunt2011-10-101-89/+131
| | | | | | | | | | | Begin with just default constructors. One note is that as a side effect of this, a conformance test was removed on the basis that this is almost certainly a defect as with most of union initialization. As it is, clang does not implement union initialization close to the standard as it's quite broken as written. I hope to write a paper addressing the issues eventually. llvm-svn: 141528
* Implement the restrictions in C++ [class.friend]p6, which disallowDouglas Gregor2011-10-101-2/+33
| | | | | | | defining a friend function with a qualified name or in a local class. Fixes PR9853. llvm-svn: 141524
OpenPOWER on IntegriCloud