aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorMészáros Gergely <gergely.meszaros@intel.com>2025-06-27 22:39:07 +0200
committerGitHub <noreply@github.com>2025-06-27 22:39:07 +0200
commit98f7d756e334278e2e34177fa11e5a604d3b01ff (patch)
tree7f54ec79720800e665fca2d9f9e8de5519684963 /clang/lib/CodeGen/BackendUtil.cpp
parent526701f8dc541af71269bf88c3697177a20e8705 (diff)
downloadllvm-98f7d756e334278e2e34177fa11e5a604d3b01ff.zip
llvm-98f7d756e334278e2e34177fa11e5a604d3b01ff.tar.gz
llvm-98f7d756e334278e2e34177fa11e5a604d3b01ff.tar.bz2
[FileCheck] Improve printing variables with escapes (#145865)
Firstly fix FileCheck printing string variables double-escaped (first regex, then C-style). This is confusing because it is not clear if the printed value is the literal value or exactly how it is escaped, without looking at FileCheck's source code. Secondly, only escape when doing so makes it easier to read the value (when the string contains tabs, newlines or non-printable characters). When the variable value is escaped, make a note of it in the output too, in order to avoid confusion. The common case that is motivating this change is variables that contain windows style paths with backslashes. These were printed as `"C:\\\\Program Files\\\\MyApp\\\\file.txt"`. Now prefer to print them as `"C:\Program Files\MyApp\file.txt"`. Printing the value literally also makes it easier to search for variables in the output, since the user can just copy-paste it.
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
0 files changed, 0 insertions, 0 deletions