aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic
diff options
context:
space:
mode:
authorDeLesley Hutchins <delesley@google.com>2012-12-05 00:06:15 +0000
committerDeLesley Hutchins <delesley@google.com>2012-12-05 00:06:15 +0000
commitfb4afc2fc659faff43a6df4c1d0e07df9c90479d (patch)
treea8e70a47a3f26e8f6bf6989b29042a95d5360985 /include/clang/Basic
parent1d1539875bc0a00935ffb41e27a8fd327054c006 (diff)
Thread safety analysis: Add a new "beta" warning flag: -Wthread-safety-beta.
As the analysis improves, it will continue to add new warnings that are potentially disruptive to existing users. From now on, such warnings will first be introduced under the "beta" flag. Such warnings are not turned on by default; their purpose is to allow users to test their code against future planned changes, before those changes are actually made. After a suitable migration period, beta warnings will be folded into the standard -Wthread-safety. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@169338 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic')
-rw-r--r--include/clang/Basic/DiagnosticGroups.td1
-rw-r--r--include/clang/Basic/DiagnosticSemaKinds.td4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Basic/DiagnosticGroups.td b/include/clang/Basic/DiagnosticGroups.td
index cae627ed23..edfaa102e2 100644
--- a/include/clang/Basic/DiagnosticGroups.td
+++ b/include/clang/Basic/DiagnosticGroups.td
@@ -406,6 +406,7 @@ def ThreadSafety : DiagGroup<"thread-safety",
[ThreadSafetyAttributes,
ThreadSafetyAnalysis,
ThreadSafetyPrecise]>;
+def ThreadSafetyBeta : DiagGroup<"thread-safety-beta">;
// Note that putting warnings in -Wall will not disable them by default. If a
// warning should be active _only_ when -Wall is passed in, mark it as
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td
index 18874b603f..99936ff861 100644
--- a/include/clang/Basic/DiagnosticSemaKinds.td
+++ b/include/clang/Basic/DiagnosticSemaKinds.td
@@ -1939,6 +1939,10 @@ def warn_fun_requires_lock_precise : Warning<
InGroup<ThreadSafetyPrecise>, DefaultIgnore;
def note_found_mutex_near_match : Note<"found near match '%0'">;
+// Dummy warning that will trigger "beta" warnings from the analysis if enabled.
+def warn_thread_safety_beta : Warning<
+ "Thread safety beta warning.">, InGroup<ThreadSafetyBeta>, DefaultIgnore;
+
def warn_impcast_vector_scalar : Warning<
"implicit conversion turns vector to scalar: %0 to %1">,
InGroup<DiagGroup<"conversion">>, DefaultIgnore;