================
@@ -226,6 +236,10 @@ def run_clang_tidy(self):
         
print("------------------------------------------------------------------")
         return clang_tidy_output
 
+    def check_no_diagnosis(self, clang_tidy_output):
+        if clang_tidy_output != "":
+            sys.exit("No diagnostics were expected, but found the ones above")
----------------
5chmidti wrote:

You may have accidentally not staged the hunk with the `print`. Either way, 
what I meant was:

```python 
if clang_tidy_output != "":
    print(clang_tidy_output)
    sys.exit("No diagnostics were expected, but found the ones above")
```
Because we already check if `clang_tidy_output` is empty to potentially 
terminate because errors were found when they shouldn't have, we can call print 
inside the if, so we don't print an empty string. (-> nit).

https://github.com/llvm/llvm-project/pull/91293
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to