dmajor added a comment.

Before the revert, our bots hit the following issue where we only error out 
when `-Wall` is given, so there's definitely something strange going on. Also 
happens with @Quuxplusone's suggested change applied.

  $ cat test.cpp
  template < class > class RefPtr {
  public:
    ~RefPtr();
    template < typename d > RefPtr(d);
    operator int() &;
    operator int() && = delete;
  };
  class X;
  bool e() {
    RefPtr< X > frame(0);
    return frame;
  }
  
  $ clang -cc1 -std=c++17 test.cpp
  $ clang -cc1 -std=c++17 test.cpp -Wall
  test.cpp:11:10: error: conversion function from 'RefPtr<X>' to 'bool' invokes 
a deleted function
    return frame;
           ^~~~~
  test.cpp:6:3: note: 'operator int' has been explicitly marked deleted here
    operator int() && = delete;
    ^
  1 error generated.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D92936/new/

https://reviews.llvm.org/D92936

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to