- Mar 11, 2009
-
-
Chris Lattner authored
llvm-svn: 66598
-
- Mar 10, 2009
-
-
Douglas Gregor authored
definitions. We were rejecting tentative definitions of incomplete (which is bad), and now we don't. This fix is partial because we don't do the end-of-translation-unit initialization for tentative definitions that don't ever have any initializers specified. llvm-svn: 66584
-
Douglas Gregor authored
context of a template-id for which we need to instantiate default template arguments. In the TextDiagnosticPrinter, don't suppress the caret diagnostic if we are producing a non-note diagnostic that follows a note diagnostic with the same location, because notes are (conceptually) a part of the warning or error that comes before them. llvm-svn: 66572
-
Douglas Gregor authored
only print the template instantiation backtrace for the first error. Also, if a base class has failed to type-check during instantiation, just drop that base class and continue on to check other base classes. llvm-svn: 66563
-
Douglas Gregor authored
'struct A<double, int>' In the "template instantiation depth exceeded" message, print "-ftemplate-depth-N" rather than "-ftemplate-depth=N". An unnamed tag type that is declared with a typedef, e.g., typedef struct { int x, y; } Point; can be used as a template argument. Allow this, and check that we get sensible pretty-printing for such things. llvm-svn: 66560
-
Douglas Gregor authored
to a diagnostic that will be invoked after the diagnostic (if it is not suppressed). The hooks are allowed to produce additional diagnostics (typically notes) that provide more information. We should be able to use this to help diagnostic clients link notes back to the diagnostic they clarify. Comments welcome; I'll write up documentation and convert other clients (e.g., overload resolution failures) if there are no screams of protest. As the first client of post-diagnostic hooks, we now produce a template instantiation backtrace when a failure occurs during template instantiation. There's still more work to do to make this output pretty, if that's even possible. llvm-svn: 66557
-
Steve Naroff authored
llvm-svn: 66551
-
Anders Carlsson authored
llvm-svn: 66549
-
Douglas Gregor authored
(default: 99). Beyond this limit, produce an error and consider the current template instantiation a failure. The stack we're building to track the instantiations will, eventually, be used to produce instantiation backtraces from diagnostics within template instantiation. However, we're not quite there yet. This adds a new Clang driver option -ftemplate-depth=NNN, which should eventually be generated from the GCC command-line operation -ftemplate-depth-NNN (note the '-' rather than the '='!). I did not make the driver changes to do this mapping. llvm-svn: 66513
-
Douglas Gregor authored
such as replacing 'T' in vector<T>. There are a few aspects to this: - Extend TemplateArgument to allow arbitrary expressions (an Expr*), and switch ClassTemplateSpecializationType to store TemplateArguments rather than it's own type-or-expression representation. - ClassTemplateSpecializationType can now store dependent types. In that case, the canonical type is another ClassTemplateSpecializationType (with default template arguments expanded) rather than a declaration (we don't build Decls for dependent types). - Split ActOnClassTemplateId into ActOnClassTemplateId (called from the parser) and CheckClassTemplateId (called from ActOnClassTemplateId and InstantiateType). They're smart enough to handle dependent types, now. llvm-svn: 66509
-
- Mar 09, 2009
-
-
Chris Lattner authored
a warning and then threw away the AST. While I'm in there, tighten up the code to actually reject completely bogus cases (sending a message to a struct). We still allow sending a message to an int, which doesn't make sense but GCC allows it and is easy to support. llvm-svn: 66468
-
Steve Naroff authored
This fixes <rdar://problem/6496506> Implement class setter/getter for properties. llvm-svn: 66465
-
Douglas Gregor authored
llvm-svn: 66431
-
Douglas Gregor authored
llvm-svn: 66423
-
Douglas Gregor authored
llvm-svn: 66422
-
Douglas Gregor authored
Rename DiagnoseIncompleteType to RequireCompleteType, and update the documentation to reflect the fact that we can instantiate templates here llvm-svn: 66421
-
Chris Lattner authored
llvm-svn: 66416
-
- Mar 08, 2009
-
-
Chris Lattner authored
llvm-svn: 66387
-
Steve Naroff authored
llvm-svn: 66385
-
Steve Naroff authored
Patch by Jean-Daniel Dupas. Thanks! llvm-svn: 66383
-
Chris Lattner authored
warning to only trigger when there is whitespace or something else after the + as suggested by Eli. llvm-svn: 66370
-
- Mar 07, 2009
-
-
Sebastian Redl authored
llvm-svn: 66335
-
Eli Friedman authored
difficult to come up with a testcase because the code generation for this construct is broken. llvm-svn: 66325
-
Ted Kremenek authored
llvm-svn: 66317
-
Ted Kremenek authored
llvm-svn: 66314
-
Ted Kremenek authored
- Make Selector::getAsIdentifierInfo() private. Using IdentifierInfo* in Selector is an implementation detail that clients shouldn't think about. - Modify diagnostic emission in Sema::ProcessPropertyDecl to not use Selector::getAsIdentifierInfo() (which could crash when IdentifierInfo* is null) and instead use Selector::getAsString(). - Tidy up Selector::getAsString() implementation. llvm-svn: 66313
-
Douglas Gregor authored
struct to an extension warning to match the behavior of GNU C, which addresses the Sema part of PR3671. llvm-svn: 66308
-
Douglas Gregor authored
Use the 'declaration does not declare anything' error when we see an anonymous struct/union declaration outside of a struct or union in C llvm-svn: 66303
-
- Mar 06, 2009
-
-
Douglas Gregor authored
prototype of the same function, where the promoted parameter types in the K&R definition are not compatible with the types in the prototype. Fixes PR2821. llvm-svn: 66301
-
Daniel Dunbar authored
really use pack() instead. - <rdar://problem/6650243> clang warns about '#pragma pack(0)' llvm-svn: 66287
-
Douglas Gregor authored
llvm-svn: 66286
-
Douglas Gregor authored
C and C++. Fixes PR3688. llvm-svn: 66282
-
Daniel Dunbar authored
- Also, diagnose weak applied to types. llvm-svn: 66259
-
Chris Lattner authored
SemaObjC/call-super-2.m:78:29: error: cannot cast 'super' (it isn't an expression) return [(Object <Func> *)super instance_func0]; ~~~~~~~~~~~~~~~~~^ llvm-svn: 66215
-
Chris Lattner authored
llvm-svn: 66214
-
Chris Lattner authored
llvm-svn: 66213
-
- Mar 05, 2009
-
-
Chris Lattner authored
more consistently. llvm-svn: 66210
-
rdar://problem/6301205Steve Naroff authored
Tweak Sema::ActOnMemberReferenceExpr() and Sema::ActOnDeclarationNameExpr() to handle "super." notation for Class methods. llvm-svn: 66185
-
rdar://problem/5982579Steve Naroff authored
Tweak diag for <rdar://problem/5982579> [clang on xcode] (using arch=x86_64): synthesized property 'sdkPath' must either be named the same as a compatible ivar or must explicitly name an ivar. llvm-svn: 66162
-
-