[PATCH] D44175: Add std:: to begin and end in drop_begin
Krzysztof Parzyszek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 6 14:21:53 PST 2018
kparzysz added a comment.
This actually works with trunk, fails with 5.0.1, so unless this needs to be addressed there, I'm going to abandon this. I'll just change the code that fails to compile.
This is the error:
/w/c/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/bin/clang++ -c bre.cpp -I/w/c/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/include -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wstring-conversion -ffunction-sections -fdata-sections -O3 -DNDEBUG -fno-exceptions -fno-rtti -DLLVM_BUILD_GLOBAL_ISEL -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS
bre.cpp:9:35: error: no matching function for call to 'drop_begin'
SmallVector<const SCEV*,2> Ops1(drop_begin(A->operands(), 1));
^~~~~~~~~~
/w/c/clang+llvm-5.0.1-x86_64-linux-gnu-ubuntu-14.04/include/llvm/ADT/iterator_range.h:63:52: note:
candidate template ignored: substitution failure [with T =
llvm::iterator_range<const llvm::SCEV *const *>]: use of undeclared
identifier 'begin'
iterator_range<decltype(begin(std::declval<T>()))> drop_begin(T &&t, int n) {
~~~~~ ^
1 error generated.
Source file:
#include "llvm/ADT/iterator_range.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Analysis/ScalarEvolution.h"
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
using namespace llvm;
const SCEV *foo(ScalarEvolution *SE, const SCEVAddExpr *A) {
SmallVector<const SCEV*,2> Ops1(drop_begin(A->operands(), 1));
return SE->getAddExpr(Ops1, A->getNoWrapFlags());
}
Repository:
rL LLVM
https://reviews.llvm.org/D44175
More information about the llvm-commits
mailing list