Martin =?utf-8?q?Bednár?= <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -10211,11 +10223,27 @@ CXString clang_getUnaryOperatorKindSpelling(enum 
CXUnaryOperatorKind kind) {
 }
 
 enum CXUnaryOperatorKind clang_getCursorUnaryOperatorKind(CXCursor cursor) {
-  if (clang_isExpression(cursor.kind)) {
-    const Expr *expr = getCursorExpr(cursor);
+  if (!clang_isExpression(cursor.kind)) {
+    return CXUnaryOperator_Invalid;
+  }
----------------
AaronBallman wrote:

```suggestion
  if (!clang_isExpression(cursor.kind))
    return CXUnaryOperator_Invalid;
```
Same suggestion elsewhere in the function, to match our usual coding style for 
braces.

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

Reply via email to