Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: m-labs/clang-lm32
base: 683fe06
...
head fork: m-labs/clang-lm32
compare: 4d9550d
Checking mergeability… Don't worry, you can still create the pull request.
  • 5 commits
  • 7 files changed
  • 0 commit comments
  • 3 contributors
Commits on Jun 24, 2011
@akyrtzi akyrtzi [arcmt] Add test for rdar://9601437.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133807 91177308-0d34-0410-b5e6-96231b3b80d8
cf79eba
@akyrtzi akyrtzi Only do delayed diagnostics if there were no errors when parsing the …
…decl.

Fixes crash in http://llvm.org/PR10109 & rdar://9584039.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133816 91177308-0d34-0410-b5e6-96231b3b80d8
a7bf7bb
Fariborz Jahanian objc-arc: Give more descriptive diagnostics when
making unsafe assignment of a retainable 
object, Per John's request.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133817 91177308-0d34-0410-b5e6-96231b3b80d8
f2050f2
Fariborz Jahanian No need to warn if 'unavailable' method/property
is not implemented. // rdar://9651605


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133819 91177308-0d34-0410-b5e6-96231b3b80d8
327126e
@jpbonn jpbonn Merge branch 'master' of http://llvm.org/git/clang 4d9550d
View
6 include/clang/Basic/DiagnosticSemaKinds.td
@@ -2601,10 +2601,12 @@ def warn_arc_non_pod_class_with_object_member : Warning<
"to make it ABI-compatible">, InGroup<AutomaticReferenceCountingABI>,
DefaultIgnore;
def warn_arc_retained_assign : Warning<
- "assigning retained object to %select{weak|unsafe_unretained}0 variable">,
+ "assigning retained object to %select{weak|unsafe_unretained}0 variable"
+ "; object will be released after assignment">,
InGroup<ARCUnsafeRetainedAssign>;
def warn_arc_retained_property_assign : Warning<
- "assigning retained object to unsafe property">,
+ "assigning retained object to unsafe property"
+ "; object will be released after assignment">,
InGroup<ARCUnsafeRetainedAssign>;
def warn_arc_trivial_member_function_with_object_member : Warning<
"%0 cannot be shared between ARC and non-ARC "
View
2  lib/Sema/SemaDeclAttr.cpp
@@ -3258,7 +3258,7 @@ void Sema::DelayedDiagnostics::popParsingDecl(Sema &S, ParsingDeclState state,
// We only want to actually emit delayed diagnostics when we
// successfully parsed a decl.
- if (decl) {
+ if (decl && !decl->isInvalidDecl()) {
// We emit all the active diagnostics, not just those starting
// from the saved state. The idea is this: we get one push for a
// decl spec and another for each declarator; in a decl group like:
View
3  lib/Sema/SemaDeclObjC.cpp
@@ -1076,6 +1076,9 @@ void Sema::CheckImplementationIvars(ObjCImplementationDecl *ImpDecl,
void Sema::WarnUndefinedMethod(SourceLocation ImpLoc, ObjCMethodDecl *method,
bool &IncompleteImpl, unsigned DiagID) {
+ // No point warning no definition of method which is 'unavailable'.
+ if (method->hasAttr<UnavailableAttr>())
+ return;
if (!IncompleteImpl) {
Diag(ImpLoc, diag::warn_incomplete_impl);
IncompleteImpl = true;
View
2  lib/Sema/SemaObjCProperty.cpp
@@ -1273,7 +1273,7 @@ void Sema::DiagnoseUnimplementedProperties(Scope *S, ObjCImplDecl* IMPDecl,
// Is there a matching propery synthesize/dynamic?
if (Prop->isInvalidDecl() ||
Prop->getPropertyImplementation() == ObjCPropertyDecl::Optional ||
- PropImplMap.count(Prop))
+ PropImplMap.count(Prop) || Prop->hasAttr<UnavailableAttr>())
continue;
if (!InsMap.count(Prop->getGetterName())) {
Diag(Prop->getLocation(),
View
13 test/ARCMT/checking.m
@@ -265,3 +265,16 @@ - (void)viewDidLoad {
value = [NSObject new]; // expected-error {{assigning retained object}}
}
@end
+
+// rdar://9601437
+@interface I9601437 {
+ __unsafe_unretained id x;
+}
+-(void)Meth;
+@end
+
+@implementation I9601437
+-(void)Meth {
+ self->x = [NSObject new]; // expected-error {{assigning retained object}}
+}
+@end
View
19 test/SemaCXX/nested-name-spec.cpp
@@ -266,3 +266,22 @@ namespace rdar7980179 {
namespace alias = A;
double *dp = (alias::C*)0; // expected-error{{cannot initialize a variable of type 'double *' with an rvalue of type 'alias::C *'}}
+
+// http://llvm.org/PR10109
+namespace PR10109 {
+template<typename T>
+struct A {
+protected:
+ struct B;
+ struct B::C; // expected-error {{requires a template parameter list}} \
+ // expected-error {{no struct named 'C'}}
+};
+
+template<typename T>
+struct A2 {
+protected:
+ struct B;
+};
+template <typename T>
+struct A2<T>::B::C; // expected-error {{no struct named 'C'}}
+}
View
12 test/SemaObjC/no-warning-unavail-unimp.m
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// rdar://9651605
+
+@interface Foo
+@property (getter=getVal) int val __attribute__((unavailable));
+- Method __attribute__((unavailable));
++ CMethod __attribute__((unavailable));
+@end
+
+@implementation Foo
+@end
+

No commit comments for this range

Something went wrong with that request. Please try again.