<div dir="ltr"><div>If you need to check that a single location is not inside a macro, you can use SourceLocation::isFileID(). If you need to check that a range is on the same level of macro expansion (so that you don't suggest replacements of source ranges spanning macro boundaries), you can call Lexer::makeFileCharRange(). You can also combine both to check that a whole range is not inside a macro expansion.<br></div><div><br></div><div><br></div><div>-- Alex<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 18, 2015 at 10:09 PM, Jonathan Coe <span dir="ltr"><<a href="mailto:jbcoe@me.com" target="_blank">jbcoe@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">







<p><span>I'm finishing up a clang-tidy check for uninitialized fields. </span></p><p>How can I prevent replacement text being generated when the class or constructor is part of a macro expansion?</p><p>I'm getting a few silly replacement suggestions when running the check over llvm source.</p><p>thanks,</p><p>Jon</p></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br></blockquote></div>
</div></div></div>