================
@@ -0,0 +1,5 @@
+// RUN: clang-format -dump-config - < %s | FileCheck %s
----------------
bhamiltoncx wrote:

In this case, we do want two tests (at least, we do need the integration test 
in `clang/test/Format/dump-config-objc-stdin.m` to reproduce the issue).

The reason is, the bug was introduced into `ClangFormat.cpp`, which is only 
linked into the `clang-format` binary executed by the integration test. The 
code which regressed is not actually part of the `Format` library which is 
executed via the unit tests.

The unit tests do not execute the `clang-format` binary; they directly execute 
the formatting / config dumping logic via the `Format` library. But they're 
much faster to build and run, and it's possible this might regress in the 
`Format` library in the future (I was just surprised there were no tests there).

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

Reply via email to