summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/block-call.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix a block sema bug where result type of initializerFariborz Jahanian2011-02-111-1/+1
| | | | | | | | | is unqualified but its initialized is qualified. This is for c only and fixes the imm. problem. c++ is more involved and is wip. // rdar://8979379 llvm-svn: 125386
* make clang print types as "const int *" instead of "int const*",Chris Lattner2010-09-051-1/+1
| | | | | | | which is should have done from the beginning. As usual, the most fun with this sort of change is updating all the testcases. llvm-svn: 113090
* Wire up '-Wignored-qualifiers' to the warning on 'const' in 'const int f()'.Chandler Carruth2010-07-141-3/+2
| | | | | | | | | This flag and warning match GCC semantics. Also, move it to -Wextra as this is a largely cosmetic issue and doesn't seem to mask problems. Subsequent fixes to the tests which no longer by default emit the warning. Added explicit test cases for both C and C++ behavior with the warning turned on. llvm-svn: 108325
* When forming a function call or message send expression, be sure toDouglas Gregor2010-07-131-2/+4
| | | | | | | | | | | | | | | | | strip cv-qualifiers from the expression's type when the language calls for it: in C, that's all the time, while C++ only does it for non-class types. Centralized the computation of the call expression type in QualType::getCallResultType() and some helper functions in other nodes (FunctionDecl, ObjCMethodDecl, FunctionType), and updated all relevant callers of getResultType() to getCallResultType(). Fixes PR7598 and PR7463, along with a bunch of getResultType() call sites that weren't stripping references off the result type (nothing stripped cv-qualifiers properly before this change). llvm-svn: 108234
* Improve diagnostics like "initializing <type> from an expression ofDouglas Gregor2010-04-091-5/+5
| | | | | | | type..." with "initializing <type> with an expression of type...", which reads better. Thanks to John for the improved wording. llvm-svn: 100873
* Improve diagnostics when we fail to convert from a source type to aDouglas Gregor2010-04-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | destination type for initialization, assignment, parameter-passing, etc. The main issue fixed here is that we used rather confusing wording for diagnostics such as t.c:2:9: warning: initializing 'char const [2]' discards qualifiers, expected 'char *' [-pedantic] char *name = __func__; ^ ~~~~~~~~ We're not initializing a 'char const [2]', we're initializing a 'char *' with an expression of type 'char const [2]'. Similar problems existed for other diagnostics in this area, so I've normalized them all with more precise descriptive text to say what we're initializing/converting/assigning/etc. from and to. The warning for the code above is now: t.c:2:9: warning: initializing 'char *' from an expression of type 'char const [2]' discards qualifiers [-pedantic] char *name = __func__; ^ ~~~~~~~~ Fixes <rdar://problem/7447179>. llvm-svn: 100832
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-1/+1
| | | | | | | | | - 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). llvm-svn: 91446
* Remove tabs, and whitespace cleanups.Mike Stump2009-09-091-28/+24
| | | | llvm-svn: 81346
* Don't allow defining a block with a non-prototype type. Remove a Eli Friedman2009-06-081-2/+2
| | | | | | | | | | hack which introduces some strange inconsistencies in compatibility for block pointers. Note that unlike an earlier revision proposed on cfe-commits, this patch still allows declaring block pointers without a prototype. llvm-svn: 73041
* Tighten up blocks type checking. This was discussed back in theMike Stump2009-04-211-4/+4
| | | | | | r56595 timeframe, but left undone. Radar 6812711 llvm-svn: 69745
* Fix block comparisons. Radar 6732116.Mike Stump2009-04-011-1/+1
| | | | llvm-svn: 68171
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Fix <rdar://problem/6418623> Bogus block type compatibility warning.Steve Naroff2008-12-101-1/+1
| | | | llvm-svn: 60842
* instead of forcing blocks on by default, make them default to off, but letChris Lattner2008-12-041-1/+1
| | | | | | | | specific targets default them to on. Default blocks to on on 10.6 and later. Add a -fblocks option that allows the user to override the target's default. Use -fblocks in the various testcases that use blocks. llvm-svn: 60563
* Downgrade incompatible block pointer error to a warning (to be consistent ↵Steve Naroff2008-09-241-6/+6
| | | | | | with incompatible pointer warnings in general). llvm-svn: 56595
* More type checking for blocks. Still incomplete (will hopefully finish up ↵Steve Naroff2008-09-051-0/+55
this weekend). llvm-svn: 55862
OpenPOWER on IntegriCloud