History log of /external/clang/test/Sema/function.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
0e2c34f92f00628d48968dfea096d36381f494cb 23-Mar-2015 Stephen Hines <srhines@google.com> Update aosp/master clang for rebase to r230699.

Change-Id: I6a546ab3d4ae37119eebb735e102cca4f80ab520
/external/clang/test/Sema/function.c
12df246d6dea2ee1f92c186f922f1afcf499647a 24-Jun-2013 Reid Kleckner <reid@kleckner.net> [AST] Introduce a new DecayedType sugar node

The goal of this sugar node is to be able to look at an arbitrary
FunctionType and tell if any of the parameters were decayed from an
array or function type. Ultimately this is necessary to implement
Microsoft's C++ name mangling scheme, which mangles decayed arrays
differently from normal pointers.

Reviewers: rsmith

Differential Revision: http://llvm-reviews.chandlerc.com/D1014

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184763 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
b004a8e5aa700108de2acc8f81b0dd2ec7518899 16-Apr-2013 Douglas Gregor <dgregor@apple.com> Fix PR4296: Add parser detection/error recovery for nested functions, from Serve Pavlov!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179603 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
117c45666c99f1797c708767d7c0ccaa7902ec42 14-Jan-2012 Douglas Gregor <dgregor@apple.com> Make sure to consider non-DeclContext scopes properly when finding
multiple name lookup results in C/Objective-C. Fixes a regression a
caused in r147533, found by Enea Zaffanella!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
8ac2c66a1442985091c5ec2b33ce6d3df3bcb529 11-Nov-2011 Eli Friedman <eli.friedman@gmail.com> Make sure that restrict-qualifying an array actually adds a restrict qualifier. PR11354. (operator bool() is evil!)



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144355 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
184aa4e6ded190bfb3bbe207040467f8d7e28a04 12-Jul-2010 Chris Lattner <sabre@nondot.org> fix PR7280 by making the warning on code like this:

int test1() {
return;
}

default to an error.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108108 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
a5728872c7702ddd09537c95bc3cbd20e1f2fb09 15-Dec-2009 Daniel Dunbar <daniel@zuster.org> Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.
- This is designed to make it obvious that %clang_cc1 is a "test variable"
which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it
can be useful to redefine what gets run as 'clang -cc1' (for example, to set
a default target).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91446 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
ed5d651b0d4b99d0b68bb8d4633e49b98c95bd8f 22-Sep-2009 Douglas Gregor <dgregor@apple.com> In C++, a variadic function does not need an ellipsis prior to the comma. Parse it in both C and C++, but diagnose it as an error in C with a fix-it hint to add the comma.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82576 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
eb32fde032a250091134db56a3aeaea6b09f6594 28-Apr-2009 Eli Friedman <eli.friedman@gmail.com> Simplify the scheme used for keywords, and change the classification
scheme to be more useful.

The new scheme introduces a set of categories that should be more
readable, and also reflects what we want to consider as an extension
more accurately. Specifically, it makes the "what is a keyword"
determination accurately reflect whether the keyword is a GNU or
Microsoft extension.

I also introduced separate flags for keyword aliases; this is useful
because the classification of the aliases is mostly unrelated to the
classification of the original keyword.

This patch treats anything that's in the implementation
namespace (prefixed with "__", or "_X" where "X" is any upper-case
letter) as a keyword without marking it as an extension. This is
consistent with the standards in that an implementation is allowed to define
arbitrary extensions in the implementation namespace without violating
the standard. This gets rid of all the nasty "extension used" warnings
for stuff like __attribute__ in -pedantic mode. We still warn for
extensions outside of the the implementation namespace, like typeof.
If someone wants to implement -Wextensions or something like that, we
could add additional information to the keyword table.

This also removes processing for the unused "Boolean" language option;
such an extension isn't supported on any other C implementation, so I
don't see any point to adding it.

The changes to test/CodeGen/inline.c are required because previously, we
weren't actually disabling the "inline" keyword in -std=c89 mode.

I'll remove Boolean and NoExtensions from LangOptions in a follow-up
commit.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70281 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
5153ee66d6d4fb37b02f85df38e48dc8b46660df 25-Apr-2009 Chris Lattner <sabre@nondot.org> Change SemaType's "GetTypeForDeclarator" and "ConvertDeclSpecToType" to
always return a non-null QualType + error bit. This fixes a bunch of
cases that didn't check for null result (and could thus crash) and eliminates
some crappy code scattered throughout sema.

This also improves the diagnostics in the recursive struct case to eliminate
a bogus second error. It also cleans up the case added to function.c by forming
a proper function type even though the declarator is erroneous, allowing the
parameter to be added to the function. Before:

t.c:2:1: error: unknown type name 'unknown_type'
unknown_type f(void*P)
^
t.c:4:3: error: use of undeclared identifier 'P'
P+1;
^

After:
t.c:2:1: error: unknown type name 'unknown_type'
unknown_type f(void*P)
^



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70023 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
2dbd285f5033ca6dea25babfd1c43d9fec35e7e5 25-Apr-2009 Chris Lattner <sabre@nondot.org> fix PR4049, a crash on invalid, by making sema install the right number of
parameters in a functiondecl, even if the decl is invalid and has a confusing
Declarator. On the testcase, we now emit one beautiful diagnostic:

t.c:2:1: error: unknown type name 'unknown_type'
unknown_type f(void*)
^

GCC 4.0 produces:

t.c:2: error: syntax error before ‘f’
t.c: In function ‘f’:
t.c:2: error: parameter name omitted

and GCC 4.2:

t.c:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘f’



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70016 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
7cbeef278d6206941630ea14585ea80f44d68d69 25-Apr-2009 Chris Lattner <sabre@nondot.org> in:
typedef void foo(void);

We get a typedef for a functiontypeproto with no arguments, not
one with one argument and type void. This means the code being
removed in SemaDecl is dead.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70013 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
d55a71d852d4d8b785122b8d033a0c06b187067b 22-Apr-2009 Chris Lattner <sabre@nondot.org> Fix some mishandling of the attr(gnu_inline) mode when used with
extern. Previously we would warn about it and ignore the attribute.
This is incorrect, it should be handled as a c89 "extern inline"
function. Many thanks to Matthieu Castet for pointing this out and
beating me over the head until I got it.

PR3988: extern inline function are not externally visible




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69756 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
cf2a7211b4785068c7efa836baab90b198a4d2a6 20-Apr-2009 Chris Lattner <sabre@nondot.org> the __gnuc_inline__ attribute is actually named __gnu_inline__,
PR4023


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69618 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
23a48cc69e7ed4f219996a8864cb7d3f24f1157f 17-Apr-2009 Chris Lattner <sabre@nondot.org> fix a crash on invalid by making ActOnDeclarator create decl with
a dummy *function* type when it is recovering and knows it needs
a function. rdar://6802350 - clang crash on invalid input


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69374 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
c51974328b3a378c3c40b1fa527ecb928ed2bfda 14-Apr-2009 Chris Lattner <sabre@nondot.org> implement some sema for gnuc_inline attribute. Reject always_inline and no_inline on objc methods.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69051 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
74734d576b1dd082f623abb76ab204d69970dadb 02-Apr-2009 Douglas Gregor <dgregor@apple.com> When calling a function without a prototype for which we have a
definition, warn if there are too many/too few function call
arguments.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68318 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
e7450f5dbd5bed63b8ef9db86350a8fc3db011e8 24-Mar-2009 Douglas Gregor <dgregor@apple.com> Make sure to use RequireCompleteType rather than testing for
incomplete types. RequireCompleteType is needed when the type may be
completed by instantiating a template.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67643 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
d7d5f0223bd30dfd618762349c6209dd1d5ea3e6 24-Mar-2009 Daniel Dunbar <daniel@zuster.org> Rename clang to clang-cc.

Tests and drivers updated, still need to shuffle dirs.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
7f0f5dce3adcfce88d5c9a0ad0146a33c01a1e8f 04-Mar-2009 Eli Friedman <eli.friedman@gmail.com> Check that the return type for function definitions is complete.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66027 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
04495c859f81e440748a9b86baa2913461652bb0 24-Feb-2009 Douglas Gregor <dgregor@apple.com> Improve merging of function declarations. Specifically:

- When we are declaring a function in local scope, we can merge with
a visible declaration from an outer scope if that declaration
refers to an entity with linkage. This behavior now works in C++
and properly ignores entities without linkage.
- Diagnose the use of "static" on a function declaration in local
scope.
- Diagnose the declaration of a static function after a non-static
declaration of the same function.
- Propagate the storage specifier to a function declaration from a
prior declaration (PR3425)
- Don't name-mangle "main"



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65360 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
18d76c27176dcb9f4be4eaf7768100075f180f3f 04-Feb-2009 Douglas Gregor <dgregor@apple.com> Note the Radar number that corresponds to PR3137

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63754 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
0e8aaaf67b0c172e5a55cded30b80a83d3bd477f 04-Feb-2009 Eli Friedman <eli.friedman@gmail.com> Test for PR3137.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63749 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
be109b3e768b70f9efb106d25d6b5a2c72c5a9b8 23-Jan-2009 Douglas Gregor <dgregor@apple.com> Handle any undeclared parameters in a K&R-style function with a
special action, inside function prototype scope. This avoids confusion
when we try to inject these parameters into the scope of the function
body before the function itself has been added to the surrounding
scope. Fixes <rdar://problem/6097326>.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62849 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
65ce04bef06696379682410f399f37b43996d824 18-Dec-2008 Chris Lattner <sabre@nondot.org> Merge function-return.c into function.c

Fix PR2790 by making a warning an EXTWARN instead of EXTENSION.
Add a new EXTENSION warning for "return (some void expression);"


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61187 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
777f07b6cd595bb0922e05768e5703fbc92b5695 17-Dec-2008 Chris Lattner <sabre@nondot.org> diagnose C99 6.9.1p5, C arguments in definitions that are lacking
a name. This implements PR3208.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61127 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
5f4a6829dc58cab2f76e2b98492859aa3b91e3f2 24-Nov-2008 Chris Lattner <sabre@nondot.org> Make all the 'redefinition' diagnostics more consistent, and make the
"previously defined here" diagnostics all notes.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59920 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
d658b562e80d6ef7a1118e34ff12802c6e2fcced 05-Apr-2008 Chris Lattner <sabre@nondot.org> Fix handling of implicit int, resolving PR2012 and reverting (and
subsuming) my patch for PR1999.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49251 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
5280408ab323a213ac63d5b557475ea5037aa553 17-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR2042. One remaining issue: we don't currently diagnose

int foobar(int);
int foobar() {}

which requires ifdef'ing out a testcase in predefined-function.c.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47236 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
f963339f63e37057c7f397b3ecf5bfb49f6b48b9 15-Feb-2008 Eli Friedman <eli.friedman@gmail.com> Get rid of outdated code that masks type errors. Fixes PR2036.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47154 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
99d724f6a31b5521ded95adf10ef7f3c62a0b18e 11-Feb-2008 Chris Lattner <sabre@nondot.org> Fix PR1999, by emitting a hard error only if an argument declarator is completely
missing. Otherwise, it is an implicit int case, which is valid in c90 and invalid
elsewhere, but accepted as an extension.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46938 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
868d08f9e97eb013600199594745b9997150be8f 31-Jan-2008 Chris Lattner <sabre@nondot.org> Fix a bogus test


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46602 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
2565eeff7b0d2310fb2924ce96a54302b0dfa5af 29-Jan-2008 Steve Naroff <snaroff@apple.com> Tighten up ASTContext::typesAreCompatible()...it needs to make sure the qualifiers match. The comment and C99 citation for this routine were correct...the code needed to conform to the comment/spec. This fixes the test added below.

Tightening up this routine forced tweaks to Sema::CheckSubtractionOperands() and Sema::CheckCompareOperands(). For example, they both need to operate on the unqualified pointee...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46522 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
ba03eda1599dd89da935a2b46da10659afe46add 29-Jan-2008 Steve Naroff <snaroff@apple.com> Fix bz1950. ASTContext::functionTypesAreCompatible() needs to operate on the unqualified parameter types (per C99 6.7.5.3p15).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@46472 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
1adb88370beab45af2f065afe86b51ccd59ec50d 14-Jan-2008 Chris Lattner <sabre@nondot.org> Fix ASTContext::typesAreCompatible when analyzing a function type with
proto and function type without proto. It would never call
'functionTypesAreCompatible' because they have different type classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45952 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c
529bd02affa96a311dd9ab131f2ab4d833017fb7 02-Jan-2008 Chris Lattner <sabre@nondot.org> When promoting array to pointer for argument, don't lose type qualifiers.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45510 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/function.c