[clang] [analyzer][NFC] Skip NumberObjectConversionChecker in TUs without number objects (PR #246446)

Balázs Benics via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 26 09:54:27 PST 2026


================
@@ -345,6 +345,17 @@ NumberObjectConversionChecker::NumberObjectConversionChecker()
 void NumberObjectConversionChecker::checkASTCodeBody(const Decl *D,
                                                      AnalysisManager &AM,
                                                      BugReporter &BR) const {
+  // Every match involves a declaration with one of these names, so there is
+  // nothing to match if the translation unit has no such identifier.
+  // is_contained uses find, so the lookups do not create the identifiers.
----------------
steakhal wrote:

Actually reading this, I don't think its useful. Let's drop it.
```suggestion
```

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


More information about the cfe-commits mailing list