[cfe-dev] GCC 6 Warnings

Renato Golin via cfe-dev cfe-dev at lists.llvm.org
Wed Sep 7 15:17:09 PDT 2016


Clang folks,

FYI, I'm getting a lot of warnings from GCC 6.1.1 when building Clang...

Haven't had time to look closer and probably won't this week, so if
anyone would like to have a go... :)


include/llvm/Support/Casting.h:183:72: warning: ignoring attributes on
template argument 'llvm::simplify_type<const clang::Stmt*
const>::SimpleType {aka const clang::Stmt*}' [-Wignored-attributes]

include/llvm/Support/Casting.h: In instantiation of 'struct
llvm::cast_retty<clang::ImplicitCastExpr, const clang::Stmt* const>':

include/llvm/Support/Casting.h:222:1:   required by substitution of
'template<class X, class Y> typename std::enable_if<(!
llvm::is_simple_type<Y>::value), typename llvm::cast_retty<X, const
Y>::ret_type>::type llvm::cast(const Y&) [with X =
clang::ImplicitCastExpr; Y = const clang::Stmt*]'

tools/clang/include/clang/AST/ASTTypeTraits.h:383:22:   required from
'static const T&
clang::ast_type_traits::DynTypedNode::DynCastPtrConverter<T,
BaseT>::getUnchecked(clang::ast_type_traits::ASTNodeKind, const char*)
[with T = clang::ImplicitCastExpr; BaseT = clang::Stmt]'

tools/clang/include/clang/AST/ASTTypeTraits.h:242:42:   required from
'const T& clang::ast_type_traits::DynTypedNode::getUnchecked() const
[with T = clang::ImplicitCastExpr]'

tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h:283:19:
required from 'bool
clang::ast_matchers::internal::MatcherInterface<T>::dynMatches(const
clang::ast_type_traits::DynTypedNode&,
clang::ast_matchers::internal::ASTMatchFinder*,
clang::ast_matchers::internal::BoundNodesTreeBuilder*) const [with T =
clang::ImplicitCastExpr]'

tools/clang/unittests/ASTMatchers/ASTMatchersNarrowingTest.cpp:1957:1:
  required from here

include/llvm/Support/Casting.h:134:74: warning: ignoring attributes on
template argument 'llvm::simplify_type<const clang::Stmt*
const>::SimpleType {aka const clang::Stmt*}' [-Wignored-attributes]
   return isa_impl_wrap<X, const Y,
          ~~~~~~~~~~~~~~~~~~~~~~~~~
                        typename simplify_type<const Y>::SimpleType>::doit(Val);
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~

etc.


More information about the cfe-dev mailing list