[all-commits] [llvm/llvm-project] b3d7d1: Declare __builtin_strlen in StringRef.h as constexpr

Hans via All-commits all-commits at lists.llvm.org
Mon Feb 3 07:58:18 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b3d7d1061dc375bb5ea725e6597382fcd37f41d6
      https://github.com/llvm/llvm-project/commit/b3d7d1061dc375bb5ea725e6597382fcd37f41d6
  Author: Hans Wennborg <hans at chromium.org>
  Date:   2020-02-03 (Mon, 03 Feb 2020)

  Changed paths:
    M llvm/include/llvm/ADT/StringRef.h

  Log Message:
  -----------
  Declare __builtin_strlen in StringRef.h as constexpr

Otherwise Visual Studio 2017 will complain about
llvm::StringRef::strlen not being constexpr:

  StringRef.h(80): error C3615: constexpr function 'llvm::StringRef::strLen' cannot result in a constant expression
  StringRef.h(84): note: failure was caused by call of undefined function or one not declared 'constexpr'




More information about the All-commits mailing list