[PATCH] D104135: [analyzer] Decouple NoteTag from its Factory
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 14 20:47:51 PDT 2021
NoQ added inline comments.
================
Comment at: clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h:777
static bool classof(const ProgramPointTag *T) {
return T->getTagKind() == &Kind;
}
----------------
vsavchenko wrote:
> NoQ wrote:
> > NoQ wrote:
> > > It sounds like `NoteTag` `isn't<DataTag>` despite inheriting from it.
> > Wait nvm, `DataTag` doesn't provide a `classof` at all. This means we can't write `isa<DataTag>` at all, right?
> Yes, it's purely abstract. `ProgramPointTag` also doesn't have `classof`
Something being purely abstract isn't a problem on its own; there are a lot of abstract classes that implement `classof()`, such as `Expr`. It's more of an artifact of the current implementation strategy.
Ok np though, this doesn't seem to be a real problem.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104135/new/
https://reviews.llvm.org/D104135
More information about the cfe-commits
mailing list