summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/implicit-casts.c
Commit message (Collapse)AuthorAgeFilesLines
* Improve diagnostics when we fail to convert from a source type to aDouglas Gregor2010-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Prep for new warning.Mike Stump2009-07-221-0/+1
| | | | llvm-svn: 76709
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-1/+1
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* Fix PR2042. One remaining issue: we don't currently diagnoseChris Lattner2008-02-171-1/+1
| | | | | | | | | int foobar(int); int foobar() {} which requires ifdef'ing out a testcase in predefined-function.c. llvm-svn: 47236
* add comments for the various AssignConvertType's, and split int->pointer ↵Chris Lattner2008-01-041-1/+1
| | | | | | from pointer->int. llvm-svn: 45591
* Merge all the 'assignment' diagnostic code into one routine, decloning Chris Lattner2008-01-041-2/+2
| | | | | | | | | | | | | it from several places. This merges the diagnostics, making them more uniform and fewer in number. This also simplifies and cleans up the code. Some highlights: 1. This removes a bunch of very-similar diagnostics. 2. This renames AssignmentCheckResult -> AssignConvertType 3. This merges PointerFromInt + IntFromPointer which were always treated the same. 4. This updates a bunch of test cases that have minor changes to the produced diagnostics. llvm-svn: 45589
* rename -parse-ast-print to -ast-printChris Lattner2007-10-111-1/+1
| | | | | | | rename -parse-ast-dump to -ast-dump remove -parse-ast, which is redundant with -fsyntax-only llvm-svn: 42852
* Removed option "-parse-ast-check" from clang driver. This is now implementedTed Kremenek2007-09-261-1/+1
| | | | | | | | | | | | using "-parse-ast -verify". Updated all test cases (using a sed script) that invoked -parse-ast-check to now use -parse-ast -verify. Fixed a bug where using "-verify" instead of "-parse-ast-check" would not correctly create the DiagClient needed to accumulate diagnostics. llvm-svn: 42365
* Change Expr::isLvalue() to properly deal with ImplicitCastExpr's.Steve Naroff2007-08-251-0/+20
This fixes the following bug... t.c:1:31: error: expression is not assignable short x; void foo(char c) { x += c; } This case, among others are now captured in implicit-casts.c. llvm-svn: 41402
OpenPOWER on IntegriCloud