[clang-tools-extra] 0e86cdd - [psuedo] Fix for unused warning by moving code into debug macro.
via cfe-commits
cfe-commits at lists.llvm.org
Tue May 3 16:21:10 PDT 2022
Author: Weverything
Date: 2022-05-03T16:07:59-07:00
New Revision: 0e86cddf9880810444418200bcdce22a96d9e91a
URL: https://github.com/llvm/llvm-project/commit/0e86cddf9880810444418200bcdce22a96d9e91a
DIFF: https://github.com/llvm/llvm-project/commit/0e86cddf9880810444418200bcdce22a96d9e91a.diff
LOG: [psuedo] Fix for unused warning by moving code into debug macro.
Added:
Modified:
clang-tools-extra/pseudo/lib/GLR.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/pseudo/lib/GLR.cpp b/clang-tools-extra/pseudo/lib/GLR.cpp
index c1fdd8680ca85..771d69fb680dc 100644
--- a/clang-tools-extra/pseudo/lib/GLR.cpp
+++ b/clang-tools-extra/pseudo/lib/GLR.cpp
@@ -90,12 +90,13 @@ const ForestNode &glrParse(const TokenStream &Tokens,
});
if (!PendingAccept.empty()) {
- LLVM_DEBUG(llvm::dbgs() << llvm::formatv("Accept: {0} accepted result:\n",
- PendingAccept.size()));
- for (const auto &Accept : PendingAccept)
- LLVM_DEBUG(llvm::dbgs()
- << " - " << G.symbolName(Accept.Head->Payload->symbol())
- << "\n");
+ LLVM_DEBUG({
+ llvm::dbgs() << llvm::formatv("Accept: {0} accepted result:\n",
+ PendingAccept.size());
+ for (const auto &Accept : PendingAccept)
+ llvm::dbgs() << " - " << G.symbolName(Accept.Head->Payload->symbol())
+ << "\n";
+ });
assert(PendingAccept.size() == 1);
return *PendingAccept.front().Head->Payload;
}
More information about the cfe-commits
mailing list