| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
Previously, many error messages would simply be "read-only variable is not
assignable" This change provides more information about why the variable is
not assignable, as well as note to where the const is located.
Differential Revision: http://reviews.llvm.org/D4479
llvm-svn: 234677
|
|
|
|
|
|
|
|
| |
"protected scope" is very unhelpful here and actively confuses users. Instead,
simply state the nature of the problem in the diagnostic: we cannot jump from
here to there. The notes explain nicely why not.
llvm-svn: 217293
|
|
|
|
|
|
|
| |
This patch tries to avoid unrelated changes other than fixing a few
hyphen-related ambiguities in nearby lines.
llvm-svn: 196466
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
diagnostic message are compared. If either is a substring of the other, then
no error is given. This gives rise to an unexpected case:
// expect-error{{candidate function has different number of parameters}}
will match the following error messages from Clang:
candidate function has different number of parameters (expected 1 but has 2)
candidate function has different number of parameters
It will also match these other error messages:
candidate function
function has different number of parameters
number of parameters
This patch will change so that the verification string must be a substring of
the diagnostic message before accepting. Also, all the failing tests from this
change have been corrected. Some stats from this cleanup:
87 - removed extra spaces around verification strings
70 - wording updates to diagnostics
40 - extra leading or trailing characters (typos, unmatched parens or quotes)
35 - diagnostic level was included (error:, warning:, or note:)
18 - flag name put in the warning (-Wprotocol)
llvm-svn: 146619
|
|
|
|
|
|
| |
Radar 8218839.
llvm-svn: 109272
|
|
|
|
| |
llvm-svn: 102163
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
method parameter, provide a note pointing at the parameter itself so
the user does not have to manually look for the function/method being
called and match up parameters to arguments. For example, we now get:
t.c:4:5: warning: incompatible pointer types passing 'long *' to
parameter of
type 'int *' [-pedantic]
f(long_ptr);
^~~~~~~~
t.c:1:13: note: passing argument to parameter 'x' here
void f(int *x);
^
llvm-svn: 102038
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
literal. Fixes radar 7760213.
llvm-svn: 98693
|
|
|
|
| |
llvm-svn: 93945
|
|
|
|
| |
llvm-svn: 93072
|
|
|
|
| |
llvm-svn: 92678
|
|
|
|
| |
llvm-svn: 92677
|
|
|
|
| |
llvm-svn: 92676
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
llvm-svn: 81346
|
|
|
|
| |
llvm-svn: 76709
|
|
|
|
| |
llvm-svn: 76376
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
llvm-svn: 71183
|
|
|
|
| |
llvm-svn: 71171
|
|
|
|
| |
llvm-svn: 71145
|
|
|
|
| |
llvm-svn: 70601
|
|
|
|
| |
llvm-svn: 70452
|
|
|
|
| |
llvm-svn: 69748
|
|
|
|
|
|
| |
r56595 timeframe, but left undone. Radar 6812711
llvm-svn: 69745
|
|
|
|
|
|
| |
working on the previous fix.
llvm-svn: 69742
|
|
|
|
|
|
|
|
| |
mark exactly the blocks which have references that are "live through".
This fixes a rejects valid:
rdar://6808730 - [sema] [blocks] block rejected at global scope
llvm-svn: 69738
|
|
|
|
| |
llvm-svn: 69466
|
|
|
|
|
|
| |
This fixes a crash on invalid (test10). rdar://6805469
llvm-svn: 69465
|
|
|
|
| |
llvm-svn: 69460
|
|
|
|
| |
llvm-svn: 68171
|
|
|
|
|
|
| |
Tests and drivers updated, still need to shuffle dirs.
llvm-svn: 67602
|
|
|
|
| |
llvm-svn: 64074
|
|
|
|
|
|
|
|
| |
the containing block. Introduce a new getCurFunctionOrMethodDecl
method to check to see if we're in a function or objc method.
Minor cleanups to other related places. This fixes rdar://6405429.
llvm-svn: 60564
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
are trying to use the old GCC "casts as lvalue" extension. We don't and
will hopefully never support this.
llvm-svn: 59460
|
|
|
|
|
|
| |
move it to its own predicate to make it more clear.
llvm-svn: 57796
|
|
|
|
|
|
| |
don't need a BlockDeclRefExpr.
llvm-svn: 56766
|
|
this weekend).
llvm-svn: 55862
|