Re: r290080 - [c++1z] P0195R2: Support pack-expansion of using-declarations.
On 19 December 2016 at 04:26, Renato Golinwrote: > On 19 December 2016 at 11:28, Daniel Jasper via cfe-commits > wrote: > > I have reverted this in r290092 as it was leading to Clang crashes on the > > bots and elsewhere, e.g.: > > http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/1814 > > Hi Daniel, Richard, > > This is will red on our LNT bot, which started with this commit: > > http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/1354 > > and still has the same failures on the last build: > > http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/1360 > > this is one of the 5 different failures we have in all our bots... > After so many fix-patches and reverts, I'm not surprised we got into > this corner of mayhem. > > I'd like to ask people a bit more care and worry about the bots. > Sorry about that. There was an unrelated change causing bot failures at the same time, and having checked some of the buildbot failures I incorrectly assumed they were all caused by that other failure. Should be fixed in r290203, but I'll see whether the bots agree :) Most of the time, reverting the whole patch and talking to the bot > owners is a much better strategy than push-fix a bunch of trail and > errors. > > cheers, > --renato > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r290080 - [c++1z] P0195R2: Support pack-expansion of using-declarations.
On 19 December 2016 at 12:39, Daniel Jasperwrote: > Oh, I completely understand, I am doing the same here :) Btw, this also happened: http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-selfhost/builds/582 It seems Clang lost the ability to find the libstdc++: CMake Error at cmake/modules/CheckCompilerVersion.cmake:38 (message): Host Clang must be able to find libstdc++4.8 or newer! Your revert did fix the issue: http://lab.llvm.org:8011/builders/clang-cmake-armv7-a15-selfhost/builds/587 So when this comes back, it needs to also fix this problem. cheers, --renato ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r290080 - [c++1z] P0195R2: Support pack-expansion of using-declarations.
Oh, I completely understand, I am doing the same here :) On Mon, Dec 19, 2016 at 1:38 PM, Renato Golinwrote: > On 19 December 2016 at 12:27, Daniel Jasper wrote: > > I don't understand. This *is* a revert of the whole patch. > > My bad, your revert hadn't gone through: > > http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/1361 > > Now it's green. > > Sorry, we're dealing with 4 different cluster-plucks today. > > I hate Mondays. > > --renato > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r290080 - [c++1z] P0195R2: Support pack-expansion of using-declarations.
On 19 December 2016 at 12:27, Daniel Jasperwrote: > I don't understand. This *is* a revert of the whole patch. My bad, your revert hadn't gone through: http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/1361 Now it's green. Sorry, we're dealing with 4 different cluster-plucks today. I hate Mondays. --renato ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r290080 - [c++1z] P0195R2: Support pack-expansion of using-declarations.
I don't understand. This *is* a revert of the whole patch. On Mon, Dec 19, 2016 at 1:26 PM, Renato Golinwrote: > On 19 December 2016 at 11:28, Daniel Jasper via cfe-commits > wrote: > > I have reverted this in r290092 as it was leading to Clang crashes on the > > bots and elsewhere, e.g.: > > http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/1814 > > Hi Daniel, Richard, > > This is will red on our LNT bot, which started with this commit: > > http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/1354 > > and still has the same failures on the last build: > > http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/1360 > > this is one of the 5 different failures we have in all our bots... > After so many fix-patches and reverts, I'm not surprised we got into > this corner of mayhem. > > I'd like to ask people a bit more care and worry about the bots. > > Most of the time, reverting the whole patch and talking to the bot > owners is a much better strategy than push-fix a bunch of trail and > errors. > > cheers, > --renato > ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Re: r290080 - [c++1z] P0195R2: Support pack-expansion of using-declarations.
On 19 December 2016 at 11:28, Daniel Jasper via cfe-commitswrote: > I have reverted this in r290092 as it was leading to Clang crashes on the > bots and elsewhere, e.g.: > http://lab.llvm.org:8011/builders/clang-cmake-aarch64-quick/builds/1814 Hi Daniel, Richard, This is will red on our LNT bot, which started with this commit: http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/1354 and still has the same failures on the last build: http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/1360 this is one of the 5 different failures we have in all our bots... After so many fix-patches and reverts, I'm not surprised we got into this corner of mayhem. I'd like to ask people a bit more care and worry about the bots. Most of the time, reverting the whole patch and talking to the bot owners is a much better strategy than push-fix a bunch of trail and errors. cheers, --renato ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
r290080 - [c++1z] P0195R2: Support pack-expansion of using-declarations.
Author: rsmith Date: Sun Dec 18 22:08:53 2016 New Revision: 290080 URL: http://llvm.org/viewvc/llvm-project?rev=290080=rev Log: [c++1z] P0195R2: Support pack-expansion of using-declarations. This change introduces UsingPackDecl as a marker for the set of UsingDecls produced by pack expansion of a single (unresolved) using declaration. This is not strictly necessary (we just need to be able to map from the original using declaration to its expansions somehow), but it's useful to maintain the invariant that each declaration reference instantiates to refer to one declaration. Added: cfe/trunk/test/PCH/cxx1z-using-declaration.cpp cfe/trunk/test/SemaTemplate/cxx1z-using-declaration.cpp Modified: cfe/trunk/include/clang/AST/DeclCXX.h cfe/trunk/include/clang/AST/RecursiveASTVisitor.h cfe/trunk/include/clang/Basic/DeclNodes.td cfe/trunk/include/clang/Basic/DiagnosticParseKinds.td cfe/trunk/include/clang/Basic/DiagnosticSemaKinds.td cfe/trunk/include/clang/Parse/Parser.h cfe/trunk/include/clang/Sema/Sema.h cfe/trunk/include/clang/Sema/Template.h cfe/trunk/include/clang/Serialization/ASTBitCodes.h cfe/trunk/lib/AST/DeclBase.cpp cfe/trunk/lib/AST/DeclCXX.cpp cfe/trunk/lib/CodeGen/CGDecl.cpp cfe/trunk/lib/Parse/ParseDeclCXX.cpp cfe/trunk/lib/Sema/SemaDeclCXX.cpp cfe/trunk/lib/Sema/SemaExprCXX.cpp cfe/trunk/lib/Sema/SemaOverload.cpp cfe/trunk/lib/Sema/SemaTemplateInstantiateDecl.cpp cfe/trunk/lib/Sema/SemaTemplateVariadic.cpp cfe/trunk/lib/Sema/TreeTransform.h cfe/trunk/lib/Serialization/ASTCommon.cpp cfe/trunk/lib/Serialization/ASTReaderDecl.cpp cfe/trunk/lib/Serialization/ASTWriterDecl.cpp cfe/trunk/test/Parser/cxx1z-using-declaration.cpp cfe/trunk/tools/libclang/CIndex.cpp Modified: cfe/trunk/include/clang/AST/DeclCXX.h URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclCXX.h?rev=290080=290079=290080=diff == --- cfe/trunk/include/clang/AST/DeclCXX.h (original) +++ cfe/trunk/include/clang/AST/DeclCXX.h Sun Dec 18 22:08:53 2016 @@ -3140,6 +3140,77 @@ public: friend class ASTDeclWriter; }; +/// Represents a pack of using declarations that a single +/// using-declarator pack-expanded into. +/// +/// \code +/// template struct X : T... { +/// using T::operator()...; +/// using T::operator T...; +/// }; +/// \endcode +/// +/// In the second case above, the UsingPackDecl will have the name +/// 'operator T' (which contains an unexpanded pack), but the individual +/// UsingDecls and UsingShadowDecls will have more reasonable names. +class UsingPackDecl final +: public NamedDecl, public Mergeable, + private llvm::TrailingObjects{ + void anchor() override; + + /// The UnresolvedUsingValueDecl or UnresolvedUsingTypenameDecl from + /// which this waas instantiated. + NamedDecl *InstantiatedFrom; + + /// The number of using-declarations created by this pack expansion. + unsigned NumExpansions; + + UsingPackDecl(DeclContext *DC, NamedDecl *InstantiatedFrom, +ArrayRef UsingDecls) + : NamedDecl(UsingPack, DC, + InstantiatedFrom ? InstantiatedFrom->getLocation() + : SourceLocation(), + InstantiatedFrom ? InstantiatedFrom->getDeclName() + : DeclarationName()), +InstantiatedFrom(InstantiatedFrom), NumExpansions(UsingDecls.size()) { +std::uninitialized_copy(UsingDecls.begin(), UsingDecls.end(), +getTrailingObjects()); + } + +public: + /// Get the using declaration from which this was instantiated. This will + /// always be an UnresolvedUsingValueDecl or an UnresolvedUsingTypenameDecl + /// that is a pack expansion. + NamedDecl *getInstantiatedFromUsingDecl() { return InstantiatedFrom; } + + /// Get the set of using declarations that this pack expanded into. Note that + /// some of these may still be unresolved. + ArrayRef expansions() const { +return llvm::makeArrayRef(getTrailingObjects(), NumExpansions); + } + + static UsingPackDecl *Create(ASTContext , DeclContext *DC, + NamedDecl *InstantiatedFrom, + ArrayRef UsingDecls); + + static UsingPackDecl *CreateDeserialized(ASTContext , unsigned ID, + unsigned NumExpansions); + + SourceRange getSourceRange() const override LLVM_READONLY { +return InstantiatedFrom->getSourceRange(); + } + + UsingPackDecl *getCanonicalDecl() override { return getFirstDecl(); } + const UsingPackDecl *getCanonicalDecl() const { return getFirstDecl(); } + + static bool classof(const Decl *D) { return classofKind(D->getKind()); } + static bool classofKind(Kind K) { return K == UsingPack; } + + friend class ASTDeclReader; + friend class ASTDeclWriter; + friend