diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/Decl.cpp | 1 | ||||
-rw-r--r-- | lib/Basic/Targets.cpp | 2 | ||||
-rw-r--r-- | lib/Frontend/PCHReaderDecl.cpp | 1 | ||||
-rw-r--r-- | lib/Frontend/PCHWriterDecl.cpp | 1 | ||||
-rw-r--r-- | lib/Parse/AttributeList.cpp | 1 | ||||
-rw-r--r-- | lib/Sema/SemaDeclAttr.cpp | 22 | ||||
-rw-r--r-- | lib/Sema/SemaLookup.cpp | 4 |
7 files changed, 4 insertions, 28 deletions
diff --git a/lib/AST/Decl.cpp b/lib/AST/Decl.cpp index 09bdc15280..ffdcb471d0 100644 --- a/lib/AST/Decl.cpp +++ b/lib/AST/Decl.cpp @@ -1596,7 +1596,6 @@ RecordDecl::RecordDecl(Kind DK, TagKind TK, DeclContext *DC, SourceLocation L, HasFlexibleArrayMember = false; AnonymousStructOrUnion = false; HasObjectMember = false; - InvisibleToADL = false; assert(classof(static_cast<Decl*>(this)) && "Invalid Kind!"); } diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp index 871bac9743..92fd417173 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -1272,7 +1272,7 @@ public: " unsigned fp_offset;" " void* overflow_arg_area;" " void* reg_save_area;" - "} __attribute__((adl_invisible)) __va_list_tag;" + "} __va_list_tag;" "typedef __va_list_tag __builtin_va_list[1];"; } diff --git a/lib/Frontend/PCHReaderDecl.cpp b/lib/Frontend/PCHReaderDecl.cpp index 8af146d676..1ef0441ebf 100644 --- a/lib/Frontend/PCHReaderDecl.cpp +++ b/lib/Frontend/PCHReaderDecl.cpp @@ -171,7 +171,6 @@ void PCHDeclReader::VisitRecordDecl(RecordDecl *RD) { RD->setHasFlexibleArrayMember(Record[Idx++]); RD->setAnonymousStructOrUnion(Record[Idx++]); RD->setHasObjectMember(Record[Idx++]); - RD->setInvisibleToADL(Record[Idx++]); } void PCHDeclReader::VisitValueDecl(ValueDecl *VD) { diff --git a/lib/Frontend/PCHWriterDecl.cpp b/lib/Frontend/PCHWriterDecl.cpp index 0ce7d8fcae..cc58e8ee46 100644 --- a/lib/Frontend/PCHWriterDecl.cpp +++ b/lib/Frontend/PCHWriterDecl.cpp @@ -169,7 +169,6 @@ void PCHDeclWriter::VisitRecordDecl(RecordDecl *D) { Record.push_back(D->hasFlexibleArrayMember()); Record.push_back(D->isAnonymousStructOrUnion()); Record.push_back(D->hasObjectMember()); - Record.push_back(D->isInvisibleToADL()); Code = pch::DECL_RECORD; } diff --git a/lib/Parse/AttributeList.cpp b/lib/Parse/AttributeList.cpp index 333a09cac7..1ebff22e44 100644 --- a/lib/Parse/AttributeList.cpp +++ b/lib/Parse/AttributeList.cpp @@ -120,7 +120,6 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name) { .Case("cf_returns_retained", AT_cf_returns_retained) .Case("reqd_work_group_size", AT_reqd_wg_size) .Case("no_instrument_function", AT_no_instrument_function) - .Case("adl_invisible", AT_adl_invisible) .Case("thiscall", AT_thiscall) .Case("__cdecl", AT_cdecl) .Case("__stdcall", AT_stdcall) diff --git a/lib/Sema/SemaDeclAttr.cpp b/lib/Sema/SemaDeclAttr.cpp index 90d5308168..c6dcc3b97b 100644 --- a/lib/Sema/SemaDeclAttr.cpp +++ b/lib/Sema/SemaDeclAttr.cpp @@ -703,7 +703,7 @@ static void HandleObjCExceptionAttr(Decl *D, const AttributeList &Attr, static void HandleObjCNSObject(Decl *D, const AttributeList &Attr, Sema &S) { if (Attr.getNumArgs() != 0) { - S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 0; + S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 1; return; } if (TypedefDecl *TD = dyn_cast<TypedefDecl>(D)) { @@ -720,7 +720,7 @@ static void HandleObjCNSObject(Decl *D, const AttributeList &Attr, Sema &S) { static void HandleOverloadableAttr(Decl *D, const AttributeList &Attr, Sema &S) { if (Attr.getNumArgs() != 0) { - S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 0; + S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 1; return; } @@ -732,21 +732,6 @@ HandleOverloadableAttr(Decl *D, const AttributeList &Attr, Sema &S) { D->addAttr(::new (S.Context) OverloadableAttr()); } -static void HandleADLInvisibleAttr(Decl *d, const AttributeList &Attr, Sema &S) { - if (Attr.getNumArgs() != 0) { - S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 0; - return; - } - - if (!isa<RecordDecl>(d)) { - S.Diag(Attr.getLoc(), diag::err_attribute_wrong_decl_type) - << "adl_invisible" << 12; - return; - } - - cast<RecordDecl>(d)->setInvisibleToADL(); -} - static void HandleBlocksAttr(Decl *d, const AttributeList &Attr, Sema &S) { if (!Attr.getParameterName()) { S.Diag(Attr.getLoc(), diag::err_attribute_argument_n_not_string) @@ -956,7 +941,7 @@ static void HandleReqdWorkGroupSize(Decl *D, const AttributeList &Attr, Sema &S) { // Attribute has 3 arguments. if (Attr.getNumArgs() != 3) { - S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 3; + S.Diag(Attr.getLoc(), diag::err_attribute_wrong_number_arguments) << 1; return; } @@ -1984,7 +1969,6 @@ static void ProcessDeclAttribute(Scope *scope, Decl *D, HandleObjCExceptionAttr(D, Attr, S); break; case AttributeList::AT_overloadable:HandleOverloadableAttr(D, Attr, S); break; - case AttributeList::AT_adl_invisible: HandleADLInvisibleAttr(D, Attr, S); break; case AttributeList::AT_nsobject: HandleObjCNSObject (D, Attr, S); break; case AttributeList::AT_blocks: HandleBlocksAttr (D, Attr, S); break; case AttributeList::AT_sentinel: HandleSentinelAttr (D, Attr, S); break; diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index 8710c496de..16d7305867 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -1500,10 +1500,6 @@ addAssociatedClassesAndNamespaces(CXXRecordDecl *Class, ASTContext &Context, Sema::AssociatedNamespaceSet &AssociatedNamespaces, Sema::AssociatedClassSet &AssociatedClasses) { - - // Some classes are invisible to ADL. - if (Class->isInvisibleToADL()) return; - // C++ [basic.lookup.koenig]p2: // [...] // -- If T is a class type (including unions), its associated |