================
@@ -0,0 +1,57 @@
+// RUN: %check_clang_tidy -check-suffixes=ALL -std=c++11-or-later %s 
bugprone-exception-escape %t -- \
+// RUN:     -config='{"CheckOptions": { \
+// RUN:       
"bugprone-exception-escape.TreatFunctionsWithoutSpecificationAsThrowing": "All" 
\
+// RUN:     }}' -- -fexceptions
+// RUN: %check_clang_tidy -check-suffixes=UNDEFINED -std=c++11-or-later %s 
bugprone-exception-escape %t -- \
+// RUN:     -config='{"CheckOptions": { \
+// RUN:       
"bugprone-exception-escape.TreatFunctionsWithoutSpecificationAsThrowing": 
"OnlyUndefined" \
+// RUN:     }}' -- -fexceptions
+// RUN: %check_clang_tidy -check-suffixes=NONE -std=c++11-or-later %s 
bugprone-exception-escape %t -- \
+// RUN:     -config='{"CheckOptions": { \
+// RUN:       
"bugprone-exception-escape.TreatFunctionsWithoutSpecificationAsThrowing": 
"None" \
+// RUN:     }}' -- -fexceptions
+
+void unannotated_no_throw_body() {}
+
+void calls_unannotated() noexcept {
+  // CHECK-MESSAGES-ALL: :[[@LINE-1]]:6: warning: an exception may be thrown 
in function 'calls_unannotated' which should not throw exceptions
----------------
vbvictor wrote:

Could you please add stack trace as notes (like in other tests)

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

Reply via email to