Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(933)

Unified Diff: test/SemaCXX/warn-thread-safety-analysis.cpp

Issue 5689070: Handle blocks in CFG that call functions marked as noreturn.
Patch Set: Created 13 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/Analysis/ThreadSafety.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/SemaCXX/warn-thread-safety-analysis.cpp
diff --git a/test/SemaCXX/warn-thread-safety-analysis.cpp b/test/SemaCXX/warn-thread-safety-analysis.cpp
index 8bbaf0398fae3b9e041681d8e167ad2087ddc8c1..00ed746cd420d5a562486404e303f99fa29b7da5 100644
--- a/test/SemaCXX/warn-thread-safety-analysis.cpp
+++ b/test/SemaCXX/warn-thread-safety-analysis.cpp
@@ -2100,3 +2100,20 @@ public:
} // end namespace SelfLockingTest
+namespace NoReturnTest {
+
+bool condition();
+void fatal() __attribute__((noreturn));
+
+Mutex mu_;
+
+void test1() {
+ MutexLock lock(&mu_);
+ if (condition()) {
+ fatal();
+ return;
+ }
+}
+
+};
+
« no previous file with comments | « lib/Analysis/ThreadSafety.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b