[all-commits] [llvm/llvm-project] 8fd3b5: Fix an edge case in determining is a function has ...
Aaron Ballman via All-commits
all-commits at lists.llvm.org
Fri Apr 15 11:04:28 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8fd3b5de3f96300189a2841278e6c7b6654bffc5
https://github.com/llvm/llvm-project/commit/8fd3b5de3f96300189a2841278e6c7b6654bffc5
Author: Aaron Ballman <aaron at aaronballman.com>
Date: 2022-04-15 (Fri, 15 Apr 2022)
Changed paths:
M clang/lib/Sema/SemaDecl.cpp
M clang/test/Sema/warn-strict-prototypes.c
Log Message:
-----------
Fix an edge case in determining is a function has a prototype
Given the declaration:
typedef void func_t(unsigned);
__attribute__((noreturn)) func_t func;
we would incorrectly determine that `func` had no prototype because the
`noreturn` attribute would convert the underlying type directly into a
FunctionProtoType, but the declarator for `func` itself was not one for
a function with a prototype. This adds an additional check for when the
declarator is a type representation for a function with a prototype.
More information about the All-commits
mailing list