]> granicus.if.org Git - clang/log
clang
15 years agoadd a virtual method to DiagnosticClient to get rid of some fragile
Chris Lattner [Fri, 17 Apr 2009 20:16:08 +0000 (20:16 +0000)]
add a virtual method to DiagnosticClient to get rid of some fragile
casting in clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69377 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH tests for va_arg expressions. Verified that the blocks test does create a BlockDe...
Douglas Gregor [Fri, 17 Apr 2009 20:06:59 +0000 (20:06 +0000)]
PCH tests for va_arg expressions. Verified that the blocks test does create a BlockDeclRefExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69376 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a crash on invalid by making ActOnDeclarator create decl with
Chris Lattner [Fri, 17 Apr 2009 19:32:54 +0000 (19:32 +0000)]
fix a crash on invalid by making ActOnDeclarator create decl with
a dummy *function* type when it is recovering and knows it needs
a function.  rdar://6802350 - clang crash on invalid input

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69374 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for blocks
Douglas Gregor [Fri, 17 Apr 2009 19:21:43 +0000 (19:21 +0000)]
PCH support for blocks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69373 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agowire up comment diagnostics to -Wcomment, add it to -Wall. Now
Chris Lattner [Fri, 17 Apr 2009 19:09:26 +0000 (19:09 +0000)]
wire up comment diagnostics to -Wcomment, add it to -Wall.  Now
you can silence these with -Wno-all or -Wno-comment, but they
still default to on.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69372 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for GNU statement expressions
Douglas Gregor [Fri, 17 Apr 2009 19:05:30 +0000 (19:05 +0000)]
PCH support for GNU statement expressions

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69370 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for indirect gotos and address-of-label expressions.
Douglas Gregor [Fri, 17 Apr 2009 18:58:21 +0000 (18:58 +0000)]
PCH support for indirect gotos and address-of-label expressions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69369 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadjust for the new -Wvector-conversions option
Chris Lattner [Fri, 17 Apr 2009 18:39:25 +0000 (18:39 +0000)]
adjust for the new -Wvector-conversions option

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69366 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomove a vector conversion warning to be diabled by default (like gcc),
Chris Lattner [Fri, 17 Apr 2009 18:28:37 +0000 (18:28 +0000)]
move a vector conversion warning to be diabled by default (like gcc),
but add it to -Wall (unlike gcc) and give it a controlling group
(-Wvector-conversions).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69365 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for labels and goto.
Douglas Gregor [Fri, 17 Apr 2009 18:18:49 +0000 (18:18 +0000)]
PCH support for labels and goto.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69364 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate Xcode project with some PCH related headers.
Steve Naroff [Fri, 17 Apr 2009 18:02:59 +0000 (18:02 +0000)]
Update Xcode project with some PCH related headers.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69363 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix misspelt attribute.
Chris Lattner [Fri, 17 Apr 2009 17:55:23 +0000 (17:55 +0000)]
fix misspelt attribute.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69362 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix rdar://6800926 - crash compiling non-fragile _Bool bitfield ivar,
Chris Lattner [Fri, 17 Apr 2009 17:46:19 +0000 (17:46 +0000)]
Fix rdar://6800926 - crash compiling non-fragile _Bool bitfield ivar,
the functional change here is changing ConvertType -> ConvertTypeForMem
so that we handle i1 fields properly as memory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69361 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotidy some code.
Chris Lattner [Fri, 17 Apr 2009 17:44:48 +0000 (17:44 +0000)]
tidy some code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69360 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoclean up run lines.
Chris Lattner [Fri, 17 Apr 2009 17:43:56 +0000 (17:43 +0000)]
clean up run lines.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69359 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd basic support for building DiagnosticGroups.inc with cmake
Chris Lattner [Fri, 17 Apr 2009 17:04:48 +0000 (17:04 +0000)]
add basic support for building DiagnosticGroups.inc with cmake

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69357 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for declaration statements, and a test for PredefinedExpr
Douglas Gregor [Fri, 17 Apr 2009 16:55:36 +0000 (16:55 +0000)]
PCH support for declaration statements, and a test for PredefinedExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69356 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for return statements.
Douglas Gregor [Fri, 17 Apr 2009 16:34:57 +0000 (16:34 +0000)]
PCH support for return statements.

Optimize PCH encoding for switch-case statements slightly, by making
the switch-case numbering local to a particular statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69355 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement lvalue test for conditional expressions.
Sebastian Redl [Fri, 17 Apr 2009 16:30:52 +0000 (16:30 +0000)]
Implement lvalue test for conditional expressions.
Add a few commented lines to the test case that point out things that don't work yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69354 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdded -print-ivar-layout option. No change in functionality
Fariborz Jahanian [Fri, 17 Apr 2009 03:04:15 +0000 (03:04 +0000)]
Added -print-ivar-layout option. No change in functionality
yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69346 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for the __has_trivial_destructor type trait.
Anders Carlsson [Fri, 17 Apr 2009 02:34:54 +0000 (02:34 +0000)]
Add support for the __has_trivial_destructor type trait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69345 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for generating (very basic) C++ destructors. These aren't called by anyth...
Anders Carlsson [Fri, 17 Apr 2009 01:58:57 +0000 (01:58 +0000)]
Add support for generating (very basic) C++ destructors. These aren't called by anything yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69343 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSupport QA_OVERRIDE_GCC3_OPTIONS
Daniel Dunbar [Fri, 17 Apr 2009 01:54:00 +0000 (01:54 +0000)]
Support QA_OVERRIDE_GCC3_OPTIONS
 - Cover your eyes...

 - This is a simple but effective way to allow developers to build a
   project with clang while manipulating the command line, without
   having to edit the project itself.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69342 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAttributes on block functions were not being set.
Daniel Dunbar [Fri, 17 Apr 2009 00:48:04 +0000 (00:48 +0000)]
Attributes on block functions were not being set.
 - <rdar://problem/6800351> clang not producing correct large struct
   return code for Blocks

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69337 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for do-while and for loops
Douglas Gregor [Fri, 17 Apr 2009 00:29:51 +0000 (00:29 +0000)]
PCH support for do-while and for loops

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69334 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for while and continue statements
Douglas Gregor [Fri, 17 Apr 2009 00:16:09 +0000 (00:16 +0000)]
PCH support for while and continue statements

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69332 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixup semantic analysis for nested blocks, and allow block literal
Mike Stump [Fri, 17 Apr 2009 00:09:41 +0000 (00:09 +0000)]
Fixup semantic analysis for nested blocks, and allow block literal
expressions that can be of static duration to be returned.
Radar 6786551

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69331 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement basic code generation of constructor calls. We can now compile:
Anders Carlsson [Fri, 17 Apr 2009 00:06:03 +0000 (00:06 +0000)]
Implement basic code generation of constructor calls. We can now compile:

struct S {
S(int, int);
};

void f() {
S s(10, 10);
}

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69330 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for the first batch of statements, including null,
Douglas Gregor [Fri, 17 Apr 2009 00:04:06 +0000 (00:04 +0000)]
PCH support for the first batch of statements, including null,
compound, case, default, if, switch, and break statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69329 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd GetAddrOfCXXConstructor and use it.
Anders Carlsson [Thu, 16 Apr 2009 23:57:24 +0000 (23:57 +0000)]
Add GetAddrOfCXXConstructor and use it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69328 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd constructor getter to CXXTemporaryObjectExpr.
Anders Carlsson [Thu, 16 Apr 2009 23:53:22 +0000 (23:53 +0000)]
Add constructor getter to CXXTemporaryObjectExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69327 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoIf a class has a non-trivial constructor that doesn't take any arguments, we will...
Anders Carlsson [Thu, 16 Apr 2009 23:50:50 +0000 (23:50 +0000)]
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();

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69326 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago-Wall is -Wmost -Wparentheses
Chris Lattner [Thu, 16 Apr 2009 23:30:16 +0000 (23:30 +0000)]
-Wall is -Wmost -Wparentheses

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69324 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Allow using clang as a precompiler, even if it is an
Daniel Dunbar [Thu, 16 Apr 2009 23:10:13 +0000 (23:10 +0000)]
Driver: Allow using clang as a precompiler, even if it is an
unsupported arch.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69322 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoClean up the declaration-decoding step in the PCH reader, using the
Douglas Gregor [Thu, 16 Apr 2009 22:29:51 +0000 (22:29 +0000)]
Clean up the declaration-decoding step in the PCH reader, using the
same ueber-easy visitor scheme used for expressions/statements.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69320 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPrepare PCH reader and writer for (de-)serialization of statements. No
Douglas Gregor [Thu, 16 Apr 2009 22:23:12 +0000 (22:23 +0000)]
Prepare PCH reader and writer for (de-)serialization of statements. No
functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69319 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemoved a no longer needed FIXME comment.
Fariborz Jahanian [Thu, 16 Apr 2009 21:49:16 +0000 (21:49 +0000)]
Removed a no longer needed FIXME comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69315 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix <rdar://problem/6765383> clang-6: clang does not appear to support declaring...
Steve Naroff [Thu, 16 Apr 2009 19:02:57 +0000 (19:02 +0000)]
Fix <rdar://problem/6765383> clang-6: clang does not appear to support declaring a static Block 'const'.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69306 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoCategory method synbols must be qualified by gategory name to
Fariborz Jahanian [Thu, 16 Apr 2009 18:34:20 +0000 (18:34 +0000)]
Category method synbols must be qualified by gategory name to
match gcc's.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69305 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix a crash bug when comparing overload quality of conversion operators with conversi...
Sebastian Redl [Thu, 16 Apr 2009 17:51:27 +0000 (17:51 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69299 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAttempt to fix a read-after-free running test/Sema/designated-initializers.c.
Eli Friedman [Thu, 16 Apr 2009 17:49:48 +0000 (17:49 +0000)]
Attempt to fix a read-after-free running test/Sema/designated-initializers.c.

Douglas, can you check that this is doing the right thing?

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69298 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForce target triple for test depending on __weak.
Eli Friedman [Thu, 16 Apr 2009 17:33:37 +0000 (17:33 +0000)]
Force target triple for test depending on __weak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69297 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen we create an implicit CXXTemporaryObjectExpr we don't need to check that it...
Anders Carlsson [Thu, 16 Apr 2009 15:50:16 +0000 (15:50 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69292 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEnsure that the most recent declaration of a tentative definition wins
Daniel Dunbar [Thu, 16 Apr 2009 15:34:14 +0000 (15:34 +0000)]
Ensure that the most recent declaration of a tentative definition wins
when generating a common definition.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69287 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPass -fdiagnostics-show-option to clang-cc by default.
Daniel Dunbar [Thu, 16 Apr 2009 06:32:38 +0000 (06:32 +0000)]
Pass -fdiagnostics-show-option to clang-cc by default.
 - <rdar://problem/6796848> implement -fdiagnostics-show-option

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69276 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoother half of 69274
Chris Lattner [Thu, 16 Apr 2009 06:17:55 +0000 (06:17 +0000)]
other half of 69274

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69275 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosplit diagnostic group definitions out into their own file.
Chris Lattner [Thu, 16 Apr 2009 06:17:18 +0000 (06:17 +0000)]
split diagnostic group definitions out into their own file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69274 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agooptimize and comment GetDiagInfo.
Chris Lattner [Thu, 16 Apr 2009 06:13:46 +0000 (06:13 +0000)]
optimize and comment GetDiagInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69273 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomerge several scattered tables into StaticDiagInfo.
Chris Lattner [Thu, 16 Apr 2009 06:07:15 +0000 (06:07 +0000)]
merge several scattered tables into StaticDiagInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69272 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement Diagnostic::getWarningOptionForDiag with information from tblgen,
Chris Lattner [Thu, 16 Apr 2009 06:00:24 +0000 (06:00 +0000)]
Implement Diagnostic::getWarningOptionForDiag with information from tblgen,
this implements -fdiagnostics-show-option in clang-cc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69271 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotblgen is now passing diagnostic group information in the .inc file, ignore it everyw...
Chris Lattner [Thu, 16 Apr 2009 05:52:14 +0000 (05:52 +0000)]
tblgen is now passing diagnostic group information in the .inc file, ignore it everywhere.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69269 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement framework for -fdiagnostics-show-option, but tblgen isn't
Chris Lattner [Thu, 16 Apr 2009 05:44:38 +0000 (05:44 +0000)]
implement framework for -fdiagnostics-show-option, but tblgen isn't
passing down the right info yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69268 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDisable the code I added before until I understand what's causing default2.cpp to...
Anders Carlsson [Thu, 16 Apr 2009 05:35:41 +0000 (05:35 +0000)]
Disable the code I added before until I understand what's causing default2.cpp to fail.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69267 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomove handling of -pedantic and -pedantic-errors into Diagnostics,
Chris Lattner [Thu, 16 Apr 2009 05:04:32 +0000 (05:04 +0000)]
move handling of -pedantic and -pedantic-errors into Diagnostics,
out of Warnings.cpp.  This simplifies warnings.cpp and makes it more
efficient.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69266 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoarrange for -Wno-error=foo warnings to be immune to -Werror as
Chris Lattner [Thu, 16 Apr 2009 04:32:54 +0000 (04:32 +0000)]
arrange for -Wno-error=foo warnings to be immune to -Werror as
they are supposed to be.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69265 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agochange mappings to distinguish between "unset", "set by the user" and
Chris Lattner [Thu, 16 Apr 2009 04:12:40 +0000 (04:12 +0000)]
change mappings to distinguish between "unset", "set by the user" and
"set to the default value".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69264 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Remove the majority of -W* options, the driver doesn't
Daniel Dunbar [Thu, 16 Apr 2009 04:00:30 +0000 (04:00 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69263 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agouse getDiagnosticLevel instead of getDiagnosticMapping, which
Chris Lattner [Thu, 16 Apr 2009 03:59:32 +0000 (03:59 +0000)]
use getDiagnosticLevel instead of getDiagnosticMapping, which
is about to become private.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69262 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDriver: Forward -W* to clang, it can handle all these itself now.
Daniel Dunbar [Thu, 16 Apr 2009 03:44:10 +0000 (03:44 +0000)]
Driver: Forward -W* to clang, it can handle all these itself now.

Remove clang_W_Group and clang_ignored_W_Group.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69261 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoswitch DiagMappings *back* to 4 bits per diag.
Chris Lattner [Thu, 16 Apr 2009 03:41:37 +0000 (03:41 +0000)]
switch DiagMappings *back* to 4 bits per diag.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69260 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoimplement -Wno-#warnings etc.
Chris Lattner [Thu, 16 Apr 2009 03:27:53 +0000 (03:27 +0000)]
implement -Wno-#warnings etc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69259 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoEliminate pch::TYPE_ATTR, which is never used
Douglas Gregor [Thu, 16 Apr 2009 02:45:14 +0000 (02:45 +0000)]
Eliminate pch::TYPE_ATTR, which is never used

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69256 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for CompoundLiteralExpr. This is the last C expression
Douglas Gregor [Thu, 16 Apr 2009 02:33:48 +0000 (02:33 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69255 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.
Douglas Gregor [Thu, 16 Apr 2009 00:55:48 +0000 (00:55 +0000)]
PCH support for InitListExpr, DesignatedInitExpr, and ImplicitValueInitExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69251 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agowhen tblgen fills in all the subgroup info, clang is ready for it.
Chris Lattner [Thu, 16 Apr 2009 00:53:55 +0000 (00:53 +0000)]
when tblgen fills in all the subgroup info, clang is ready for it.
This depends on r69249 of llvm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69250 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd scafolding to represent heirarchical warnings, start with -Wall.
Chris Lattner [Thu, 16 Apr 2009 00:23:21 +0000 (00:23 +0000)]
add scafolding to represent heirarchical warnings, start with -Wall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69246 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for the __has_trivial_constructor type trait.
Anders Carlsson [Thu, 16 Apr 2009 00:08:20 +0000 (00:08 +0000)]
Add support for the __has_trivial_constructor type trait.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69245 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for ShuffleVectorExpr and BlockDeclRefExpr
Douglas Gregor [Thu, 16 Apr 2009 00:01:45 +0000 (00:01 +0000)]
PCH support for ShuffleVectorExpr and BlockDeclRefExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69244 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.
Douglas Gregor [Wed, 15 Apr 2009 23:33:31 +0000 (23:33 +0000)]
PCH support for TypesCompatibleExpr, ChooseExpr, and GNUNullExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69242 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for ExtVectorElementExpr and VAArgExpr.
Douglas Gregor [Wed, 15 Apr 2009 23:02:49 +0000 (23:02 +0000)]
PCH support for ExtVectorElementExpr and VAArgExpr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69240 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake unknown warnings a warning, not an error.
Chris Lattner [Wed, 15 Apr 2009 22:48:58 +0000 (22:48 +0000)]
make unknown warnings a warning, not an error.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69239 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd anonymous groups for all the warning command line flags that the clang
Chris Lattner [Wed, 15 Apr 2009 22:47:03 +0000 (22:47 +0000)]
add anonymous groups for all the warning command line flags that the clang
driver accepts and discards.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69238 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for CompoundAssignOperator and ConditionalOperator
Douglas Gregor [Wed, 15 Apr 2009 22:40:36 +0000 (22:40 +0000)]
PCH support for CompoundAssignOperator and ConditionalOperator

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69237 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd support for -Wextra and -W
Chris Lattner [Wed, 15 Apr 2009 22:38:06 +0000 (22:38 +0000)]
add support for -Wextra and -W

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69236 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agocomment out IsGroup: tblgen isn't instantiating these dependent defs quite right...
Chris Lattner [Wed, 15 Apr 2009 22:32:37 +0000 (22:32 +0000)]
comment out IsGroup: tblgen isn't instantiating these dependent defs quite right yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69234 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for ImaginaryLiteral and ArraySubscriptExpr
Douglas Gregor [Wed, 15 Apr 2009 22:19:53 +0000 (22:19 +0000)]
PCH support for ImaginaryLiteral and ArraySubscriptExpr

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69233 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixup codegen for copy/dispose for block literals. Radar 6791245
Mike Stump [Wed, 15 Apr 2009 22:11:36 +0000 (22:11 +0000)]
Fixup codegen for copy/dispose for block literals.  Radar 6791245

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69232 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDefer generation of tentative definitions.
Daniel Dunbar [Wed, 15 Apr 2009 22:08:45 +0000 (22:08 +0000)]
Defer generation of tentative definitions.
 - PR3980.

 - <rdar://problem/6762287> [irgen] crash when generating tentative
   definition of incomplete structure

 - This also avoids creating common definitions for things which are
   later overwritten.

 - XFAIL'ed external-defs.c, it isn't completing types properly yet.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69231 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for ExtQualType
Douglas Gregor [Wed, 15 Apr 2009 22:00:08 +0000 (22:00 +0000)]
PCH support for ExtQualType

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69230 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix decl type merges when they have
Fariborz Jahanian [Wed, 15 Apr 2009 21:54:48 +0000 (21:54 +0000)]
Fix decl type merges when they have
__string/__weak attributes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69229 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSet DebugInfo at the beginning of GenerateBlockFunction().
Devang Patel [Wed, 15 Apr 2009 21:51:44 +0000 (21:51 +0000)]
Set DebugInfo at the beginning of GenerateBlockFunction().

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69228 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen declaring a variable that has a constructor and a direct initializer, for example:
Anders Carlsson [Wed, 15 Apr 2009 21:48:18 +0000 (21:48 +0000)]
When declaring a variable that has a constructor and a direct initializer, for example:

struct X {
  X(int, int);
};

X x(10, 10);

we model that as

X x = X(10, 10);

inserting a temporary object expr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69227 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd warning when a tentative array definition is assumed to have one element.
Daniel Dunbar [Wed, 15 Apr 2009 21:35:27 +0000 (21:35 +0000)]
Add warning when a tentative array definition is assumed to have one element.
 - Also, fixed one to actually be one (instead of zero). :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69226 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for declaration attributes
Douglas Gregor [Wed, 15 Apr 2009 21:30:51 +0000 (21:30 +0000)]
PCH support for declaration attributes

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69225 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoActually generate code for the simple constructors we know we can generate code for.
Anders Carlsson [Wed, 15 Apr 2009 21:02:13 +0000 (21:02 +0000)]
Actually generate code for the simple constructors we know we can generate code for.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69222 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agouse tablgen-generated warning groups.
Chris Lattner [Wed, 15 Apr 2009 20:58:49 +0000 (20:58 +0000)]
use tablgen-generated warning groups.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69221 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agogenerate diagnostic group tables, this requires llvm r69219 or later.
Chris Lattner [Wed, 15 Apr 2009 20:55:31 +0000 (20:55 +0000)]
generate diagnostic group tables, this requires llvm r69219 or later.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69220 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix a name shadowing problem in tblgen.
Chris Lattner [Wed, 15 Apr 2009 20:54:55 +0000 (20:54 +0000)]
fix a name shadowing problem in tblgen.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69218 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agouse slightly more verbose to work around a tblgen bug for now.
Chris Lattner [Wed, 15 Apr 2009 20:29:48 +0000 (20:29 +0000)]
use slightly more verbose to work around a tblgen bug for now.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69214 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomove clang specific makefile goop to clang instead of llvm. This may require
Chris Lattner [Wed, 15 Apr 2009 19:58:08 +0000 (19:58 +0000)]
move clang specific makefile goop to clang instead of llvm.  This may require
updating the llvm tree.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69207 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDon't use \01 in symbol name if unnecessary.
Daniel Dunbar [Wed, 15 Apr 2009 19:52:32 +0000 (19:52 +0000)]
Don't use \01 in symbol name if unnecessary.
 - This was particularly bad since I fixed one instance of this name
   and not another, meaning we got an LLVM module with the same
   effective name in two different globals!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69205 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix <rdar://problem/6786597> varargs not supported for Blocks under clang.
Steve Naroff [Wed, 15 Apr 2009 19:33:47 +0000 (19:33 +0000)]
Fix <rdar://problem/6786597> varargs not supported for Blocks under clang.

Teach Sema::SemaBuiltinVAStart() about blocks.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69201 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPatch to remove a bogus warning which pointed to underlying AST
Fariborz Jahanian [Wed, 15 Apr 2009 19:19:03 +0000 (19:19 +0000)]
Patch to remove a bogus warning which pointed to underlying AST
gen. issue for property in continuation class declared readwrite
but which did not generate the declaration for the setter. Fix also
removed a FIXME and resulted in code cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69200 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix alignment on obj_msgrefs to match llvm-gcc.
Daniel Dunbar [Wed, 15 Apr 2009 19:04:46 +0000 (19:04 +0000)]
Fix alignment on obj_msgrefs to match llvm-gcc.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69199 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd test case for superrefs section (and make spacing consistent).
Daniel Dunbar [Wed, 15 Apr 2009 19:03:14 +0000 (19:03 +0000)]
Add test case for superrefs section (and make spacing consistent).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69198 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix some out of bounds array access problems, which manifest particularly
Chris Lattner [Wed, 15 Apr 2009 18:48:23 +0000 (18:48 +0000)]
fix some out of bounds array access problems, which manifest particularly
spectacularly when built for x86-64.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69197 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPCH support for the string literal of a FileScopeAsmDecl.
Douglas Gregor [Wed, 15 Apr 2009 18:43:11 +0000 (18:43 +0000)]
PCH support for the string literal of a FileScopeAsmDecl.
Some minor cleanup.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69196 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomove some pp diags to the right .td file.
Chris Lattner [Wed, 15 Apr 2009 18:13:28 +0000 (18:13 +0000)]
move some pp diags to the right .td file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69193 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoannotate diagnostics with which groups they belong to. Each
Chris Lattner [Wed, 15 Apr 2009 18:08:55 +0000 (18:08 +0000)]
annotate diagnostics with which groups they belong to.  Each
diagnostic can belong to at most one group.  Each group can
contain multiple diags, but we have nice syntax for the common
case of "1 diag to one group".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69192 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFor source location entries that describe instantiations, encode the
Douglas Gregor [Wed, 15 Apr 2009 18:05:10 +0000 (18:05 +0000)]
For source location entries that describe instantiations, encode the
token length in the PCH file rather than trying (and failing) to
reconstruct it be getting the spelling token's length.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69191 91177308-0d34-0410-b5e6-96231b3b80d8