[llvm] r194486 - Revert "Remove unused variable."

David Blaikie dblaikie at gmail.com
Tue Nov 12 08:47:36 PST 2013


Not necessarily possible/practical, since the macros could refer to
different names based on the context in which they're used, etc (and
there's only so much we can do to parse uninstantiated code)

Usually for cases where we have a debug variable that's used in asserts but
not otherwise, we either #ifndef NDEBUG the variable, or add a "(void)var;"
near the assert.


On Tue, Nov 12, 2013 at 8:37 AM, Rafael Espindola <
rafael.espindola at gmail.com> wrote:

> Author: rafael
> Date: Tue Nov 12 10:37:31 2013
> New Revision: 194486
>
> URL: http://llvm.org/viewvc/llvm-project?rev=194486&view=rev
> Log:
> Revert "Remove unused variable."
>
> This reverts commit r194485.
>
> The variable is unused in some macro instantiations, but not others. We
> should
> probably fix clang to not warn on this.
>
> Modified:
>     llvm/trunk/include/llvm/Support/YAMLTraits.h
>
> Modified: llvm/trunk/include/llvm/Support/YAMLTraits.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLTraits.h?rev=194486&r1=194485&r2=194486&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Support/YAMLTraits.h (original)
> +++ llvm/trunk/include/llvm/Support/YAMLTraits.h Tue Nov 12 10:37:31 2013
> @@ -1069,6 +1069,7 @@ operator<<(Output &yout, T &seq) {
>            seq.resize(index+1);
>    \
>          return seq[index];
>    \
>        }
>   \
> +      static const bool flow = true;
>    \
>      };
>    \
>    }
>   \
>    }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20131112/27ad443a/attachment.html>


More information about the llvm-commits mailing list