[clang-tools-extra] [clang-tidy] Fix crash in readability-suspicious-call-argument on malformed config (PR #180351)

via cfe-commits cfe-commits at lists.llvm.org
Sat Feb 7 06:51:02 PST 2026


================
@@ -528,7 +528,11 @@ SuspiciousCallArgumentCheck::SuspiciousCallArgumentCheck(
   for (const StringRef Abbreviation : optutils::parseStringList(
            Options.get("Abbreviations", DefaultAbbreviations))) {
     const auto [Key, Value] = Abbreviation.split("=");
-    assert(!Key.empty() && !Value.empty());
----------------
zeyi2 wrote:

IMO we shouldn't assert here. IIUC Assertions are typically for invariant checking and logic errors, not for validating user input.

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


More information about the cfe-commits mailing list