[all-commits] [llvm/llvm-project] 46757c: [clang] functions with the 'const' or 'pure' attri...

dobbelaj-snps via All-commits all-commits at lists.llvm.org
Thu Feb 18 08:34:13 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 46757ccb49ab88da54ca8ddd43665d5255ee80f7
      https://github.com/llvm/llvm-project/commit/46757ccb49ab88da54ca8ddd43665d5255ee80f7
  Author: Jeroen Dobbelaere <jeroen.dobbelaere at synopsys.com>
  Date:   2021-02-18 (Thu, 18 Feb 2021)

  Changed paths:
    M clang/lib/CodeGen/CGCall.cpp
    M clang/test/CodeGen/complex-builtins.c
    M clang/test/CodeGen/complex-libcalls.c
    M clang/test/CodeGen/function-attributes.c
    M clang/test/CodeGenCXX/2009-05-04-PureConstNounwind.cpp
    M clang/test/Sema/libbuiltins-ctype-powerpc64.c
    M clang/test/Sema/libbuiltins-ctype-x86_64.c

  Log Message:
  -----------
  [clang] functions with the 'const' or 'pure' attribute must always return.

As described in
* https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-pure-function-attribute
* https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-const-function-attribute

An `__attribute__((pure))` function must always return, as well as an `__attribute__((const))` function.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D96960




More information about the All-commits mailing list