[cfe-dev] update_cc_test_checks.py and function declarations
David Greene via cfe-dev
cfe-dev at lists.llvm.org
Tue Jan 28 14:32:20 PST 2020
Hi Alex and all,
Did something change with update_cc_test_checks.py when moving from
c-index-test to the JSON AST for getting function line numbers? Before
this change, a test like this had the checks put on the function
definitions:
void foo();
int main() {
foo();
return 0;
}
void foo() {
...
}
The checks for foo were put in front of the definition of foo. Now I am
seeing the checks put in front of the declaration of foo, which messes
up the CHECK-LABEL ordering.
I don't see anything in the JSON parsing code that distinguishes a
function declaration from a function definition. I don't know how the
old c-index-test code worked though. The only thing I know is that I
used to get checks on the function definition and now I get them on the
function declaration.
I can't say for sure it is the use of the JSON AST that caused the
change in behavior I'm seeing as I have made some of my own
soon-to-be-upstreamed changes but it seems most likely since those other
changes shouldn't have affected the line2spell_and_mangled_list.
Thanks for your help!
-David
More information about the cfe-dev
mailing list