[all-commits] [llvm/llvm-project] 0fd3d3: Improve diagnostic for an expression that's not co...

Richard Smith via All-commits all-commits at lists.llvm.org
Mon Aug 10 17:03:40 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0fd3d379e26da3cb02b6d960198e2efbc5190650
      https://github.com/llvm/llvm-project/commit/0fd3d379e26da3cb02b6d960198e2efbc5190650
  Author: Richard Smith <richard at metafoo.co.uk>
  Date:   2020-08-10 (Mon, 10 Aug 2020)

  Changed paths:
    M clang/include/clang/Basic/DiagnosticASTKinds.td
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/SemaCXX/builtins.cpp
    M clang/test/SemaCXX/constant-expression-cxx11.cpp

  Log Message:
  -----------
  Improve diagnostic for an expression that's not constant because it uses
the address of a constexpr local variable.

Suggest adding 'static' to give the constexpr local variable a constant
address.




More information about the All-commits mailing list