From: Benjamin Kramer Date: Mon, 26 Oct 2020 19:20:23 +0000 (+0100) Subject: [clang-tidy] Silence unused variable warning in Release builds. NFCI. X-Git-Tag: llvmorg-13-init~8132 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=26750a1264b3df114a1efae7cde6f0784206b2ce;p=platform%2Fupstream%2Fllvm.git [clang-tidy] Silence unused variable warning in Release builds. NFCI. ExpandModularHeadersPPCallbacks.cpp:55:15: warning: unused variable 'FileEntry' for (auto FileEntry : FilesToRecord) ^ --- diff --git a/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp b/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp index 9e693b6..1d008c2 100644 --- a/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp +++ b/clang-tools-extra/clang-tidy/ExpandModularHeadersPPCallbacks.cpp @@ -52,9 +52,11 @@ public: /// Makes sure we have contents for all the files we were interested in. Ideally /// `FilesToRecord` should be empty. void checkAllFilesRecorded() { - for (auto FileEntry : FilesToRecord) - LLVM_DEBUG(llvm::dbgs() << "Did not record contents for input file: " - << FileEntry->getName() << "\n"); + LLVM_DEBUG({ + for (auto FileEntry : FilesToRecord) + llvm::dbgs() << "Did not record contents for input file: " + << FileEntry->getName() << "\n"; + }); } private: