]>
granicus.if.org Git - clang/log
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Douglas Gregor [Wed, 15 Apr 2009 17:43:59 +0000 (17:43 +0000)]
PCH support for MemberExpr and CallExpr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69186
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 15 Apr 2009 17:31:31 +0000 (17:31 +0000)]
Fixup http://llvm.org/viewvc/llvm-project?rev=69165&view=rev (based on feedback from Eli).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 17:20:11 +0000 (17:20 +0000)]
now that we've decoupled diagnostic classes from default mappings,
move the remaining default mapping exceptions from C++ code into
the .td files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69183
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 17:13:42 +0000 (17:13 +0000)]
move {'s
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69179
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 15 Apr 2009 16:58:41 +0000 (16:58 +0000)]
Revert previous patch (will commit a fix soon).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69178
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 16:56:26 +0000 (16:56 +0000)]
Make diagnostic class explicit in the diag record instead of
implicit from its parenting. Now that diag mapping is
explicit, eliminate the fatal and extwarn classes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69177
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 16:44:12 +0000 (16:44 +0000)]
Tblgen now passes the default mapping explicitly, instead of having it
be tied to the diag class. This requires an LLVM tree update.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69175
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 16:43:37 +0000 (16:43 +0000)]
add a bunch of files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69174
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 15 Apr 2009 16:35:07 +0000 (16:35 +0000)]
PCH support for string literals
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69172
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 15 Apr 2009 16:34:29 +0000 (16:34 +0000)]
Driver: Add --help-hidden
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69171
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Wed, 15 Apr 2009 16:31:36 +0000 (16:31 +0000)]
__objc_superrefs belongs to __DATA segment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69170
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 15 Apr 2009 15:58:59 +0000 (15:58 +0000)]
PCH support for UnaryOperator, SizeOfAlignOfExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69169
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 15 Apr 2009 15:55:24 +0000 (15:55 +0000)]
Start attempting to generate code for C++ ctors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69168
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 15 Apr 2009 15:20:03 +0000 (15:20 +0000)]
Fix <rdar://problem/
6789707 > "warning: 'extern' variable has an initializer" not correct for __private_extern__.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69167
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 14:42:02 +0000 (14:42 +0000)]
rename variable in comment, not just in code :).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69166
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Wed, 15 Apr 2009 14:38:36 +0000 (14:38 +0000)]
Fix <rdar://problem/
6791490 > [clang10 regression] [sema] invalid illegal jump diagnostic.
caused by: <rdar://problem/
6252084 > [sema] jumps into Obj-C exception blocks should be disallowed.
Sema::RecursiveCalcLabelScopes() and Sema::RecursiveCalcJumpScopes() need to pop the ScopeStack within the statement iteration loop (was outside the loop).
Eli, please review (thanks).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69165
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 07:06:34 +0000 (07:06 +0000)]
this should be private
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69158
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 07:05:12 +0000 (07:05 +0000)]
add another sanity check for -Werror=xx
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69157
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 07:03:57 +0000 (07:03 +0000)]
add a missing &&
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69156
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 07:02:57 +0000 (07:02 +0000)]
fix a broken test, that passed for the wrong reason. Two wrongs make a right! :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69155
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 07:01:18 +0000 (07:01 +0000)]
Rejigger how -pedantic and -pedantic-errors work and their interaction
with other diagnostic mapping. In the new scheme, -Wfoo or -Wno-foo or
-Werror=foo all override the -pedantic options, and __extension__
robustly silences all extension diagnostics in their scope.
An added bonus of this change is that MAP_DEFAULT goes away, meaning that
per-diagnostic mapping information can now be stored in 2 bits, doubling
the density of the Diagnostic::DiagMapping array. This also
substantially simplifies Diagnostic::getDiagnosticLevel.
OTOH, this temporarily introduces some "macro intensive" code in
Diagnostic.cpp. This will be addressed in a later patch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 15 Apr 2009 06:41:24 +0000 (06:41 +0000)]
Implement support for designated initializers that refer to members of
anonymous structs or unions. Fixes PR3778.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 15 Apr 2009 05:36:58 +0000 (05:36 +0000)]
Add support for mangling C++ constructors. Review appreciated (I'm looking at you, Doug)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69150
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 05:15:08 +0000 (05:15 +0000)]
make default diagnostic mapping more explicit in .td file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69149
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 04:57:48 +0000 (04:57 +0000)]
remove some commented out -Wstrict-selector-match stuff.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69148
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 15 Apr 2009 04:56:10 +0000 (04:56 +0000)]
Switch designated-initializer checking from using designator iterators
to using designator indices. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69147
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 15 Apr 2009 04:54:29 +0000 (04:54 +0000)]
Don't tip-to around BitstreamReader::JumpToBit jumping to the end of the stream. LLVM has been updated to allow this
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69146
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 04:51:48 +0000 (04:51 +0000)]
clean up error messages.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69142
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 04:51:29 +0000 (04:51 +0000)]
add Diagnostic.td to proj
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69141
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 04:37:12 +0000 (04:37 +0000)]
Add support for -Werror=foo and -Wno-error=foo
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69138
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 15 Apr 2009 04:36:55 +0000 (04:36 +0000)]
Add CGCXX.h with ctor/dtor type enumerations. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69137
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 04:27:38 +0000 (04:27 +0000)]
refactor a bunch of the warning parsing stuff to simplify it. This removes the
-Wfoo=ignore syntax. GCC supports -Wno-foo, no need to invent our own stuff.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69136
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 15 Apr 2009 04:26:10 +0000 (04:26 +0000)]
remove #include of system header, making this a) not apple specific, and
b) test dramatically faster.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69135
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Wed, 15 Apr 2009 04:10:19 +0000 (04:10 +0000)]
Simplify CodeGenFunction::GenerateCode.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69134
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 15 Apr 2009 03:36:15 +0000 (03:36 +0000)]
remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69133
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 15 Apr 2009 02:56:18 +0000 (02:56 +0000)]
Tweaks to Objective-C metadata (32 & 64-bit) to match llvm-gcc.
- Set alignment on property lists.
- 32-bit:
o Set section on property lists.
o Fix section name for category class methods.
o Fix symbol name for property lists.
o Fix section name for class method.
o Set alignment and section on class extension structure.
o Set alignment on a number of things: instance variables, methods,
method descriptions, the symbols structure.
- 64-bit:
o Fix section flags for protocol list.
I doubt most of these were problems in practice, but it is nice to
match llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69132
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 15 Apr 2009 02:37:43 +0000 (02:37 +0000)]
Driver: For clang, accept -fsigned-bitfields and reject
-funsigned-bitfields for now (clang defaults to -fsigned-bitfields).
- <rdar://problem/
6790309 > ER: Support
-fsigned-bitfields/-funsigned-bitfields
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69131
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 15 Apr 2009 00:25:59 +0000 (00:25 +0000)]
PCH support for CStyleCastExpr and BinaryOperator expression kinds.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69119
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 15 Apr 2009 00:08:05 +0000 (00:08 +0000)]
Improve "assignment to cast" diagnostic.
- Strip off extra parens when looking for casts.
- Change the location info to point at the cast (instead of the
assignment).
For example, on
int *b;
#define a ((void*) b)
void f0() {
a = 10;
}
we now emit:
/tmp/t.c:4:3: error: assignment to cast is illegal, lvalue casts are not supported
a = 10;
^ ~
/tmp/t.c:2:12: note: instantiated from:
#define a ((void*) b)
~^~~~~~~~~~
instead of:
/tmp/t.c:4:5: error: expression is not assignable
a = 10;
~ ^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69114
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 23:59:37 +0000 (23:59 +0000)]
PCH support for ParenExpr
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69106
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 23:32:43 +0000 (23:32 +0000)]
Add PCH support for ImplicitCastExprs. This is the first expression
kind PCH handles that has an expression as an operand, so most of this
work is in the infrastructure to rebuild expression trees from the
serialized representation. We now store expressions in post-order
(e.g., Reverse Polish Notation), so that we can easily rebuild the
appropriate expression tree.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69101
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 23:26:44 +0000 (23:26 +0000)]
Strip paren expressions when trying to diagnose "cast as lvalue"
extension.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69100
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 23:22:57 +0000 (23:22 +0000)]
Change Lexer::MeasureTokenLength to take a LangOptions reference.
This allows it to accurately measure tokens, so that we get:
t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~~^
instead of the woefully inferior:
t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~ ^
Most of this is just plumbing to push the reference around.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69099
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 14 Apr 2009 23:15:21 +0000 (23:15 +0000)]
Diagnose properties which have no implementations;
either unimplemented setter/getter or no
implementation directive.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69098
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 23:14:47 +0000 (23:14 +0000)]
Set alignment on __cstring metadata variables to 1 (matching
llvm-gcc).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69097
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 22:44:26 +0000 (22:44 +0000)]
Avoid use of magic \01 prefix when unneeded.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69093
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 22:44:23 +0000 (22:44 +0000)]
add fixitrewriter to xcode proj
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69092
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 22:41:13 +0000 (22:41 +0000)]
Comment fix.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69091
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 22:17:06 +0000 (22:17 +0000)]
Make the implicit-int handling error recovery stuff handle C++
nested name specifiers. Now we emit stuff like:
t.cpp:8:13: error: unknown type name 'X'
static foo::X P;
~~~~ ^
instead of:
t.cpp:8:16: error: invalid token after top level declarator
static foo::X P;
^
This is inspired by a really awful error message I got from
g++ when I misspelt diag::kind as diag::Kind.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69086
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 21:55:33 +0000 (21:55 +0000)]
Add PCH support for PredefinedExpr and FloatingLiteral expressions
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69084
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 21:34:55 +0000 (21:34 +0000)]
refactor "implicit int error recovery" code out of
ParseDeclarationSpecifiers into its own function, no
functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69083
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 21:18:50 +0000 (21:18 +0000)]
PCH support for a few very, very simple kinds of expressions. Hook up
expression (de-)serialization for VLAs, variable initializers,
enum constant initializers, and bitfield widths.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69075
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 21:16:09 +0000 (21:16 +0000)]
Fix a regression in a previous patch that broke implicit
int in a bitfield. Shantonu found this in a gcc testsuite file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69074
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 14 Apr 2009 20:53:38 +0000 (20:53 +0000)]
Fix <rdar://problem/
6252084 > [sema] jumps into Obj-C exception blocks should be disallowed.
This builds on Eli's work from http://llvm.org/viewvc/llvm-project?view=rev&revision=65678.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69073
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 20:36:01 +0000 (20:36 +0000)]
add support for -W[no-]extra-tokens
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69071
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 20:30:29 +0000 (20:30 +0000)]
remove dead enum
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69070
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 20:25:53 +0000 (20:25 +0000)]
Fix PR3988: extern inline functions get strong symbol definitions in
C99 mode. This is a regression from an earlier patch of mine.
This also simplifies the linkage enums a bit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69069
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 14 Apr 2009 18:41:56 +0000 (18:41 +0000)]
Do not dead code strip global meta-data objects.
This will match gcc's behavior in the arena.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69061
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mike Stump [Tue, 14 Apr 2009 18:24:37 +0000 (18:24 +0000)]
Fixup whitespacing.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69055
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 18:05:08 +0000 (18:05 +0000)]
temporarily revert r69046
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69054
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 17:42:51 +0000 (17:42 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69053
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 17:10:28 +0000 (17:10 +0000)]
Add a tricky, tricky test case for PCH that we currently don't handle. Committed with a FIXME so that we don't forget it
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69052
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 17:02:11 +0000 (17:02 +0000)]
implement some sema for gnuc_inline attribute. Reject always_inline and no_inline on objc methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69051
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 14 Apr 2009 16:58:56 +0000 (16:58 +0000)]
Support code generation of 'this' exprs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69050
91177308 -0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Tue, 14 Apr 2009 16:46:37 +0000 (16:46 +0000)]
Literal value calculation isn't likely to overflow on targets having int as 32 or less. Fixing the assert as it otherwise triggers for PIC16 which as i16 as int.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69046
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 16:44:36 +0000 (16:44 +0000)]
implement codegen support for __attribute((__gnuc_inline__)),
pulling some attribute munging stuff into GetLinkageForFunction.
This should fix PR3986
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69045
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 16:30:50 +0000 (16:30 +0000)]
recognize the gnuc_inline attribute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69044
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 14 Apr 2009 16:27:31 +0000 (16:27 +0000)]
When building a PCH file, don't perform end-of-translation-unit
wrap-up (e.g., turning tentative definitions into definitions). Also,
very that, when we actually use the PCH file, we get the ride code
generation for tentative definitions and definitions that show up in
the PCH file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69043
91177308 -0d34-0410-b5e6-
96231b3b80d8
Steve Naroff [Tue, 14 Apr 2009 15:11:46 +0000 (15:11 +0000)]
ASTContext::mergeTypes(): Loosen up the type checking for 'Class' (treating it like 'id').
This fixes <rdar://problem/
6782722 > XCDataTipsManager.m registers, observes notifications in class methods.
The radar above is the result of clang typing 'self' in a class method as 'Class', which results in some spurious warnings (GCC types 'self' in a class method as 'id').
I considered changing the type of 'self' to 'id' (to conform to GCC), however this resulted in *many* test cases breaking. In addition, I really prefer a more strongly typed 'self'.
All in all, this is the least obtrusive fix I could find for removing the spurious warnings (though we do loose some valid warnings).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69041
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 08:05:55 +0000 (08:05 +0000)]
Refactor how attributes are set on values.
- Pull out SetCommonAttributes, which handles the things common to
aliases, methods, functions, and variables.
- Pull out SetLLVMFunctionAttributesForDefinition, which handles the
LLVM attributes which we only want to apply to a definition (like
noinline and alwaysinline).
- Kill SetGVDeclarationAttributes (inlined into SetFunctionAttributes
and specialized).
- Kill SetFunctionAttributesForDefinition (inlined into sole caller).
- Inline SetGVDefinitionAttributes into SetMethodAttributes and
specialize.
- Rename SetGVDefinitionAttributes to SetFunctionDefinitionAttributes.
This is supposed to be a no functionality change commit, but I may
have made a mistake.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69036
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 07:19:20 +0000 (07:19 +0000)]
Split SetGlobalValueAttributes into definition/declaration halves.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69035
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 07:08:30 +0000 (07:08 +0000)]
Rename (one) SetFunctionAttributes to SetLLVMFunctionAttributes to
disambiguate it.
- No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69034
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 07:02:17 +0000 (07:02 +0000)]
Reduce indentation, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69033
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 06:44:48 +0000 (06:44 +0000)]
defer emission of always_inline, extern_inline, and inline functions (when
not in c89 mode).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69032
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 06:32:05 +0000 (06:32 +0000)]
give always_inline functions internal linkage. If they cannot be
inlined for some reason, then we don't want a strong or even weak
definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69031
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 06:27:57 +0000 (06:27 +0000)]
set the linkage of an inline function according to its language rules.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69030
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 06:19:49 +0000 (06:19 +0000)]
Add a comment on SetGlobalValueAttributes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69029
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 06:04:17 +0000 (06:04 +0000)]
add a new enum type for linkage, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69028
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 14 Apr 2009 06:00:08 +0000 (06:00 +0000)]
Clean up handling of visibility.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69027
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 05:33:52 +0000 (05:33 +0000)]
reduce indentation, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69026
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 05:27:13 +0000 (05:27 +0000)]
do not set visibility on "private" or "available externally" linkage objects.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69025
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Apr 2009 05:15:20 +0000 (05:15 +0000)]
Offer a fixit hint for our warning about tokens at the end of a directive:
t.c:3:8: warning: extra tokens at end of #endif directive
#endif foo
^
//
Don't do this in strict-C89 mode because bcpl comments aren't
valid there, and it is too much trouble to analyze whether
C block comments are safe.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69024
91177308 -0d34-0410-b5e6-
96231b3b80d8