r195814 - Remove a whole lot of unused variables
Pasi Parviainen
pasi.parviainen at iki.fi
Wed Nov 27 10:12:55 PST 2013
On 27.11.2013 7:22, Alp Toker wrote:
> Author: alp
> Date: Tue Nov 26 23:22:15 2013
> New Revision: 195814
>
> URL: http://llvm.org/viewvc/llvm-project?rev=195814&view=rev
> Log:
> Remove a whole lot of unused variables
>
> There are about 30 removed in this patch, generated by a new FixIt I haven't
> got round to submitting yet.
> Modified: cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp?rev=195814&r1=195813&r2=195814&view=diff
> ==============================================================================
> --- cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp (original)
> +++ cfe/trunk/lib/FrontendTool/ExecuteCompilerInvocation.cpp Tue Nov 26 23:22:15 2013
> @@ -32,7 +32,6 @@ using namespace llvm::opt;
>
> static FrontendAction *CreateFrontendBaseAction(CompilerInstance &CI) {
> using namespace clang::frontend;
> - StringRef Action("unknown");
>
This breaks the build if one or more of these macros are undefined:
CLANG_ENABLE_ARCMT, CLANG_ENABLE_STATIC_ANALYZER, CLANG_ENABLE_REWRITER.
Perhaps this variable should be under similar #if guard what can be
found later in the function for reporting error if disabled feature is
used. This would clarify intent of variable and avoid unused variable
warning.
> switch (CI.getFrontendOpts().ProgramAction) {
> case ASTDeclList: return new ASTDeclListAction();
>
Pasi.
More information about the cfe-commits
mailing list