[all-commits] [llvm/llvm-project] a21a46: Make the diagnostic-missing-prototypes put the sug...

Vy Nguyen via All-commits all-commits at lists.llvm.org
Tue Jun 9 16:35:32 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: a21a462051659d8e1281af7d11738b8abc0557dc
      https://github.com/llvm/llvm-project/commit/a21a462051659d8e1281af7d11738b8abc0557dc
  Author: Vy Nguyen <vyng at google.com>
  Date:   2020-06-09 (Tue, 09 Jun 2020)

  Changed paths:
    M clang/lib/Sema/SemaDecl.cpp
    M clang/test/Sema/warn-missing-prototypes.c

  Log Message:
  -----------
  Make the diagnostic-missing-prototypes put the suggested `static` in front of `const` if exists.

Summary:
Consider: `const int* get_foo() {return nullptr;}`
The suggested fix should be `static const int* get_foo(){}`
and not `const static int* get_foo(){}`

Reviewers: gribozavr2

Subscribers: cfe-commits

Tags: #clang

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




More information about the All-commits mailing list