Commit b63edb6
[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 9d82e5f commit b63edb6
1 file changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7172 | 7172 | | |
7173 | 7173 | | |
7174 | 7174 | | |
| 7175 | + | |
7175 | 7176 | | |
7176 | | - | |
7177 | | - | |
7178 | | - | |
| 7177 | + | |
| 7178 | + | |
| 7179 | + | |
7179 | 7180 | | |
7180 | 7181 | | |
7181 | 7182 | | |
| |||
7184 | 7185 | | |
7185 | 7186 | | |
7186 | 7187 | | |
7187 | | - | |
| 7188 | + | |
7188 | 7189 | | |
7189 | 7190 | | |
7190 | 7191 | | |
| |||
0 commit comments