<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>I think getting the PreprocessingRecord (<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__clang.llvm.org_doxygen_classclang-5F1-5F1PreprocessingRecord.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=jeMV2hAGYT4VtNUhol0Ohhr8Z2gbxuErge19Us3IgSE&s=gdAX48tJjBcP2806COIEPzLGexVNn0GK7k0ztqh2WPE&e=">http://clang.llvm.org/doxygen/classclang_1_1PreprocessingRecord.html</a>) from the Preprocessor would also work; a PreprocessedEntity seems to contain source information that you can use: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__clang.llvm.org_doxygen_classclang-5F1-5F1PreprocessedEntity.html&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=jeMV2hAGYT4VtNUhol0Ohhr8Z2gbxuErge19Us3IgSE&s=AGS_swi36AgPnFOd03NfpQz4FKz86QimsbYhDba4o0E&e=">http://clang.llvm.org/doxygen/classclang_1_1PreprocessedEntity.html</a><br></div>
<div> </div>
<div id="sig19426265"><div class="signature">---<br></div>
<div class="signature">Best regards,<br></div>
<div class="signature"> </div>
<div class="signature">Gábor 'ShdNx' Kozár<br></div>
<div class="signature"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__gaborkozar.me&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=jeMV2hAGYT4VtNUhol0Ohhr8Z2gbxuErge19Us3IgSE&s=To6D6r6J4rN-RRMDez5SNHCWCaSiRkPNRwGQO1yaJ8A&e=">http://gaborkozar.me</a><br></div>
</div>
<div> </div>
<div> </div>
<div>On Wed, May 27, 2015, at 18:31, Richard wrote:<br></div>
<blockquote type="cite"><div> </div>
<div>In article<br></div>
<div><<a href="mailto:CAOweq9+4kdBKeiKBg+SXzKs3SN-RNE7NQG7ysv4N4tsBCcWiCA@mail.gmail.com">CAOweq9+4kdBKeiKBg+SXzKs3SN-RNE7NQG7ysv4N4tsBCcWiCA@mail.gmail.com</a>>,<br></div>
<div>    Alexander Kornienko <<a href="mailto:alexfh@google.com">alexfh@google.com</a>> writes:<br></div>
<div> </div>
<blockquote><div>This problem is relevant to comments as well.<br></div>
<div> </div>
<div>I'm not sure if there's an easy solution, but some hand-rolled options are<br></div>
<div>available. One way is to re-lex the range and try to find preprocessor<br></div>
<div>directives (and comments) by analyzing token sequences. Another approach<br></div>
<div>would be to subscribe to PPCallbacks, gather all locations of #if/#else/...<br></div>
<div>into a set and then look up any values in this set that fall between the<br></div>
<div>bounds of your range.<br></div>
</blockquote><div> </div>
<div>Yeah, I think with PPCallbacks you could build a function that would<br></div>
<div>tell you something about preprocessor blocks based on source location.<br></div>
<div> </div>
<div>For comments, I thought there was something about sprinkling comment<br></div>
<div>nodes into the AST?  Isn't this how the doxygen thing works?<br></div>
<div>--<br></div>
<div>"The Direct3D Graphics Pipeline" free book<br></div>
<div><<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__tinyurl.com_d3d-2Dpipeline&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=jeMV2hAGYT4VtNUhol0Ohhr8Z2gbxuErge19Us3IgSE&s=YXpM_NwFD-RVPg0HEFe-g1tvf2qaDER1W0PG48ttddQ&e=">http://tinyurl.com/d3d-pipeline</a>><br></div>
<div>    The Computer Graphics Museum <<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__ComputerGraphicsMuseum.org&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=jeMV2hAGYT4VtNUhol0Ohhr8Z2gbxuErge19Us3IgSE&s=ylNdlYjL1DoUeb1D4GyASw9xWrXXzshfyPPEMGruxjg&e=">http://ComputerGraphicsMuseum.org</a>><br></div>
<div>        The Terminals Wiki <<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__terminals.classiccmp.org&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=jeMV2hAGYT4VtNUhol0Ohhr8Z2gbxuErge19Us3IgSE&s=12apur7YXWHhycuU59HXqZIgf_8MkKaguz3OTQkvo3s&e=">http://terminals.classiccmp.org</a>><br></div>
<div>  Legalize Adulthood! (my blog) <<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__LegalizeAdulthood.wordpress.com&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=CnzuN65ENJ1H9py9XLiRvC_UQz6u3oG6GUNn7_wosSM&m=jeMV2hAGYT4VtNUhol0Ohhr8Z2gbxuErge19Us3IgSE&s=Jg7QcSQ1vkfLyvCQqsnMKiXvPSfMJU_Hbm0OYNBFT3I&e=">http://LegalizeAdulthood.wordpress.com</a>><br></div>
<div><u>_______________________________________________</u><br></div>
<div>cfe-dev mailing list<br></div>
<div><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br></div>
<div><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br></div>
</blockquote><div> </div>
</body>
</html>