| 16 | } |
| 17 | |
| 18 | bool CompileConstantFilter::isMacroFunctionAssigned( |
| 19 | const ASTDefNode &Node) const { |
| 20 | const auto *Assigned = Node.getAssigned(); |
| 21 | if (!Assigned) |
| 22 | return false; |
| 23 | |
| 24 | const auto *S = Assigned->getNode().get<Stmt>(); |
| 25 | if (!S) |
| 26 | return false; |
| 27 | |
| 28 | const auto &SrcManager = |
| 29 | const_cast<ASTNode *>(Assigned)->getASTUnit().getSourceManager(); |
| 30 | auto Loc = SrcManager.getTopMacroCallerLoc(S->getBeginLoc()); |
| 31 | return util::getMacroFunctionExpansionRange(SrcManager, Loc).isValid(); |
| 32 | } |
| 33 | |
| 34 | bool CompileConstantFilter::isOffsetOfExpr(const ASTDefNode &Node) const { |
| 35 | const auto *Assigned = Node.getAssigned(); |
nothing calls this directly
no test coverage detected