================
@@ -1,6 +1,8 @@
// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: %clang_cc1 -fsyntax-only -flifetime-safety-inference
-fexperimental-lifetime-safety-tu-analysis -Wlifetime-safety-suggestions
-Wlifetime-safety -Wno-dangling -I%t -verify %t/test_source.cpp
+// RUN: %clang_cc1 -flifetime-safety-inference
-fexperimental-lifetime-safety-tu-analysis -Wlifetime-safety-suggestions
-Wlifetime-safety -Wno-dangling -I%t -fixit %t/test_source.cpp
+// RUN: %clang_cc1 -fsyntax-only -flifetime-safety-inference
-fexperimental-lifetime-safety-tu-analysis -Wlifetime-safety-suggestions
-Wno-dangling -I%t -Werror=lifetime-safety-suggestions %t/test_source.cpp
----------------
usx95 wrote:
> `-Werror=lifetime-safety-suggetions`
This seems quite clever. I think we can do something simpler to verify that
there are no suggestions left.
I would use a different verification prefix for non-suggestion in this file.
Say `uaf-warning {{object whose reference is captured does not live long
enough}}` and use `verify=uaf` in the last invocation. The rest of the
verification invocations can use `-verify=expected,uaf`. WDYT ?
https://github.com/llvm/llvm-project/pull/177763
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits