[PATCH] D49863: [istream] Fix error flags and exceptions propagated from input stream operations

wael yehia via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 5 15:43:47 PDT 2022


w2yehia added inline comments.
Herald added a project: All.


================
Comment at: libcxx/trunk/include/istream:1222
             {
-                this->setstate(ios_base::badbit);
+                __state |= ios_base::badbit;
                 return -1;
----------------
Hi @ldionne, you're setting the local __state and returning, while before we calling this->setstate.
I see you added `this->setstate(__state);` in the bottom. 
It seems this is a bug?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D49863



More information about the cfe-commits mailing list