Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix assertion "Chunk.Kind == DeclaratorChunk::Function" with attribut…
…ed type. This patch is to upgrade FunctionTypeUnwrapper for correct processing of AttributedType. Fixes PR25786. Patch by Alexander Makarov. Differential Revision: http://reviews.llvm.org/D15373 llvm-svn: 260373
- Loading branch information
Denis Zobnin
committed
Feb 10, 2016
1 parent
ea0636b
commit f49c0f8
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s | ||
// RUN: %clang_cc1 -triple i686-unknown-linux-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-OK | ||
|
||
void (__attribute__((regparm(3), stdcall)) *pf) (); | ||
void (__attribute__((regparm(2), stdcall)) foo)(int a) { | ||
} | ||
// CHECK: @pf = common global void (...)* null | ||
// CHECK: define void @foo(i32 %a) | ||
|
||
// CHECK-OK: @pf = common global void (...)* null | ||
// CHECK-OK: define x86_stdcallcc void @foo(i32 inreg %a) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -DTEST -fsyntax-only -verify %s | ||
// RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fsyntax-only -verify %s | ||
|
||
#if TEST | ||
void (__attribute__((regparm(3), stdcall)) *pf) (); //expected-warning {{calling convention 'stdcall' ignored for this target}} | ||
void (__attribute__((regparm(2), stdcall)) foo)(int a) { //expected-warning {{calling convention 'stdcall' ignored for this target}} | ||
} | ||
#else | ||
//expected-no-diagnostics | ||
void (__attribute__((regparm(3), stdcall)) *pf) (); | ||
void (__attribute__((regparm(2), stdcall)) foo)(int a) {} | ||
#endif |