davrec added inline comments.

================
Comment at: clang/lib/AST/Expr.cpp:1949-1950
 
     if (E->getCastKind() == CK_ConstructorConversion)
       return cast<CXXConstructExpr>(SubExpr)->getConstructor();
 
----------------
I think the errors prove we should fall back to the most conservative possible 
fix: remove all the other changes and just change these 2 lines to:
```
if (E->getCastKind() == CK_ConstructorConversion) {
  if (auto *CE = dyn_cast<ConstantExpr>(SubExpr)
    SubExpr = CE->getSubExpr();
  return cast<CXXConstructExpr>(SubExpr)->getConstructor();
}
```
I'm can't quite remember but I believe that would solve the bug as narrowly as 
possible.  @kimgr can you give it a try if and see if it avoids the errors?
(If it doesn't, I'm stumped...)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117391

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

Reply via email to