srcML/srcML

srcQL Transformations Always Assume C++ Source Code

Opened this issue · 0 comments

When using the --srcql option to apply a srcQL pattern query, srcML always treats the pattern as C++ code instead of checking against whatever unit the code is being run against.

The issue lies on the call to srcql_convert_query_to_xpath in xpathTransformation.cpp
https://github.com/srcML/srcML/blob/a9f9ce909e45609c36159ced698178f410692714/src/libsrcml/xpathTransformation.cpp#L212C5-L217C6