bool hasNoDeclarations() const {
return declToIndex.size() == 0;
}
-
- bool hasEntry(const VarDecl *vd) const {
- return declToIndex.getValueIndex(vd).hasValue();
- }
-
- bool hasValues(const CFGBlock *block);
-
+
void resetScratch();
ValueVector &getScratch() { return scratch; }
return lazyCreate(vals[idx].first);
}
-bool CFGBlockValues::hasValues(const CFGBlock *block) {
- unsigned idx = block->getBlockID();
- return vals[idx].second != 0;
-}
-
BVPair &CFGBlockValues::getValueVectors(const clang::CFGBlock *block,
bool shouldLazyCreate) {
unsigned idx = block->getBlockID();
flagBlockUses(flagBlockUses), lastDR(0), lastLoad(0),
skipProcessUses(false) {}
- const CFG &getCFG() { return cfg; }
void reportUninit(const DeclRefExpr *ex, const VarDecl *vd,
bool isAlwaysUninit);
void VisitChildren(Stmt *S);
// Helpers.
- IdentifierInfo *getIdentifier(IdentifierInfo *& II, const char *str);
bool checkCall_strCommon(const CallExpr *CE, const FunctionDecl *FD);
typedef void (WalkAST::*FnCheck)(const CallExpr *,
};
} // end anonymous namespace
-//===----------------------------------------------------------------------===//
-// Helper methods.
-//===----------------------------------------------------------------------===//
-
-IdentifierInfo *WalkAST::getIdentifier(IdentifierInfo *& II, const char *str) {
- if (!II)
- II = &BR.getContext().Idents.get(str);
-
- return II;
-}
-
//===----------------------------------------------------------------------===//
// AST walking.
//===----------------------------------------------------------------------===//