================
@@ -1803,6 +1803,18 @@ TEST_F(FormatTestObjC, AttributesOnObjCProperty) {
       "@property(weak) id delegate ATTRIBUTE_MACRO(X) __attribute__((X));");
 }
 
+TEST_F(FormatTestObjC, NoCrashOnStrayMethodSign) {
+  // Issue #199075: clang-format used to assert in parseObjCMethod() when an
+  // ObjC interface/implementation contained a '-' or '+' that was not
+  // followed by '(' or an identifier.
+  verifyNoCrash("@interface;\n-");
----------------
HazardyKnusperkeks wrote:

```suggestion
  verifyNoCrash("@interface;\n"
                "-");
```
Some for the rest.

https://github.com/llvm/llvm-project/pull/199104
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to