InstrProf: Handle whitespace and comments at the ends of macros
When we try to find the end loc for a token, we have to re-lex the token. This was running into a problem when we'd store the end loc of a macro's coverage region, since we wouldn't actually be at the beginning of a token when we tried to re-lex it, leading us to do silly things (and eventually assert) when whitespace or comments followed. This pushes our use of getPreciseTokenLocEnd earlier, so that we won't call it when it doesn't make sense to. It also removes an unnecessary adjustment by 1 that was working around this problem in some cases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233169 91177308-0d34-0410-b5e6-96231b3b80d8
test/CoverageMapping/comment-in-macro.c
0 → 100644
Please register or sign in to comment