[clang] 48285c2 - [NFCI] Fix set-but-unused warning in ClangAttrEmitter.cpp

Dávid Bolvanský via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 24 00:13:36 PDT 2022


Author: Dávid Bolvanský
Date: 2022-03-24T08:13:28+01:00
New Revision: 48285c20eb5f5ed4f7b539fbd7f882c997a08f46

URL: https://github.com/llvm/llvm-project/commit/48285c20eb5f5ed4f7b539fbd7f882c997a08f46
DIFF: https://github.com/llvm/llvm-project/commit/48285c20eb5f5ed4f7b539fbd7f882c997a08f46.diff

LOG: [NFCI] Fix set-but-unused warning in ClangAttrEmitter.cpp

Added: 
    

Modified: 
    clang/utils/TableGen/ClangAttrEmitter.cpp

Removed: 
    


################################################################################
diff  --git a/clang/utils/TableGen/ClangAttrEmitter.cpp b/clang/utils/TableGen/ClangAttrEmitter.cpp
index 47c06cdd147cb..b77554cbb6d39 100644
--- a/clang/utils/TableGen/ClangAttrEmitter.cpp
+++ b/clang/utils/TableGen/ClangAttrEmitter.cpp
@@ -1522,12 +1522,10 @@ writePrettyPrintFunction(const Record &R,
       // To avoid printing parentheses around an empty argument list or
       // printing spurious commas at the end of an argument list, we need to
       // determine where the last provided non-fake argument is.
-      unsigned NonFakeArgs = 0;
       bool FoundNonOptArg = false;
       for (const auto &arg : llvm::reverse(Args)) {
         if (arg->isFake())
           continue;
-        ++NonFakeArgs;
         if (FoundNonOptArg)
           continue;
         // FIXME: arg->getIsOmitted() == "false" means we haven't implemented


        


More information about the cfe-commits mailing list