oontvoo updated this revision to Diff 275866. oontvoo added a comment. add test
Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D83263/new/ https://reviews.llvm.org/D83263 Files: clang/lib/Sema/SemaDeclCXX.cpp clang/test/SemaCXX/trivial-abi-templated-type.cpp Index: clang/test/SemaCXX/trivial-abi-templated-type.cpp =================================================================== --- /dev/null +++ clang/test/SemaCXX/trivial-abi-templated-type.cpp @@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 +// expected-no-diagnostics + +template <class> +class __attribute__((trivial_abi)) a { a(a &&); }; Index: clang/lib/Sema/SemaDeclCXX.cpp =================================================================== --- clang/lib/Sema/SemaDeclCXX.cpp +++ clang/lib/Sema/SemaDeclCXX.cpp @@ -6591,7 +6591,7 @@ } // See if trivial_abi has to be dropped. - if (Record->hasAttr<TrivialABIAttr>()) + if (!Record->isDependentType() && Record->hasAttr<TrivialABIAttr>()) checkIllFormedTrivialABIStruct(*Record); // Set HasTrivialSpecialMemberForCall if the record has attribute
Index: clang/test/SemaCXX/trivial-abi-templated-type.cpp =================================================================== --- /dev/null +++ clang/test/SemaCXX/trivial-abi-templated-type.cpp @@ -0,0 +1,5 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 +// expected-no-diagnostics + +template <class> +class __attribute__((trivial_abi)) a { a(a &&); }; Index: clang/lib/Sema/SemaDeclCXX.cpp =================================================================== --- clang/lib/Sema/SemaDeclCXX.cpp +++ clang/lib/Sema/SemaDeclCXX.cpp @@ -6591,7 +6591,7 @@ } // See if trivial_abi has to be dropped. - if (Record->hasAttr<TrivialABIAttr>()) + if (!Record->isDependentType() && Record->hasAttr<TrivialABIAttr>()) checkIllFormedTrivialABIStruct(*Record); // Set HasTrivialSpecialMemberForCall if the record has attribute
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits