google / emboss

Emboss is a tool for generating code that reads and writes binary data structures.
Apache License 2.0
67 stars 20 forks source link

Build error in new version of Clang #150

Closed BenjaminLawson closed 1 week ago

BenjaminLawson commented 1 week ago

Using clang at this revision: https://github.com/llvm/llvm-project/commit/924611b0301f751e8c3fef9759b9d2683b0345fc

In file included from [...]/runtime/cpp/emboss_cpp_util.h:20:
../../[...]/runtime/cpp/emboss_arithmetic.h:92:72: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
   92 |              ? Maybe<ResultT>(static_cast<ResultT>(OperatorT::template Do(
      |                   
BenjaminLawson commented 1 week ago

Looks like this commit introduce the change in clang: https://github.com/llvm/llvm-project/commit/f46d1463b835560d90ad3ac02b63c771e4ebe566

BenjaminLawson commented 1 week ago

I think the fix is simply OperatorT::template Do<>(.

BenjaminLawson commented 1 week ago

Can confirm that the above PR fixed our clangnext builder.