Basile STARYNKEVITCH <[EMAIL PROTECTED]> writes: > How does one get the source location (e.g. start and end filename, > linenumber, ...) of a tree node; for example, the source position of every > loop inside current_loops or of every function body inside cgraph_nodes? > for these nodes, doing EXPR_FILENAME(node->decl), EXPR_LINENO(node->decl) > does not work, probably because node->decl is a declaration, but also > EXPR_FILENAME(DECL_SAVED_TREE(node->decl)), > EXPR_LINENO(DECL_SAVED_TREE(node->decl))) don't work neither...
For a DECL, use DECL_SOURCE_{LOCATION,FILE,LINE}. Ian