| 164 | } |
| 165 | |
| 166 | void FilePathAnalyzer::updateFieldFlow(ArgFlow &AF, std::vector<int> Indices) { |
| 167 | auto &A = AF.getLLVMArg(); |
| 168 | auto *T = A.getType(); |
| 169 | while (isa<PointerType>(T)) |
| 170 | T = T->getPointerElementType(); |
| 171 | |
| 172 | auto *ST = dyn_cast_or_null<StructType>(T); |
| 173 | if (!ST) |
| 174 | return; |
| 175 | |
| 176 | for (unsigned S = 0; S < ST->getNumElements(); ++S) { |
| 177 | Indices.push_back(S); |
| 178 | if (!Report.has(A, Indices)) { |
| 179 | Indices.pop_back(); |
| 180 | continue; |
| 181 | } |
| 182 | |
| 183 | AF.setStruct(ST); |
| 184 | auto &FF = AF.getOrCreateFieldFlow(S); |
| 185 | if (Report.get(A, Indices)) { |
| 186 | FF.setFilePathString(); |
| 187 | } |
| 188 | updateFieldFlow(FF, Indices); |
| 189 | Indices.pop_back(); |
| 190 | } |
| 191 | } |
| 192 | |
| 193 | } // namespace ftg |
nothing calls this directly
no test coverage detected