Daniel Dunbar
c3e7cff6d3
Attributes on block functions were not being set.
...
- <rdar://problem/6800351> clang not producing correct large struct
return code for Blocks
llvm-svn: 69337
2009-04-17 00:48:04 +00:00
Douglas Gregor
71517c47e6
PCH support for do-while and for loops
...
llvm-svn: 69334
2009-04-17 00:29:51 +00:00
Douglas Gregor
e24cbc0f4b
PCH support for while and continue statements
...
llvm-svn: 69332
2009-04-17 00:16:09 +00:00
Mike Stump
5c3285b6fb
Fixup semantic analysis for nested blocks, and allow block literal
...
expressions that can be of static duration to be returned.
Radar 6786551
llvm-svn: 69331
2009-04-17 00:09:41 +00:00
Anders Carlsson
b7f8f594f3
Implement basic code generation of constructor calls. We can now compile:
...
struct S {
S(int, int);
};
void f() {
S s(10, 10);
}
llvm-svn: 69330
2009-04-17 00:06:03 +00:00
Douglas Gregor
a9af1d13da
PCH support for the first batch of statements, including null,
...
compound, case, default, if, switch, and break statements.
llvm-svn: 69329
2009-04-17 00:04:06 +00:00
Anders Carlsson
e8eeffdf16
Add GetAddrOfCXXConstructor and use it.
...
llvm-svn: 69328
2009-04-16 23:57:24 +00:00
Anders Carlsson
2f3278bc09
Add constructor getter to CXXTemporaryObjectExpr.
...
llvm-svn: 69327
2009-04-16 23:53:22 +00:00
Anders Carlsson
e6840d84df
If a class has a non-trivial constructor that doesn't take any arguments, we will now make an implicit CXXTemporaryObjectExpr. So
...
struct S {
S();
};
void f() {
S s;
}
's' here will implicitly be declared as.
S s = S();
llvm-svn: 69326
2009-04-16 23:50:50 +00:00
Chris Lattner
302279ed06
-Wall is -Wmost -Wparentheses
...
llvm-svn: 69324
2009-04-16 23:30:16 +00:00
Daniel Dunbar
f2df7c283f
Driver: Allow using clang as a precompiler, even if it is an
...
unsupported arch.
llvm-svn: 69322
2009-04-16 23:10:13 +00:00
Douglas Gregor
573b92468e
Clean up the declaration-decoding step in the PCH reader, using the
...
same ueber-easy visitor scheme used for expressions/statements.
llvm-svn: 69320
2009-04-16 22:29:51 +00:00
Douglas Gregor
8f45df58b3
Prepare PCH reader and writer for (de-)serialization of statements. No
...
functionality change.
llvm-svn: 69319
2009-04-16 22:23:12 +00:00
Fariborz Jahanian
68c4c61be8
Removed a no longer needed FIXME comment.
...
llvm-svn: 69315
2009-04-16 21:49:16 +00:00
Steve Naroff
a0c32704e2
Fix <rdar://problem/6765383> clang-6: clang does not appear to support declaring a static Block 'const'.
...
llvm-svn: 69306
2009-04-16 19:02:57 +00:00
Fariborz Jahanian
bcf548760e
Category method synbols must be qualified by gategory name to
...
match gcc's.
llvm-svn: 69305
2009-04-16 18:34:20 +00:00
Sebastian Redl
1a99f441e6
Fix a crash bug when comparing overload quality of conversion operators with conversion constructors.
...
Remove an atrocious amount of trailing whitespace in the overloaded operator mangler. Sorry, couldn't help myself.
Change the DeclType parameter of Sema::CheckReferenceInit to be passed by value instead of reference. It wasn't changed anywhere.
Let the parser handle C++'s irregular grammar around assignment-expression and conditional-expression.
And finally, the reason for all this stuff: implement C++ semantics for the conditional operator. The implementation is complete except for determining lvalueness.
llvm-svn: 69299
2009-04-16 17:51:27 +00:00
Eli Friedman
8d25b096fa
Attempt to fix a read-after-free running test/Sema/designated-initializers.c.
...
Douglas, can you check that this is doing the right thing?
llvm-svn: 69298
2009-04-16 17:49:48 +00:00
Eli Friedman
027aa3cb0e
Force target triple for test depending on __weak.
...
llvm-svn: 69297
2009-04-16 17:33:37 +00:00
Anders Carlsson
8798bd1bf9
When we create an implicit CXXTemporaryObjectExpr we don't need to check that it's a valid init. Instead, just set it as the VarDecl's initializer.
...
llvm-svn: 69292
2009-04-16 15:50:16 +00:00
Daniel Dunbar
426b5cf16a
Ensure that the most recent declaration of a tentative definition wins
...
when generating a common definition.
llvm-svn: 69287
2009-04-16 15:34:14 +00:00
Daniel Dunbar
092f0ccd9c
Pass -fdiagnostics-show-option to clang-cc by default.
...
- <rdar://problem/6796848> implement -fdiagnostics-show-option
llvm-svn: 69276
2009-04-16 06:32:38 +00:00
Chris Lattner
f9c2dbb233
other half of 69274
...
llvm-svn: 69275
2009-04-16 06:17:55 +00:00
Chris Lattner
b666a27d24
split diagnostic group definitions out into their own file.
...
llvm-svn: 69274
2009-04-16 06:17:18 +00:00
Chris Lattner
2d49eed816
optimize and comment GetDiagInfo.
...
llvm-svn: 69273
2009-04-16 06:13:46 +00:00
Chris Lattner
6c440329f1
merge several scattered tables into StaticDiagInfo.
...
llvm-svn: 69272
2009-04-16 06:07:15 +00:00
Chris Lattner
6a64cc6776
Implement Diagnostic::getWarningOptionForDiag with information from tblgen,
...
this implements -fdiagnostics-show-option in clang-cc.
llvm-svn: 69271
2009-04-16 06:00:24 +00:00
Chris Lattner
a538967177
tblgen is now passing diagnostic group information in the .inc file, ignore it everywhere.
...
llvm-svn: 69269
2009-04-16 05:52:14 +00:00
Chris Lattner
22cb818913
implement framework for -fdiagnostics-show-option, but tblgen isn't
...
passing down the right info yet.
llvm-svn: 69268
2009-04-16 05:44:38 +00:00
Anders Carlsson
805ab5a746
Disable the code I added before until I understand what's causing default2.cpp to fail.
...
llvm-svn: 69267
2009-04-16 05:35:41 +00:00
Chris Lattner
b8e73158e1
move handling of -pedantic and -pedantic-errors into Diagnostics,
...
out of Warnings.cpp. This simplifies warnings.cpp and makes it more
efficient.
llvm-svn: 69266
2009-04-16 05:04:32 +00:00
Chris Lattner
f9150bac01
arrange for -Wno-error=foo warnings to be immune to -Werror as
...
they are supposed to be.
llvm-svn: 69265
2009-04-16 04:32:54 +00:00
Chris Lattner
411c0ffe5d
change mappings to distinguish between "unset", "set by the user" and
...
"set to the default value".
llvm-svn: 69264
2009-04-16 04:12:40 +00:00
Daniel Dunbar
08e82f955a
Driver: Remove the majority of -W* options, the driver doesn't
...
generally need to know about these now we don't have to hold
clang-cc's hand.
llvm-svn: 69263
2009-04-16 04:00:30 +00:00
Chris Lattner
af73cf6363
use getDiagnosticLevel instead of getDiagnosticMapping, which
...
is about to become private.
llvm-svn: 69262
2009-04-16 03:59:32 +00:00
Daniel Dunbar
b4b3709c5b
Driver: Forward -W* to clang, it can handle all these itself now.
...
Remove clang_W_Group and clang_ignored_W_Group.
llvm-svn: 69261
2009-04-16 03:44:10 +00:00
Chris Lattner
e4f753233b
switch DiagMappings *back* to 4 bits per diag.
...
llvm-svn: 69260
2009-04-16 03:41:37 +00:00
Chris Lattner
169fd70999
implement -Wno-#warnings etc.
...
llvm-svn: 69259
2009-04-16 03:27:53 +00:00
Douglas Gregor
6d955a9d25
Eliminate pch::TYPE_ATTR, which is never used
...
llvm-svn: 69256
2009-04-16 02:45:14 +00:00
Douglas Gregor
4c5cd33527
PCH support for CompoundLiteralExpr. This is the last C expression
...
that does not require PCH support for statements. Only AddrLabelExpr,
StmtExpr, and BlockExpr remain (for C).
llvm-svn: 69255
2009-04-16 02:33:48 +00:00
Douglas Gregor
38676d50dc
PCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.
...
llvm-svn: 69251
2009-04-16 00:55:48 +00:00
Chris Lattner
e82c3cc848
when tblgen fills in all the subgroup info, clang is ready for it.
...
This depends on r69249 of llvm.
llvm-svn: 69250
2009-04-16 00:53:55 +00:00
Chris Lattner
de1423883a
add scafolding to represent heirarchical warnings, start with -Wall.
...
llvm-svn: 69246
2009-04-16 00:23:21 +00:00
Anders Carlsson
fe63dc52f9
Add support for the __has_trivial_constructor type trait.
...
llvm-svn: 69245
2009-04-16 00:08:20 +00:00
Douglas Gregor
a3c5590ec2
PCH support for ShuffleVectorExpr and BlockDeclRefExpr
...
llvm-svn: 69244
2009-04-16 00:01:45 +00:00
Douglas Gregor
8693ec4e58
PCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.
...
llvm-svn: 69242
2009-04-15 23:33:31 +00:00
Douglas Gregor
2ebf8717a5
PCH support for ExtVectorElementExpr and VAArgExpr.
...
llvm-svn: 69240
2009-04-15 23:02:49 +00:00
Chris Lattner
3fd869cc6c
make unknown warnings a warning, not an error.
...
llvm-svn: 69239
2009-04-15 22:48:58 +00:00
Chris Lattner
eb8ec21dc9
add anonymous groups for all the warning command line flags that the clang
...
driver accepts and discards.
llvm-svn: 69238
2009-04-15 22:47:03 +00:00
Douglas Gregor
d4ed114e23
PCH support for CompoundAssignOperator and ConditionalOperator
...
llvm-svn: 69237
2009-04-15 22:40:36 +00:00