[clang-tools-extra] [clang-tidy][NFC] Devirtualize `GlobList` and don't heap allocate it (PR #164212)

Baranov Victor via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 16 07:48:43 PST 2025


================
@@ -24,7 +24,7 @@ namespace clang::tidy {
 /// them in the order of appearance in the list.
 class GlobList {
 public:
-  virtual ~GlobList() = default;
+  GlobList() = default;
----------------
vbvictor wrote:

Now if someone would use `GlobList*` as a pointer to derived, they get undeleted base object?

Could we either preserve virtual as is, or merge two classes into one and make it final 

https://github.com/llvm/llvm-project/pull/164212


More information about the cfe-commits mailing list