Commit 85eb725
committed
[clang] Fix use-after-scope when diagnosting __attribute__((format_matches))
I don't think this will ever crash, but asan complains about it.
SUMMARY: AddressSanitizer: stack-use-after-scope clang/lib/Sema/SemaChecking.cpp:6925:43 in void (anonymous namespace)::CheckFormatHandler::EmitFormatDiagnostic<clang::CharSourceRange>(clang::PartialDiagnostic, clang::SourceLocation, bool, clang::CharSourceRange, llvm::ArrayRef<clang::FixItHint>)
While there switch to stable_sort to not give a flipped error message
half of the time.1 parent 148111f commit 85eb725
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7390 | 7390 | | |
7391 | 7391 | | |
7392 | 7392 | | |
| 7393 | + | |
7393 | 7394 | | |
7394 | | - | |
7395 | | - | |
7396 | | - | |
| 7395 | + | |
| 7396 | + | |
| 7397 | + | |
7397 | 7398 | | |
7398 | 7399 | | |
7399 | 7400 | | |
| |||
7402 | 7403 | | |
7403 | 7404 | | |
7404 | 7405 | | |
7405 | | - | |
| 7406 | + | |
7406 | 7407 | | |
7407 | 7408 | | |
7408 | 7409 | | |
| |||
0 commit comments