Change *BugReport constructors to take StringRefs.

- Eliminates many calls to std::string.c_str()
- Fixes an invalid read in ReturnStackAddressChecker due to an unsafe call to
  StringRef.data() which doesn't guarantee null-termination.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@88779 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/UndefinedAssignmentChecker.cpp b/lib/Analysis/UndefinedAssignmentChecker.cpp
index 26f9ee3..b8062f3 100644
--- a/lib/Analysis/UndefinedAssignmentChecker.cpp
+++ b/lib/Analysis/UndefinedAssignmentChecker.cpp
@@ -39,7 +39,7 @@
     BT = new BuiltinBug("Assigned value is garbage or undefined");
 
   // Generate a report for this bug.
-  EnhancedBugReport *R = new EnhancedBugReport(*BT, BT->getName().c_str(), N);
+  EnhancedBugReport *R = new EnhancedBugReport(*BT, BT->getName(), N);
 
   if (AssignE) {
     const Expr *ex = 0;