diff --git a/assets/semgrep_rules/c/chromium-raw-ptr.yaml b/assets/semgrep_rules/c/chromium-raw-ptr.yaml index 69c9c440..b00473b8 100644 --- a/assets/semgrep_rules/c/chromium-raw-ptr.yaml +++ b/assets/semgrep_rules/c/chromium-raw-ptr.yaml @@ -13,6 +13,7 @@ rules: - pattern-either: - pattern-inside: class $CLASS { }; - pattern-inside: struct $STRUCT { }; + - pattern-not-inside: $RET $FNAME(...) { ... } fix-regex: regex: ([a-zA-Z_][a-zA-Z0-9]+)\s*\*\s* replacement: "raw_ptr<\\1> " @@ -24,4 +25,4 @@ rules: - https://chromium.googlesource.com/chromium/src/+/refs/heads/main/base/memory/raw_ptr.md languages: - cpp - severity: WARNING \ No newline at end of file + severity: WARNING