hans added inline comments.

================
Comment at: clang/lib/Driver/Driver.cpp:4043-4044
+    if (CCGenDiagnostics && A) {
+      SmallString<128> CrashDirectory;
+      CrashDirectory = A->getValue();
+      llvm::sys::path::append(CrashDirectory, Split.first);
----------------
zturner wrote:
> Maybe you can combine these into one line with:
> 
> ```
> SmallString<128> CrashDirectory{ A->getValue() };
> ```
Or even simpler,

```
SmallString<128> CrashDirectory = A->getValue();
```

:-)


================
Comment at: clang/test/Driver/crash-diagnostics-dir.c:1
+// RUN: mkdir -p %t
+// RUN: not %clang -fcrash-diagnostics-dir=%t -c %s 2>&1 | FileCheck %s
----------------
The other test/Driver/crash-report-* tests do "rm -rf %t" before creating the 
directory. Since you're using "-p" with mkdir below, it won't fail if the dir 
exists, but removing the dir before is still nice since it will clean up 
temporary files from previous test runs. Without it, a new file will be added 
to the dir each time the test is run, so it will grow in size over time.


Repository:
  rL LLVM

https://reviews.llvm.org/D48601



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to