[all-commits] [llvm/llvm-project] 3105cf: [FileCheck] Fix parsing empty global and pseudo va...
Daniil Kovalev via All-commits
all-commits at lists.llvm.org
Tue Mar 5 00:20:28 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 3105cfe783d861e63c647469cc3a6c9b91f8bb4a
https://github.com/llvm/llvm-project/commit/3105cfe783d861e63c647469cc3a6c9b91f8bb4a
Author: Daniil Kovalev <dkovalev at accesssoftek.com>
Date: 2024-03-05 (Tue, 05 Mar 2024)
Changed paths:
M llvm/lib/FileCheck/FileCheck.cpp
A llvm/test/FileCheck/empty-variable-name.txt
Log Message:
-----------
[FileCheck] Fix parsing empty global and pseudo variable names (#83667)
Reland #82595 with fixes of build failures related to colored output.
See https://lab.llvm.org/buildbot/#/builders/139/builds/60549
Use `%ProtectFileCheckOutput` to avoid colored output.
Original commit message below.
In `Pattern::parseVariable`, for global variables (those starting with '$')
and for pseudo variables (those starting with '@') the first character is
consumed before actual variable name parsing. If the name is empty, it
leads to out-of-bound access to the corresponding `StringRef`.
This patch adds an if statement against the case described.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list