Index: clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h
===================================================================
--- clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h
+++ clang/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h
@@ -21,6 +21,7 @@
extern const char *const CXXObjectLifecycle;
extern const char *const CXXMoveSemantics;
extern const char *const SecurityError;
+extern const char *const UnusedCode;
} // namespace categories
} // namespace ento
} // namespace clang
Index: clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
===================================================================
--- clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
+++ clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp
@@ -260,8 +260,8 @@
break;
}
- BR.EmitBasicReport(AC->getDecl(), Checker, BugType, "Dead store", os.str(),
- L, R, Fixits);
+ BR.EmitBasicReport(AC->getDecl(), Checker, BugType, categories::UnusedCode,
+ os.str(), L, R, Fixits);
}
void CheckVarDecl(const VarDecl *VD, const Expr *Ex, const Expr *Val,
Index: clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
===================================================================
--- clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
+++ clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
@@ -169,7 +169,7 @@
if (SM.isInSystemHeader(SL) || SM.isInExternCSystemHeader(SL))
continue;
- B.EmitBasicReport(D, this, "Unreachable code", "Dead code",
+ B.EmitBasicReport(D, this, "Unreachable code", categories::UnusedCode,
"This statement is never executed", DL, SR);
}
}
Index: clang/lib/StaticAnalyzer/Core/CommonBugCategories.cpp
===================================================================
--- clang/lib/StaticAnalyzer/Core/CommonBugCategories.cpp
+++ clang/lib/StaticAnalyzer/Core/CommonBugCategories.cpp
@@ -22,6 +22,7 @@
const char *const CXXObjectLifecycle = "C++ object lifecycle";
const char *const CXXMoveSemantics = "C++ move semantics";
const char *const SecurityError = "Security error";
+const char *const UnusedCode = "Unused code";
} // namespace categories
} // namespace ento
} // namespace clang
Index: clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
===================================================================
--- clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
+++ clang/test/Analysis/Inputs/expected-plists/edges-new.mm.plist
@@ -2368,7 +2368,7 @@
descriptionValue stored to 'x' is never read
- categoryDead store
+ categoryUnused code
typeDead increment
check_namedeadcode.DeadStores
@@ -11409,7 +11409,7 @@
descriptionValue stored to 'foo' during its initialization is never read
- categoryDead store
+ categoryUnused code
typeDead initialization
check_namedeadcode.DeadStores
Index: clang/test/Analysis/Inputs/expected-plists/objc-arc.m.plist
===================================================================
--- clang/test/Analysis/Inputs/expected-plists/objc-arc.m.plist
+++ clang/test/Analysis/Inputs/expected-plists/objc-arc.m.plist
@@ -382,7 +382,7 @@
descriptionValue stored to 'x' during its initialization is never read
- categoryDead store
+ categoryUnused code
typeDead initialization
check_namedeadcode.DeadStores
@@ -450,7 +450,7 @@
descriptionValue stored to 'obj1' during its initialization is never read
- categoryDead store
+ categoryUnused code
typeDead initialization
check_namedeadcode.DeadStores
@@ -518,7 +518,7 @@
descriptionValue stored to 'obj4' during its initialization is never read
- categoryDead store
+ categoryUnused code
typeDead initialization
check_namedeadcode.DeadStores
@@ -586,7 +586,7 @@
descriptionValue stored to 'obj5' during its initialization is never read
- categoryDead store
+ categoryUnused code
typeDead initialization
check_namedeadcode.DeadStores
@@ -654,7 +654,7 @@
descriptionValue stored to 'obj6' during its initialization is never read
- categoryDead store
+ categoryUnused code
typeDead initialization
check_namedeadcode.DeadStores
@@ -1064,7 +1064,7 @@
descriptionValue stored to 'cf1' during its initialization is never read
- categoryDead store
+ categoryUnused code
typeDead initialization
check_namedeadcode.DeadStores
@@ -1132,7 +1132,7 @@
descriptionValue stored to 'cf2' during its initialization is never read
- categoryDead store
+ categoryUnused code
typeDead initialization
check_namedeadcode.DeadStores
@@ -1200,7 +1200,7 @@
descriptionValue stored to 'cf3' during its initialization is never read
- categoryDead store
+ categoryUnused code
typeDead initialization
check_namedeadcode.DeadStores
@@ -1268,7 +1268,7 @@
descriptionValue stored to 'cf4' during its initialization is never read
- categoryDead store
+ categoryUnused code
typeDead initialization
check_namedeadcode.DeadStores
Index: clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist
===================================================================
--- clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist
+++ clang/test/Analysis/Inputs/expected-plists/plist-output.m.plist
@@ -2169,7 +2169,7 @@
descriptionValue stored to 'foo' during its initialization is never read
- categoryDead store
+ categoryUnused code
typeDead initialization
check_namedeadcode.DeadStores
@@ -5654,7 +5654,7 @@
descriptionValue stored to 'x' is never read
- categoryDead store
+ categoryUnused code
typeDead increment
check_namedeadcode.DeadStores