r300762 - Fix assertion failure in codegen on non-template deduction guide.

Galina Kistanova via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 19 17:12:49 PDT 2017


Hello Richard,

This commit broke one of our builders:

Failing Tests (1):
    Clang :: CodeGenCXX/cxx1z-class-deduction.cpp

http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/1267

Please have a look at this?

Thanks

Galina



On Wed, Apr 19, 2017 at 2:15 PM, Richard Smith via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: rsmith
> Date: Wed Apr 19 16:15:45 2017
> New Revision: 300762
>
> URL: http://llvm.org/viewvc/llvm-project?rev=300762&view=rev
> Log:
> Fix assertion failure in codegen on non-template deduction guide.
>
> Added:
>     cfe/trunk/test/CodeGenCXX/cxx1z-class-deduction.cpp
> Modified:
>     cfe/trunk/lib/CodeGen/CodeGenModule.cpp
>
> Modified: cfe/trunk/lib/CodeGen/CodeGenModule.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/
> CodeGenModule.cpp?rev=300762&r1=300761&r2=300762&view=diff
> ============================================================
> ==================
> --- cfe/trunk/lib/CodeGen/CodeGenModule.cpp (original)
> +++ cfe/trunk/lib/CodeGen/CodeGenModule.cpp Wed Apr 19 16:15:45 2017
> @@ -3794,6 +3794,10 @@ void CodeGenModule::EmitTopLevelDecl(Dec
>      AddDeferredUnusedCoverageMapping(D);
>      break;
>
> +  case Decl::CXXDeductionGuide:
> +    // Function-like, but does not result in code emission.
> +    break;
> +
>    case Decl::Var:
>    case Decl::Decomposition:
>      // Skip variable templates
>
> Added: cfe/trunk/test/CodeGenCXX/cxx1z-class-deduction.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/
> CodeGenCXX/cxx1z-class-deduction.cpp?rev=300762&view=auto
> ============================================================
> ==================
> --- cfe/trunk/test/CodeGenCXX/cxx1z-class-deduction.cpp (added)
> +++ cfe/trunk/test/CodeGenCXX/cxx1z-class-deduction.cpp Wed Apr 19
> 16:15:45 2017
> @@ -0,0 +1,21 @@
> +// RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - | FileCheck %s
> +
> +template<typename T> struct A {
> +  A(T = 0);
> +  A(void*);
> +};
> +
> +template<typename T> A(T*) -> A<long>;
> +A() -> A<int>;
> +
> +// CHECK-LABEL: @_Z1fPi(
> +void f(int *p) {
> +  // CHECK: @_ZN1AIiEC
> +  A a{};
> +
> +  // CHECK: @_ZN1AIlEC
> +  A b = p;
> +
> +  // CHECK: @_ZN1AIxEC
> +  A c = 123LL;
> +}
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170419/0b52d9c0/attachment.html>


More information about the cfe-commits mailing list