NoQ accepted this revision. NoQ added a comment. This revision is now accepted and ready to land.
As far as I'm concerned, I think this is great for the initial implementation! Let's commit as soon as Jan confirms that his problem is addressed. ================ Comment at: clang/lib/Analysis/UnsafeBufferUsage.cpp:894 + if (VD->getType()->isPointerType()) + return fixVariableWithSpan(VD, Tracker, Ctx, Handler); + return {}; ---------------- jkorous wrote: > I believe we should add another condition here: `VD->isLocalVarDecl()` as we > don't support globals (yet?). > We run the matcher with `any_ds` tag only on function bodies so we won't > discover globals anyway and the `assert(It != Defs.end() && "Definition never > discovered!");` would fail. I think this check should happen much earlier. Like, we shouldn't define a strategy for globals, and we shouldn't build fixables out of them. And then `assert()` here, just to double-check. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139737/new/ https://reviews.llvm.org/D139737 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits