Semantic highlighting doesn't work in the nested function below:
(Note the renamed llvm import and Format() call. Un-renaming the import or commenting out the Format call unbreaks semantic highlighting...)
module nestedfunc;
import tango.text.convert.Format;
// To get the code for this import:
// $ svn co http://svn.dsource.org/projects/llvmdc/binding/llvm/llvm
import llvm = llvm.llvm; // must be renamed import
llvm.Value zero() { return null; }
void foo(llvm.Value rhs) {
// Commenting out this line fixes highlighting for the nested function:
auto blaat = Format("blaat: {}", rhs);
// Only the signature works with "mark occurrences". Nothing in the body is
// highlighted or marked.
// (I don't know if the 'i' works, since there's nothing to link it to outside the body)
void nested(size_t i) {
llvm.Value[2] indices;
indices[0] = zero;
indices[1] = llvm.ConstantInt.GetU(llvm.Type.Int32, i);
}
}
// same code as foo.nested, but this is highlighted, and
// "mark occurrences" links "zero" to the definition above
// (but not the use in foo.nested)
// Mark occurrences also works on "indices" where it doesn't
// in foo.nested.
void bar(size_t i) {
llvm.Value[2] indices;
indices[0] = zero;
indices[1] = llvm.ConstantInt.GetU(llvm.Type.Int32, i);
}