| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
which has the label map, switch statement stack, etc. Previously, we
had a single set of maps in Sema (for the function) along with a stack
of block scopes. However, this lead to funky behavior with nested
functions, e.g., in the member functions of local classes.
The explicit-stack approach is far cleaner, and we retain a 1-element
cache so that we're not malloc/free'ing every time we enter a
function. Fixes PR6382.
Also, tweaked the unused-variable warning suppression logic to look at
errors within a given Scope rather than within a given function. The
prior code wasn't looking at the right number-of-errors count when
dealing with blocks, since the block's count would be deallocated
before we got to ActOnPopScope. This approach works with nested
blocks/functions, and gives tighter error recovery.
llvm-svn: 97518
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a fixme and PR6451.
Only perform jump checking if the containing function has no errors,
and add the infrastructure needed to do this.
On the testcase in the PR, we produce:
t.cc:6:3: error: illegal goto into protected scope
goto later;
^
t.cc:7:5: note: jump bypasses variable initialization
X x;
^
llvm-svn: 97497
|
|
|
|
| |
llvm-svn: 97002
|
|
|
|
|
|
|
|
| |
(with no names)
that refer to an undefined class.
llvm-svn: 96976
|
|
|
|
| |
llvm-svn: 96850
|
|
|
|
|
|
| |
blocks. WIP.
llvm-svn: 96696
|
|
|
|
|
|
| |
instead relies on their DeclContext for iteration, etc.
llvm-svn: 96638
|
|
|
|
| |
llvm-svn: 96484
|
|
|
|
|
|
| |
implementation (toward radar 7547942).
llvm-svn: 96479
|
|
|
|
|
|
|
|
| |
those declared in it. This is to allow duplicate
property diagnostics for properties declared in class extensions
multiple times (radar 7629420) and for future use.
llvm-svn: 96276
|
|
|
|
|
|
| |
BumpPtrAllocator. Previously they were not getting freed. Fixes <rdar://problem/7635663>.
llvm-svn: 95834
|
|
|
|
|
|
| |
(radar 7381956).
llvm-svn: 95695
|
|
|
|
|
|
|
|
|
| |
This is a non-fragile-abi feature only. Since it
breaks existing code, it is currently placed under
-fobjc-nonfragile-abi2 option for test purposes only
until further notice. WIP.
llvm-svn: 95685
|
|
|
|
|
|
| |
Fixes radar 7562952.
llvm-svn: 94087
|
|
|
|
|
|
|
|
| |
category implementation when some implementations
are missing in the primary class implementation.
(fixes radar 6505200).
llvm-svn: 94014
|
|
|
|
|
|
|
| |
property of a protocol (my previous patch). No change in functionality.
(radar 7544809).
llvm-svn: 94005
|
|
|
|
|
|
| |
properties imported frfom protocol. Fixes radar 7544809.
llvm-svn: 93965
|
|
|
|
|
|
|
| |
reflect what these methods are actually doing. One method
template for future work. No change in functionality.
llvm-svn: 93742
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
previously only had a single location (the @ in @interface); now we
know where the @ is (for the start of the declaration), where the
class name is (that's the normal "location" now for diagnostics), and
where the category name is. Also, eliminated the redundant "end"
location, since ObjCContainerDecl already has better @end information.
The only XFAIL'd test is temporary; will un-XFAIL-it once I've taught
CIndex how to use the new locations.
llvm-svn: 93639
|
|
|
|
|
|
|
|
| |
Objective-C classes, protocol definitions, forward protocol
declarations, and categories. This information isn't actually used
yet; that's coming next.
llvm-svn: 93636
|
|
|
|
|
|
|
|
|
|
|
| |
piece of the declaration. The '@' and the 'end' are separate tokens,
and require two SourceLocations to accurately track.
This change was motivated because ObjCContainerDecl::getSourceRange()
would previously not return the entire range of the declaration (the
'end' would be left off).
llvm-svn: 92891
|
|
|
|
|
|
|
| |
pointing to the declaration that we found that has that name (if it is
unique).
llvm-svn: 92877
|
|
|
|
|
|
|
|
|
|
| |
corresponding @interface, provide a note showing which interface we're
referring to. This note has the fix-it hint on it.
Also, don't automatically apply fix-it hints for notes. They're meant
to express fix-its that would change semantics.
llvm-svn: 92870
|
|
|
|
|
|
|
| |
continuation classes and its original declaration
is imported from a protocol. This fixes radar 7509234.
llvm-svn: 92856
|
|
|
|
|
|
| |
for a 'readonly' property. Fixes radar 7427072.
llvm-svn: 92808
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
interface, suggest correction of typos. For example, given:
@interface NSString
@end
@implementation NSstring
@end
we'll warn with:
t.m:4:19: warning: cannot find interface declaration for 'NSstring';
did you mean 'NSString'?
@implementation NSstring
^
However, since this is just a warning, we don't provide a fix-it
hint. Good idea, Ted!
llvm-svn: 92488
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
constructs:
- Instance variable lookup ("foo->ivar" and, in instance methods, "ivar")
- Property name lookup ("foo.prop")
- Superclasses
- Various places where a class name is required
- Protocol names (e.g., id<proto>)
This seems to cover many of the common places where typos could occur.
llvm-svn: 92449
|
|
|
|
|
|
| |
PR5809
llvm-svn: 91575
|
|
|
|
|
|
| |
instead of crashing for now.
llvm-svn: 91546
|
|
|
|
|
|
|
|
| |
declaration. Rename note_using_decl to note_using, which is possibly less confusing.
Add a test for non-class-scope using decl collisions and be sure to note the case
we can't diagnose yet.
llvm-svn: 91057
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
variables,
but the results are imperfect.
For posterity, I did:
cat <<EOF > $cmdfile
s/DeclaratorInfo/TypeSourceInfo/g
s/DInfo/TInfo/g
s/TypeTypeSourceInfo/TypeSourceInfo/g
s/SourceTypeSourceInfo/TypeSourceInfo/g
EOF
find lib -name '*.cpp' -not -path 'lib/Parse/*' -exec sed -i '' -f $cmdfile '{}' \;
find lib -name '*.h' -exec sed -i '' -f $cmdfile '{}' \;
find include -name '*.h' -not -path 'include/clang/Parse/*' -not -path 'include/clang/Basic/*' -exec sed -i '' -f $cmdfile '{}' \;
llvm-svn: 90743
|
|
|
|
|
|
|
|
| |
implementation mismatch in their qualifiers only.
This will match similar behavior in c/c++ and
fixes radar 7211653.
llvm-svn: 89220
|
|
|
|
|
|
| |
@class.
llvm-svn: 89170
|
|
|
|
|
|
| |
Action::ActOnForwardClassDeclaration().
llvm-svn: 89162
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
current DeclContext. These "imaginary" declarations pose issues for
clients searching DeclContext for actual declarations. Instead,
register them for name lookup, and add the ObjCInterfaceDecl later to
the DeclContext when we hit an actual @interface declaration.
This also fixes a bug where the invariant that the Decls in a
DeclContext are sorted in order of their appearance is no longer
violated. What could happen is that an @class causes an
ObjCInterfaceDecl to get added first to the DeclContext, then the
ObjCClassDecl itself is added, and then later the SourceLocation of
the ObjCInterfaceDecl is updated with the correct location (which is
later in the file). This breaks an assumed invariant in
ResolveLocation.cpp (and possibly other clients).
llvm-svn: 89160
|
|
|
|
|
|
| |
(Radar 6815425).
llvm-svn: 89124
|
|
|
|
|
|
|
|
| |
gracefully, on par with gcc, by: Issuing a warning,
doing final sematinc check of its definitions and generating
its meta-data.
llvm-svn: 88934
|
|
|
|
|
|
|
| |
either both synthesized or bith user defined.
Implements radar 6557233.
llvm-svn: 86887
|
|
|
|
|
|
| |
(Ted's feedback).
llvm-svn: 86702
|
|
|
|
|
|
|
|
|
|
| |
specification of 'assign' (no warning to be issued),
when a continuation class makes a 'readonly' attribute
'readwrite' but also specifies the 'assign' attribute.
(this matches gcc's behavior and prevents exessive
warnings)/
llvm-svn: 86297
|
|
|
|
|
|
|
|
|
|
|
|
| |
appears in a deprecated context. In the new strategy, we emit the warnings
as usual unless we're currently parsing a declaration, where "declaration" is
restricted to mean a decl group or a few special cases in Objective C. If
we *are* parsing a declaration, we queue up the deprecation warnings until
the declaration has been completely parsed, and then emit them only if the
decl is not deprecated.
We also standardize the bookkeeping for deprecation so as to avoid special cases.
llvm-svn: 85998
|
|
|
|
|
|
|
| |
class must match those of same property declared
in its primary class. (Fixes radar 7352425)
llvm-svn: 85843
|
|
|
|
|
|
|
| |
change a readonly property declared in the class (and its inherited protocols)
to writable property. (Fixes radar 7350645).
llvm-svn: 85836
|
|
|
|
|
|
| |
in its class implementation instead of crashing. Fixes radar 7350345.
llvm-svn: 85813
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
in the DeclaratorInfo, if one is present.
Preserve source information through template instantiation. This is made
more complicated by the possibility that ParmVarDecls don't have DIs, which
is possibly worth fixing in the future.
Also preserve source information for function parameters in ObjC method
declarations.
llvm-svn: 84971
|
|
|
|
|
|
|
|
|
| |
users to
pass a LookupResult reference to lookup routines. Call out uses which assume a single
result.
llvm-svn: 83674
|
|
|
|
|
|
|
|
|
| |
extension class's protocol list so its AST is complete.
2) Because of this no need to issue warning on unimplemeted
methods coming from the extended class protocols
because warning is issued when class definition is seen.
llvm-svn: 83326
|
|
|
|
|
|
| |
<rdar://problem/7269631> Protocols on class extensions don't work
llvm-svn: 83322
|
|
|
|
|
|
|
|
|
|
|
| |
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.
The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.
llvm-svn: 82501
|
|
|
|
|
|
| |
valid location.
llvm-svn: 81487
|