summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/CommonBugCategories.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2012-04-05 20:43:28 +0000
committerTed Kremenek <kremenek@apple.com>2012-04-05 20:43:28 +0000
commitb45d198b6f01fa06f1b12eee083603352ef5d604 (patch)
tree64685796b13933ecd14fce2f964f2da98d77e0b5 /clang/lib/StaticAnalyzer/Checkers/CommonBugCategories.cpp
parentaec8a82694b0a3d2650044474fb061c1696dc718 (diff)
downloadbcm5719-llvm-b45d198b6f01fa06f1b12eee083603352ef5d604.tar.gz
bcm5719-llvm-b45d198b6f01fa06f1b12eee083603352ef5d604.zip
Require that all static analyzer issues have a category. As part of this change,
consolidate some commonly used category strings into global references (more of this can be done, I just did a few). Fixes <rdar://problem/11191537>. llvm-svn: 154121
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/CommonBugCategories.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/CommonBugCategories.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/CommonBugCategories.cpp b/clang/lib/StaticAnalyzer/Checkers/CommonBugCategories.cpp
new file mode 100644
index 00000000000..e2a8ea61661
--- /dev/null
+++ b/clang/lib/StaticAnalyzer/Checkers/CommonBugCategories.cpp
@@ -0,0 +1,18 @@
+//=--- CommonBugCategories.cpp - Provides common issue categories -*- C++ -*-=//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// Common strings used for the "category" of many static analyzer issues.
+namespace clang { namespace ento { namespace categories {
+
+const char *CoreFoundationObjectiveC = "Core Foundation/Objective-C";
+const char *MemoryCoreFoundationObjectiveC =
+ "Memory (Core Foundation/Objective-C)";
+const char *UnixAPI = "Unix API";
+}}}
+
OpenPOWER on IntegriCloud