swift
06ddb3bf - Adjust to "[ADT] Add LLVM_ATTRIBUTE_WARN_UNUSED to SmallString"

Commit
12 days ago
Adjust to "[ADT] Add LLVM_ATTRIBUTE_WARN_UNUSED to SmallString" ``` swift/lib/AST/ASTPrinter.cpp:7425:21: error: unused variable 'buf' [-Werror,-Wunused-variable] 7425 | SmallString<64> buf; | ^~~ ``` `SmallString` is now marked `LLVM_ATTRIBUTE_WARN_UNUSED`, so the compiler diagnoses unused `SmallString` locals despite their non-trivial constructor and destructor. The two `buf` locals in `ASTPrinter.cpp` are dead, so remove them, as the LLVM commit did for the unused `Path` in `VirtualOutputBackendsTest.cpp`. See https://github.com/llvm/llvm-project/commit/e1fd616879c2f9cea648db4f78b486d9cd3e39e7 (https://github.com/llvm/llvm-project/pull/240180).
Author
Committer
Parents
Loading