| 1200 | } |
| 1201 | |
| 1202 | PathId PreprocessFile::getFileId(uint32_t line) const { |
| 1203 | const uint32_t size = m_lineTranslationVec.size(); |
| 1204 | if (isMacroBody() && m_macroInfo) { |
| 1205 | return m_macroInfo->m_fileId; |
| 1206 | } else { |
| 1207 | if (size) { |
| 1208 | if (size == 1) { |
| 1209 | if (line >= m_lineTranslationVec[0].m_originalLine) { |
| 1210 | return (m_lineTranslationVec[0].m_pretendFileId); |
| 1211 | } |
| 1212 | } else { |
| 1213 | uint32_t index = size - 1; |
| 1214 | while (true) { |
| 1215 | if (line >= m_lineTranslationVec[index].m_originalLine) { |
| 1216 | return (m_lineTranslationVec[index].m_pretendFileId); |
| 1217 | } |
| 1218 | if (index == 0) break; |
| 1219 | index--; |
| 1220 | } |
| 1221 | } |
| 1222 | return m_fileId; |
| 1223 | } else { |
| 1224 | return m_fileId; |
| 1225 | } |
| 1226 | } |
| 1227 | } |
| 1228 | |
| 1229 | uint32_t PreprocessFile::getLineNb(uint32_t line) { |
| 1230 | if (isMacroBody() && m_macroInfo) { |
no outgoing calls
no test coverage detected