FW: [Diffusion] rC330802: Fix buildbot problems after rC330794

Faisal Vali via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 25 02:59:41 PDT 2018


That should work - although i wonder if we still need makeArrayRef
once we explicitly declare an array - either way thank you for fixing
it Bjorn!!
Faisal Vali



On Wed, Apr 25, 2018 at 4:16 AM, Björn Pettersson A
<bjorn.a.pettersson at ericsson.com> wrote:
> Hello Faisal.
>
> Lots of buildbots have failed after your commit "[c++2a] [concepts] Add rudimentary parsing support for template concept declarations" (rC330794)
>
> Here is an example from http://lab.llvm.org:8011/builders/clang-x86_64-linux-abi-test/builds/25483/steps/build-unified-tree/logs/stdio
>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> FAILED: tools/clang/lib/Parse/CMakeFiles/clangParse.dir/ParseTemplate.cpp.o
> /usr/bin/c++   -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Itools/clang/lib/Parse -I/home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/tools/clang/lib/Parse -I/home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/tools/clang/include -Itools/clang/include -Iinclude -I/home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/include -fPIC -fvisibility-inlines-hidden -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -fno-common -Woverloaded-virtual -fno-strict-aliasing -O3    -UNDEBUG  -fno-exceptions -fno-rtti -MD -MT tools/clang/lib/Parse/CMakeFiles/clangParse.dir/ParseTemplate.cpp.o -MF tools/clang/lib/Parse/CMakeFiles/clangParse.dir/ParseTemplate.cpp.o.d -o tools/clang/lib/Parse/CMakeFiles/clangParse.dir/ParseTemplate.cpp.o -c /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/tools/clang/lib/Parse/ParseTemplate.cpp
> /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/tools/clang/lib/Parse/ParseTemplate.cpp: In member function ‘void clang::Parser::ParseConceptDefinition(clang::SourceLocation, clang::DeclSpec&, const clang::Parser::ParsedTemplateInfo&, clang::AccessSpecifier, clang::Parser::DeclSpecContext)’:
> /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/tools/clang/lib/Parse/ParseTemplate.cpp:373:62: error: no matching function for call to ‘makeArrayRef(<brace-enclosed initializer list>)’
>        SkipUntil(llvm::makeArrayRef({tok::comma, tok::greater}),
>                                                               ^
> /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/tools/clang/lib/Parse/ParseTemplate.cpp:373:62: note: candidates are:
> In file included from /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/include/llvm/ADT/APFloat.h:21:0,
>                  from /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/tools/clang/include/clang/AST/APValue.h:18,
>                  from /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/tools/clang/include/clang/AST/Decl.h:17,
>                  from /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/tools/clang/include/clang/AST/ASTTypeTraits.h:20,
>                  from /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/tools/clang/include/clang/AST/ASTContext.h:18,
>                  from /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/tools/clang/lib/Parse/ParseTemplate.cpp:14:
> /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/include/llvm/ADT/ArrayRef.h:451:15: note: template<class T> llvm::ArrayRef<T> llvm::makeArrayRef(const T&)
>    ArrayRef<T> makeArrayRef(const T &OneElt) {
>                ^
> /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/include/llvm/ADT/ArrayRef.h:451:15: note:   template argument deduction/substitution failed:
> /home/buildslave/buildslave1a/clang-x86_64-linux-abi-test/llvm/tools/clang/lib/Parse/ParseTemplate.cpp:373:62: note:   couldn't deduce template parameter ‘T’
>        SkipUntil(llvm::makeArrayRef({tok::comma, tok::greater}),
>
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>
> I made a quick fix in rC330802, where I use a local array as input to the makeArrayRef.
> With such a fix the code started to compile again for me.
> But I advise you to look at my fix to verify that I did not mess up anything.
>
> Regards,
> Björn
>
> -----Original Message-----
> From: Bjorn Pettersson via Phabricator [mailto:reviews at reviews.llvm.org]
> Sent: den 25 april 2018 11:08
> To: Björn Pettersson A <bjorn.a.pettersson at ericsson.com>
> Subject: [Diffusion] rC330802: Fix buildbot problems after rC330794
>
> bjope committed rC330802: Fix buildbot problems after rC330794.
>
> Fix buildbot problems after https://reviews.llvm.org/rC330794
>
> Avoiding
>
>   error: no matching function for call to 'makeArrayRef'
>
> at
>
>   ../tools/clang/lib/Parse/ParseTemplate.cpp:373:17
>
> By using a local C array as input to makeArrayRef.
>
> Not sure if this is the best solution, but it makes the code
> compile again.
>
>
> Files:
>   /cfe/trunk/lib/Parse/ParseTemplate.cpp
>
> PATCH
>
> Index: lib/Parse/ParseTemplate.cpp
> ===================================================================
> --- lib/Parse/ParseTemplate.cpp (revision 330801)
> +++ lib/Parse/ParseTemplate.cpp (revision 330802)
> @@ -370,7 +370,8 @@
>      if (DSC != DeclSpecContext::DSC_template_param) {
>        SkipUntil(tok::r_brace, StopAtSemi | StopBeforeMatch);
>      } else {
> -      SkipUntil(llvm::makeArrayRef({tok::comma, tok::greater}),
> +      tok::TokenKind Tokens[] = { tok::comma, tok::greater };
> +      SkipUntil(llvm::makeArrayRef(Tokens),
>                  StopAtSemi | StopBeforeMatch);
>      }
>      return;
>
> Users:
>   bjope (Author)
>
> https://reviews.llvm.org/rC330802
>
>
>


More information about the cfe-commits mailing list