JonasToth added a comment.

Is the type important, or specifics about the variable (e.g. the name?)
The `_` variable names are sometimes used for RAII variables/lambdas
that shall just do some cleanup, e.g. gsl::finally().

It might make sense to give `ExprMutAnalyzer` an ignore-mechanism.

I wonder if instead there should be an option to not complain about the 
variables that aren't actually used?

Checking for variable usage would be simple. The `ExprMutAnalyzer`
always analyses the scope, e.g. a function. You can match this scope for
a `DeclRefExpr` of the variable, empty result means no usage.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D50447



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to