Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

usingShadow unsued variable #112

Closed
kheaactua opened this issue Jan 29, 2019 · 1 comment
Closed

usingShadow unsued variable #112

kheaactua opened this issue Jan 29, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@kheaactua
Copy link

kheaactua commented Jan 29, 2019

I receive this error when building off master ( e8965f7 )

FAILED: CMakeFiles/insights.dir/FunctionDeclHandler.cpp.o
ccache /usr/bin/c++   -I/usr/local/clang+llvm-7.0.1-x86_64-linux-gnu-ubuntu-18.04/include -I/tmp/cppinsights/. -Igenerated -isystem/usr/local/clang+llvm-7.0.1-x86_64-linux-gnu-ubuntu-18.04/include  -fPIC -fvisibility-inlines-hidden -Werror=date-time  -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long  -Wnon-virtual-dtor -Wdelete-non-virtual-dtor  -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -fno-rtti -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -std=c++1z -Wextra -Wold-style-cast -Werror -Wsuggest-override -Wuseless-cast -Wno-overloaded-virtual -MD -MT CMakeFiles/insights.dir/FunctionDeclHandler.cpp.o -MF CMakeFiles/insights.dir/FunctionDeclHandler.cpp.o.d -o CMakeFiles/insights.dir/FunctionDeclHandler.cpp.o -c /tmp/cppinsights/FunctionDeclHandler.cpp
/tmp/cppinsights/FunctionDeclHandler.cpp: In member function ‘virtual void clang::insights::FunctionDeclHandler::run(const clang::ast_matchers::MatchFinder::MatchResult&)’:                                                                                                   
/tmp/cppinsights/FunctionDeclHandler.cpp:105:28: error: unused variable ‘usingShadow’ [-Werror=unused-variable]
             if(const auto* usingShadow = dyn_cast_or_null<ConstructorUsingShadowDecl>(shadow)) {
                            ^~~~~~~~~~~
cc1plus: all warnings being treated as errors

To get around it I delete the variable declaration.

g++ --version
g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I get this on 16.04 and 18.04

@andreasfertig
Copy link
Owner

Hello @kheaactua,

thanks for reporting that. I'm not sure how this got pass the build. A fix is on it's way.

Andreas

andreasfertig pushed a commit that referenced this issue Jan 29, 2019
andreasfertig pushed a commit that referenced this issue Jan 29, 2019
@andreasfertig andreasfertig added the bug Something isn't working label Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants