Change the line number information stored for a numeric variable to be
about when does the value becomes available rather than when it is
defined. This provides a more natural semantic for pseudo variables and
variables defined on the command-line that are not defined from a
variable definition in the input text.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 34433 Build 34432: arc lint + arc unit
Event Timeline
As mentioned inline, I don't understand what you mean by "available". Perhaps you could post some basic examples for the different cases explaining what you mean, and then I can try suggesting some different terminology.
llvm/include/llvm/Support/FileCheck.h | ||
---|---|---|
52–53 | I'm not sure it's clear to me what "available" means in this context if it doesn't mean definition. | |
56–66 | in input -> in the input (?) | |
58 | Not that I'm bothered really, but is there a reason to change the signature order here? |
llvm/include/llvm/Support/FileCheck.h | ||
---|---|---|
52–53 | The change in naming is mostly for pseudo variables (@LINE being the only at the moment) where the definition is implicit and thus there isn't a definition line number per se. However I think it makes sense to talk about value availability (e.g. @LINE only has a value from the first line in the CHECK file, whereas other variable have their value available from after their definition). | |
58 |
|
llvm/include/llvm/Support/FileCheck.h | ||
---|---|---|
52–53 | I could spin it another way. The @LINE variable is defined anew on each line, with the value of the input line number. Alternatively, it is defined on the first line, and updated thereafter. Thus its definition line is equal to its current value, or the first time it was defined (i.e. line 1), whichever is more useful. Thinking in C++ terms, there is no concept of variable "availability". You have scope, definition, and declaration as related words. Thus variable availability is not a concept that people necessarily will understand. |
I'm not sure it's clear to me what "available" means in this context if it doesn't mean definition.