When making the emit function virtual, the destructor needs to become
virtual as well.
Details
Details
- Reviewers
bkramer
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Unit Tests
Time | Test | |
---|---|---|
15,950 ms | x64 debian > libarcher.races::task-dependency.c |
Event Timeline
Comment Actions
Already landed as https://github.com/llvm/llvm-project/commit/19bd806a1a443e4ce45ccc670861848fb1579022, I will close this.
clang/utils/TableGen/ClangOpenCLBuiltinEmitter.cpp | ||
---|---|---|
311 | Tip: When you're putting a defaulted virtual destructor in a derived class "just to make sure the base class's dtor was virtual," I recommend doing it with the override keyword: ~OpenCLBuiltinTestEmitter() override = default; This way, if the base class dtor was somehow not virtual, then you'll get a nice compiler error. |
Tip: When you're putting a defaulted virtual destructor in a derived class "just to make sure the base class's dtor was virtual," I recommend doing it with the override keyword:
This way, if the base class dtor was somehow not virtual, then you'll get a nice compiler error.