[cfe-dev] Bug 23307 - clang fails to compile rstudio-0.98.1103/src/cpp/session/modules/SessionHTMLPreview.cpp against libc++

Marshall Clow mclow.lists at gmail.com
Thu Apr 23 01:19:00 PDT 2015


On Wed, Apr 22, 2015 at 8:54 PM, Jack Howarth <
howarth.mailing.lists at gmail.com> wrote:

>     Can one of the libc++ experts take a peak at...
>
> https://llvm.org/bugs/show_bug.cgi?id=23307
>
> I am unclear why clang++ with libstdc++ tolerates the following code from
> rstudio 0.98.1103...
>
> const char* const MAGIC_GUID = "12861c30b10411e1afa60800200c9a66";
> const char* const FIGURE_DIR = "figure-compile-notebook-12861c30b";
>
> bool okToGenerateFile(const FilePath& rmdPath,
>                       const std::string& extension,
>                       std::string* pErrMsg)
> {
>    FilePath filePath = rmdPath.parent().complete(
>                                     rmdPath.stem() + extension);
>
>    if (filePath.exists())
>    {
>       boost::shared_ptr<std::istream> pStr;
>       Error error = filePath.open_r(&pStr);
>       if (error)
>       {
>          *pErrMsg = "Error opening file: " + error.summary();
>          return false;
>       }
>
>       std::string magicGuid(MAGIC_GUID);
>       std::istreambuf_iterator<char> eod;
>       if (eod == std::search(std::istreambuf_iterator<char>(*pStr),
>                              eod,
>                              magicGuid.begin(),
>                              magicGuid.end()))
>
> but clang++ with libc++ errors on the above if statement as...
>
>
I've reported this bug to the libstdc++ maintainers...

-- Marshall
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150423/21d80e23/attachment.html>


More information about the cfe-dev mailing list