static bool isTrackedVar(const VarDecl *vd, const DeclContext *dc) {
if (vd->isLocalVarDecl() && !vd->hasGlobalStorage() &&
+ !vd->isExceptionVariable() &&
vd->getDeclContext() == dc) {
QualType ty = vd->getType();
return ty->isScalarType() || ty->isVectorType();
(void)static_cast<float>(x); // no-warning
}
}
+
+// Don't warn about variables declared in "catch"
+void RDar9251392_bar(const char *msg);
+
+void RDar9251392() {
+ try {
+ throw "hi";
+ }
+ catch (const char* msg) {
+ RDar9251392_bar(msg); // no-warning
+ }
+}
+
+