nickdesaulniers added inline comments.

================
Comment at: clang/lib/AST/ExprConstant.cpp:8384-8385
     const MaterializeTemporaryExpr *E) {
+  if (Info.EvalMode == EvalInfo::EM_ConstantFold)
+    return false;
+
----------------
nickdesaulniers wrote:
> removing these two lines fixes the following regressions:
> 
> Failed Tests (6):
>   llvm-libc++-shared.cfg.in :: 
> std/algorithms/alg.modifying.operations/alg.fill/ranges.fill.pass.cpp
>   llvm-libc++-shared.cfg.in :: 
> std/algorithms/alg.modifying.operations/alg.fill/ranges.fill_n.pass.cpp
>   llvm-libc++-shared.cfg.in :: 
> std/strings/basic.string/string.cons/dtor.pass.cpp
>   llvm-libc++-shared.cfg.in :: 
> std/strings/basic.string/string.cons/pointer_assignment.pass.cpp
>   llvm-libc++-shared.cfg.in :: 
> std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp
>   llvm-libc++-shared.cfg.in :: 
> std/utilities/utility/pairs/pairs.pair/assign.pair_like_rv.pass.cpp
> 
> The condition probably needs further specification. Let me see if I can work 
> out what's missing.
Might need to restore the `E->getStorageDuration() == SD_Static && ` check.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151587

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

Reply via email to