[PATCH] D60383: FileCheck [3/12]: Stricter parsing of @LINE expressions
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 30 01:33:19 PDT 2019
thopre added a comment.
In D60383#1482917 <https://reviews.llvm.org/D60383#1482917>, @rnk wrote:
> The newly added test fails on Windows:
> http://lab.llvm.org:8011/builders/clang-x64-windows-msvc/builds/6381
>
> This appears to be the fix:
>
> bool parseExpect(std::string &VarName, std::string &Trailer) {
>
> - StringRef NameTrailer = StringRef(VarName + Trailer); + std::string NameTrailer = VarName + Trailer;
Sadly I cannot reproduce it. I tried a stage2 build just in case but I still don't hit it. I'm also a bit confused by what is happening. Does the temporary std::string created by the + operator dies before NameTrailer is used? Anyway, if your patch works could you try std::string &NameTrailer = VarName + Trailer instead? I believe that removes an unnecessary copy from the temporary std::string created by the + operator to the NameTrailer one.
Thanks for the patch!
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60383/new/
https://reviews.llvm.org/D60383
More information about the llvm-commits
mailing list