Both callers of parseNumericVariableDefinition() perform the same extra
check that no character is found after the variable name. This patch
factors out this check into parseNumericVariableDefinition().
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
- Build Status
Buildable 34424 Build 34423: arc lint + arc unit
Event Timeline
LGTM, assuming the error position difference is not an issue.
llvm/lib/Support/FileCheck.cpp | ||
---|---|---|
251 | Nit: is this needed here? | |
llvm/test/FileCheck/numeric-defines-diagnostics.txt | ||
23 | It's slightly disconcerting that the column number here has changed. I assume that it's just some difference between the start and end of the string or something? |
llvm/test/FileCheck/numeric-defines-diagnostics.txt | ||
---|---|---|
23 | It seems like the diagnostic now points to the invalid character (+) instead of the start of the name. I think this makes more sense. |
llvm/test/FileCheck/numeric-defines-diagnostics.txt | ||
---|---|---|
23 | As Alexander said, it was pointing to the start of the variable before (saying basically that the whole "VALUE+2" is an invalid variable name) and is now pointing to the + operator because that's the first unexpected character. |
Nit: is this needed here?