a4de17562d13d7a8188108243c4cfbd52f33229a |
|
04-Mar-2016 |
Pirama Arumuga Nainar <pirama@google.com> |
Update aosp/master clang for rebase to r256229 http://b/26987366 (cherry picked from commit 87d948ecccffea9e9e37d0d053b246e2d6d6c47b) Change-Id: I10ca401a280e905253aafabad9118693a2f24ffb
/external/clang/test/Sema/inline.c
|
24146975f1af8c1b4b14e8545f218129d0e7dfeb |
|
22-Aug-2013 |
Eli Friedman <eli.friedman@gmail.com> |
Split isFromMainFile into two functions. Basically, isInMainFile considers line markers, and isWrittenInMainFile doesn't. Distinguishing between the two is useful when dealing with files which are preprocessed files or rewritten with -frewrite-includes (so we don't, for example, print useless warnings). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188968 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.c
|
b421d926cdc632489915d39556f04c14f59d2392 |
|
02-Apr-2013 |
John McCall <rjmccall@apple.com> |
Add -Wstatic-local-in-inline, which warns about using a static local variable in a C99 inline (but not static-inline or extern-inline) function definition. The standard doesn't actually say that this doesn't apply to "extern inline" definitions, but that seems like a useful extension, and it at least doesn't have the obvious flaw that a static mutable variable in an externally-available definition does. rdar://13535367 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178520 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.c
|
10caec2600089449b58c065d56fc449d095b4536 |
|
13-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
c: small refactoring of checking for __attribute__(const)) per Richard's comment. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161786 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.c
|
a7846852ba8b2b53664a674a41d116e0419d8768 |
|
13-Aug-2012 |
Fariborz Jahanian <fjahanian@apple.com> |
c: make __has_attribute(const) work for const function attribute. // rdar://10253857 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161767 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.c
|
05233276b5b0d76e9ebd75eaa2709dff9b316590 |
|
21-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Don't warn for -Wstatic-in-inline if the used function is also inline. Also, don't warn if the used function is __attribute__((const)), in which case it's not supposed to use global variables anyway. The inline-in-inline thing is a heuristic, and one that's possibly incorrect fairly often because the function being inlined could definitely use global variables. However, even some C standard library functions are written using other (trivial) static-inline functions in the headers, and we definitely don't want to be warning on that (or on anything that /uses/ these trivial inline functions). So we're using "inlined" as a marker for "fairly trivial". (Note that __attribute__((pure)) does /not/ guarantee safety like ((const), because ((const)) does not guarantee that global variables are not being used, and the warning is about globals not being shared across TUs.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158898 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.c
|
07c877de7bbd1e0f04c34414dff0dcd7a124f2c7 |
|
20-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Reword -Winternal-linkage-in-inline, and rename it to -Wstatic-in-inline. Now that this is a C-only warning, we can use "static" instead of "internal linkage", which is a term developers are probably more familiar with. This makes for a better warning message. The warning name was changed to match, since "internal linkage" is not mentioned in the warning text anymore. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158853 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.c
|
c4429b9ee5045525f532d00e820a81b7eeac28f8 |
|
19-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Change -Winternal-linkage-in-inline from ExtWarn to Warning in C++. Per post-commit review, it's not appropriate to use ExtWarn in C++, because we can't prove that the inline function will actually be defined in more than one place (and thus we can't prove that this violates the ODR). This removes the warning entirely from uses in the main source file in C++. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158689 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.c
|
0eb3f45a92f706d50de55aefb19d66febfba78aa |
|
19-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Support -Winternal-linkage-in-inline in C++ code. This includes treating anonymous namespaces like internal linkage, and allowing const variables to be used even if internal. The whole thing's been broken out into a separate function to avoid nested ifs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158683 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.c
|
11b46a0a49075f338eb4849c2b7d680945be9250 |
|
18-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Allow internal decls in inline functions if the function is in the main file. This handles the very common case of people writing inline functions in their main source files and not tagging them as inline. These cases should still behave as the user intended. (The diagnostic is still emitted as an extension.) I'm reworking this code anyway to account for C++'s equivalent restriction in [basic.def.odr]p6, but this should get some bots back to green. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158666 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.c
|
106af9e86adbbb3a05f2c339d509fcd3b4274504 |
|
15-Jun-2012 |
Jordan Rose <jordan_rose@apple.com> |
Warn when a static variable is referenced in a non-static inline function. This is explicitly forbidden in C99 6.7.4p3. This is /not/ forbidden in C++, probably because by default file-scope const/constexpr variables have internal linkage, while functions have external linkage. There's also the issue of anonymous namespaces to consider. Nevertheless, there should probably be a similar warning, since the semantics of inlining a function that references a variable with internal linkage do not seem well-defined. <rdar://problem/11577619> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158531 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.c
|
eca3ed7490300ae31dab178d11d70953e96a9e4e |
|
14-Jun-2011 |
Eli Friedman <eli.friedman@gmail.com> |
Make __gnu_inline__ functions in gnu99 mode work the same way as inline functions in gnu89 mode in terms of redefinitions. rdar://9559708 . git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132953 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.c
|
f3f8d2a52ebc0acbe6269a0302f90c21668e2404 |
|
18-Feb-2010 |
Charles Davis <cdavis@mines.edu> |
Allow redefinitions of extern inline functions in GNU89 mode, just as GCC does. Fixes PR5253. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@96553 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.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/inline.c
|
85a5319ea4b5c916d7dd665e84af61e4a8a0b9c2 |
|
07-Apr-2009 |
Eli Friedman <eli.friedman@gmail.com> |
Diagnose uses of function specifiers on declarations which don't declare functions. Fixes PR3941. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68541 91177308-0d34-0410-b5e6-96231b3b80d8
/external/clang/test/Sema/inline.c
|