| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
-Wdirect-ivar-access.
llvm-svn: 161500
|
|
|
|
|
|
|
| |
memory models, except when arc is accessing a weak
ivar (which is an error). // rdar://6505197
llvm-svn: 161458
|
|
|
|
|
|
|
| |
Allow direct ivar access in init and dealloc methods
in mrr. // rdar://650197
llvm-svn: 161426
|
|
|
|
|
|
| |
// rdar://6505197
llvm-svn: 161362
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also, fix a subtle bug, which occurred due to lookupPrivateMethod
defined in DeclObjC.h not looking up the method inside parent's
categories.
Note, the code assumes that Class's parent object has the same methods
as what's in the Root class of a the hierarchy, which is a heuristic
that might not hold for hierarchies which do not descend from NSObject.
Would be great to fix this in the future.
llvm-svn: 160885
|
|
|
|
|
|
|
|
| |
`isa`,
then it should get the same warnings that id->isa gets. // rdar://11702488
llvm-svn: 158938
|
|
|
|
|
|
|
|
|
| |
* Removed \param comments for parameters that no longer exist;
* Fixed a "\para" typo to "\param";
* Escaped @, # and \ symbols as needed in Doxygen comments;
* Added use of \brief to output short summaries.
llvm-svn: 158498
|
|
|
|
|
|
|
| |
unused private fields of classes that are fully defined in the current
translation unit.
llvm-svn: 158054
|
|
|
|
|
|
| |
unevaluated field in C++11 mode. This fixes PR12866.
llvm-svn: 157784
|
|
|
|
|
|
|
|
|
|
|
| |
off PartialDiagnostic. PartialDiagnostic is rather heavyweight for
something that is in the critical path and is rarely used. So, switch
over to an abstract-class-based callback mechanism that delays most of
the work until a diagnostic is actually produced. Good for ~11k code
size reduction in the compiler and 1% speedup in -fsyntax-only on the
code in <rdar://problem/11004361>.
llvm-svn: 156176
|
|
|
|
| |
llvm-svn: 155871
|
|
|
|
| |
llvm-svn: 155870
|
|
|
|
|
|
|
|
|
| |
This is mainly for attempting to recover in cases where a class provides
a custom operator-> and a '.' was accidentally used instead of '->' when
accessing a member of the object returned by the current object's
operator->.
llvm-svn: 155580
|
|
|
|
| |
llvm-svn: 155274
|
|
|
|
|
|
|
|
|
|
|
| |
Set the source location for the "member reference base type ... is not a
structure or union" diag to point at the operator rather than the member name.
If we're giving this diagnostic because of a typo'd '.' in place of a ';' at
the end of a line, the caret previously pointed at the identifier on the
following line, which isn't as helpful as it could be. Pointing the caret at
the '.' makes it more obvious what the problem is.
llvm-svn: 155267
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the declaration of a non-static member function after the
(optional) cv-qualifier-seq, which in practice means in the exception
specification and late-specified return type.
The new scheme here used to manage 'this' outside of a member function
scope is more general than the Scope-based mechanism previously used
for non-static data member initializers and late-parsesd attributes,
because it can also handle the cv-qualifiers on the member
function. Note, however, that a separate pass is required for static
member functions to determine whether 'this' was used, because we
might not know that we have a static function until after declaration
matching.
Finally, this introduces name mangling for 'this' and for the implicit
'this', which is intended to match GCC's mangling. Independent
verification for the new mangling test case would be appreciated.
Fixes PR10036 and PR12450.
llvm-svn: 154799
|
|
|
|
|
|
|
|
|
|
|
|
| |
* s/nonstatic/non-static/ in the diagnostics, since the latter form outvoted
the former by 28-2 in our diagnostics.
* Fix the "use of member in static member function" diagnostic to correctly
detect this situation inside a block or lambda.
* Produce a more specific "invalid use of non-static member" diagnostic for
the case where a nested class member refers to a member of a
lexically-surrounding class.
llvm-svn: 154073
|
|
|
|
|
|
| |
when I do the specific crash is hidden. Fixes <rdar://problem/11063594>.
llvm-svn: 152968
|
|
|
|
|
|
|
|
|
|
| |
(Lex to AST).
The member variable is always "LangOpts" and the member function is always "getLangOpts".
Reviewed by Chris Lattner
llvm-svn: 152536
|
|
|
|
|
|
| |
when debugging. // rdar://10997647
llvm-svn: 152187
|
|
|
|
|
|
|
| |
in cases where we would otherwise disallow the access, and add a -Wc++98-compat
diagnostic for this C++11 feature.
llvm-svn: 151444
|
|
|
|
|
|
| |
unevaluated operands applies within member functions, too.
llvm-svn: 151443
|
|
|
|
|
|
|
| |
when a class is forward declared, and the reference to the data
member in question does not occur within a method body.
llvm-svn: 151413
|
|
|
|
| |
llvm-svn: 149868
|
|
|
|
|
|
| |
additional entry points are needed to implement C++11 odr-use marking correctly. No functional change in this patch; I'll actually make the change which fixes the odr-use marking in a followup patch.
llvm-svn: 149586
|
|
|
|
| |
llvm-svn: 149451
|
|
|
|
| |
llvm-svn: 149127
|
|
|
|
|
|
| |
and less error-prone way of handling the relevant cases. Towards marking of whether a declaration is used more accurately.
llvm-svn: 148522
|
|
|
|
|
|
|
| |
in favor of usage of api's intended for.
// rdar://8290002
llvm-svn: 148404
|
|
|
|
|
|
| |
referencing a class field from outside an instance method.
llvm-svn: 148376
|
|
|
|
|
|
| |
appropriate or when GCC requires it)
llvm-svn: 148292
|
|
|
|
|
|
|
|
|
| |
improving the typo correction results in certain situations.
This is also the first typo correction callback conversion to affect
an existing unit test. :)
llvm-svn: 148140
|
|
|
|
|
|
| |
function. In particular, this restores the cool error recovery for the example from http://blog.llvm.org/2010/04/amazing-feats-of-clang-error-recovery.html , which regressed a few months back.
llvm-svn: 148089
|
|
|
|
|
|
| |
complicated, but we have to be careful about when exactly captures are marked given PotentiallyPotentiallyEvaluated contexts. (Actually, it's not 100% correct yet, but it's close enough for the moment.)
llvm-svn: 147723
|
|
|
|
|
|
|
| |
is known (to Clang), but is not visible because the module has not yet
been imported.
llvm-svn: 147436
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split out a new ExpressionEvaluationContext flag for this case, and don't treat
it as unevaluated in C++11. This fixes some crash-on-invalids where we would
allow references to class members in potentially-evaluated constant expressions
in static member functions, and also fixes half of PR10177.
The fix to PR10177 exposed a case where template instantiation failed to provide
a source location for a diagnostic, so TreeTransform has been tweaked to supply
source locations when transforming a type. The source location is still not very
good, but MarkDeclarationsReferencedInType would need to operate on a TypeLoc to
improve it further.
Also fix MarkDeclarationReferenced in C++98 mode to trigger instantiation for
static data members of class templates which are used in constant expressions.
This fixes a link-time problem, but we still incorrectly treat the member as
non-constant. The rest of the fix for that issue is blocked on PCH support for
early-instantiated static data members, which will be added in a subsequent
patch.
llvm-svn: 146955
|
|
|
|
|
|
|
|
| |
to declaresSameEntity(), as a baby step toward tracking forward
declarations of Objective-C classes precisely. Part of
<rdar://problem/10583531>.
llvm-svn: 146618
|
|
|
|
|
|
|
|
|
| |
rvalue. An assertion to catch this is in ImpCastExprToType will follow, but
vector operations currently trip over this (due to omitting the usual arithmetic
conversions). Also add an assert to catch missing lvalue-to-rvalue conversions
on the LHS of ->.
llvm-svn: 143155
|
|
|
|
|
|
|
| |
implicitly in LookupMemberExpr and explicitly in cases where template
instantiation doesn't redo the lookup.
llvm-svn: 143046
|
|
|
|
|
|
| |
GCC compiler workaround.
llvm-svn: 142931
|
|
|
|
|
|
| |
r142914: "Introduce a placeholder type for "pseudo object""
r142915: "Pull the pseudo-object stuff into its own file."
llvm-svn: 142921
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
expressions: expressions which refer to a logical rather
than a physical l-value, where the logical object is
actually accessed via custom getter/setter code.
A subsequent patch will generalize the AST for these
so that arbitrary "implementing" sub-expressions can
be provided.
Right now the only client is ObjC properties, but
this should be generalizable to similar language
features, e.g. Managed C++'s __property methods.
llvm-svn: 142914
|
|
|
|
|
|
| |
it. Refactoring to be used in a moment.
llvm-svn: 142360
|
|
|
|
|
|
| |
Fix is in Sema. // rdar://10153365
llvm-svn: 142249
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
qualifier itself is invalid. Crasher noticed by Fariborz.
llvm-svn: 141544
|
|
|
|
|
|
| |
property in an Objective-C++ member access expression. Fixes PR9759.
llvm-svn: 141522
|
|
|
|
|
|
| |
It already works (and is useful with) macro locs as well.
llvm-svn: 140057
|
|
|
|
|
|
|
|
| |
that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag.
Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag.
llvm-svn: 139987
|
|
|
|
|
|
|
|
|
| |
ASTContext with accessors/mutators. The only functional change is that
the AST writer won't bother writing the id/Class/SEL redefinition type
if it hasn't been explicitly set; previously, it ended up being
written as a synonym for the built-in id/Class/SEL.
llvm-svn: 137349
|