- Apr 13, 2009
-
-
Chris Lattner authored
llvm-svn: 68921
-
Chris Lattner authored
to isValidAfterIdentifierInDeclarator, as suggested by Sebastian. llvm-svn: 68920
-
Chris Lattner authored
that I noticed working on other things. Instead of emitting: t2.cc:1:8: error: use of undeclared identifier 'g' int x(*g); ^ t2.cc:1:10: error: expected ')' int x(*g); ^ t2.cc:1:6: note: to match this '(' int x(*g); ^ We now only emit: t2.cc:1:7: warning: type specifier missing, defaults to 'int' int x(*g); ^ Note that the example in SemaCXX/nested-name-spec.cpp:f4 is still not great, we now produce both of: void f4(undef::C); // expected-error {{use of undeclared identifier 'undef'}} \ expected-error {{variable has incomplete type 'void'}} The second diagnostic should be silenced by something getting marked invalid. I don't plan to fix this though. llvm-svn: 68919
-
Chris Lattner authored
llvm-svn: 68918
-
Chris Lattner authored
this allows downstream diags to be properly silenced. llvm-svn: 68917
-
Chris Lattner authored
return null. llvm-svn: 68916
-
- Apr 12, 2009
-
-
Chris Lattner authored
struct xyz { int y; }; enum abc { ZZZ }; static xyz b; abc c; we used to produce: t2.c:4:8: error: unknown type name 'xyz' static xyz b; ^ t2.c:5:1: error: unknown type name 'abc' abc c; ^ we now produce: t2.c:4:8: error: use of tagged type 'xyz' without 'struct' tag static xyz b; ^ struct t2.c:5:1: error: use of tagged type 'abc' without 'enum' tag abc c; ^ enum GCC produces the normal: t2.c:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘b’ t2.c:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’ rdar://6783347 llvm-svn: 68914
-
Chris Lattner authored
if a decl is invalid, it isn't added to the Decls array, so we need to pass in Decls.size() to avoid reading uninit memory. llvm-svn: 68913
-
rdar://6759604Chris Lattner authored
which tries to do better error recovery when it is "obvious" that an identifier is a mis-typed typename. In this case, we try to parse it as a typename instead of as the identifier in a declarator, which gives us several options for better error recovery and immediately makes diagnostics more useful. For example, we now produce: t.c:4:8: error: unknown type name 'foo_t' static foo_t a = 4; ^ instead of: t.c:4:14: error: invalid token after top level declarator static foo_t a = 4; ^ Also, since we now parse "a" correctly, we make a decl for it, preventing later uses of 'a' from emitting things like: t.c:12:20: error: use of undeclared identifier 'a' int bar() { return a + b; } ^ I'd really appreciate any scrutiny possible on this, it is a tricky area. llvm-svn: 68911
-
Chris Lattner authored
llvm-svn: 68909
-
Chris Lattner authored
exit at the first decl found that creates a scope, don't evaluate decl_end() every iteration. llvm-svn: 68908
-
Chris Lattner authored
llvm-svn: 68907
-
Fariborz Jahanian authored
llvm-svn: 68904
-
Sebastian Redl authored
llvm-svn: 68903
-
Sebastian Redl authored
Parse deleted member functions. Parsing member declarations goes through a different code path that I forgot previously. Implement the rvalue reference overload dance for returning local objects. Returning a local object first tries to find a move constructor now. The error message when no move constructor is defined (or is not applicable) and the copy constructor is deleted is quite ugly, though. llvm-svn: 68902
-
Chris Lattner authored
llvm-svn: 68900
-
-
Chris Lattner authored
llvm-svn: 68898
-
Chris Lattner authored
llvm-svn: 68897
-
Chris Lattner authored
llvm-svn: 68896
-
Chris Lattner authored
llvm-svn: 68895
-
rdar://6771034Chris Lattner authored
list of another protocol definition. This warning is very noisy and GCC doesn't produce it so existing code doesn't expect it. llvm-svn: 68894
-
Chris Lattner authored
llvm-svn: 68893
-
Chris Lattner authored
or "Objective-C interface types" etc. llvm-svn: 68892
-
-
Chris Lattner authored
macro definitions. llvm-svn: 68884
-
Chris Lattner authored
llvm-svn: 68883
-
- Apr 11, 2009
-
-
Chris Lattner authored
macro deserialization. We now correctly install II's in tokens, handle function-like macros, etc. llvm-svn: 68882
-
Chris Lattner authored
llvm-svn: 68881
-
Chris Lattner authored
@property int x; associate the location of X with the property decl, not the location of the @. Also, pass this info along to the synthesized ParmVarDecls so that redefinition and other diagnostics can use it. This eliminates a fixme. llvm-svn: 68880
-
Chris Lattner authored
that it is plumbed through Sema. On a file from growl, we used to emit: t.mi:107059:1: warning: conflicting types for 'removePluginHandler:forPluginTypes:' - (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions { ^ t.mi:105280:1: note: previous definition is here - (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types; ^ now we produce: t.mi:107059:55: warning: conflicting parameter types in implementation of 'removePluginHandler:forPluginTypes:': 'id<NSObject>' vs 'id<GrowlPluginHandler>' - (void) removePluginHandler:(id <GrowlPluginHandler>)handler forPluginTypes:(NSSet *)extensions { ^ t.mi:105280:45: note: previous definition is here - (void) removePluginHandler:(id <NSObject>)handler forPluginTypes:(NSSet *)types; ^ We still don't have proper loc info for properties, hence the FIXME. rdar://6782494 llvm-svn: 68879
-
Chris Lattner authored
llvm-svn: 68878
-
Chris Lattner authored
llvm-svn: 68877
-
Chris Lattner authored
to their arguments. llvm-svn: 68876
-
Chris Lattner authored
a block without a prototype should still coerce a return in it to use the declared return type. llvm-svn: 68875
-
Chris Lattner authored
llvm-svn: 68874
-
Chris Lattner authored
llvm-svn: 68873
-
Chris Lattner authored
1) improve localizability by not passing english strings in. 2) improve location for arguments. 3) print the objc type being passed. Before: method-bad-param.m:15:1: error: Objective-C type cannot be passed by value -(void) my_method:(foo) my_param ^ after: method-bad-param.m:15:25: error: Objective-C interface type 'foo' cannot be passed by value -(void) my_method:(foo) my_param ^ llvm-svn: 68872
-
Chris Lattner authored
information in a little struct instead of individually. While we're at it, add per-argument loc info and attribute info. llvm-svn: 68871
-
Fariborz Jahanian authored
llvm-svn: 68870
-