]>
granicus.if.org Git - clang/log
Ted Kremenek [Tue, 2 Mar 2010 21:43:52 +0000 (21:43 +0000)]
Don't conjure a symbol for DeclStmts when the variable is a C++ reference.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97590
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 2 Mar 2010 21:28:26 +0000 (21:28 +0000)]
During codegen assert that any copy assignment, destructor or constructor that
we need to synthesize has been marked as used by Sema.
Change Sema to avoid these asserts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97589
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 2 Mar 2010 19:14:36 +0000 (19:14 +0000)]
Bump the default maximum template-instantiation depth to 500, as in
GCC. Fixes PR6301.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97579
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 2 Mar 2010 18:48:07 +0000 (18:48 +0000)]
Add test case from PR6064, which now works
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97575
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 2 Mar 2010 17:53:14 +0000 (17:53 +0000)]
Diagnose the declaration of enum templates. Also, be a bit more
careful about value-dependent enumerators. Fixes PR5786.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97570
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Tue, 2 Mar 2010 17:41:26 +0000 (17:41 +0000)]
Move Emit24 to clang::io
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97569
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 2 Mar 2010 17:18:33 +0000 (17:18 +0000)]
Use CXXTemporaryObjectExpr for explicitly-constructed temporaries. We
used to do this, but it got lost when we switched functional-style
cast syntax over to using the new initialization code. Fixes PR6457.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97568
91177308 -0d34-0410-b5e6-
96231b3b80d8
Charles Davis [Tue, 2 Mar 2010 15:26:41 +0000 (15:26 +0000)]
Pass -m32 and -m64 to the static analyzer when using scan-build. Now we can
use scan-build with Wine, for example.
Ted, I hope this is OK.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97566
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Tue, 2 Mar 2010 10:08:30 +0000 (10:08 +0000)]
Register all parameters even if they didn't occur in the function body.
We may query their liveness because they are added to store when passing
argument values.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97562
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 2 Mar 2010 07:38:39 +0000 (07:38 +0000)]
Unify initializer-instantiation code for variable declarations and
base/member initializers.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97560
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 2 Mar 2010 05:40:45 +0000 (05:40 +0000)]
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97551
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 2 Mar 2010 03:50:12 +0000 (03:50 +0000)]
Inspired by seeing "MIPS" go by in the commits, I've gone ahead and
implemented a (codegen) target hook for __builtin_extend_pointer.
I'm also making it return a uint64_t instead of an unsigned word; this
comports with typical usage (i.e. the one use I know of).
I don't know if any of the existing targets requires this hook to be
set (other than x86 and x86_64, which I know do not).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97547
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Tue, 2 Mar 2010 03:44:06 +0000 (03:44 +0000)]
Rename BaseOffset to Offset and make it signed in preparation of more construction vtable work.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97546
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 2 Mar 2010 02:41:08 +0000 (02:41 +0000)]
Add in some more MIPS command line options.
Patch by Oleksandr Tymoshenko!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97544
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Tue, 2 Mar 2010 02:31:24 +0000 (02:31 +0000)]
After much consultation aimed at figuring out what this builtin actually
does, document the results and then implement __builtin_extend_pointer for
platforms where it's a no-op.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97540
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 2 Mar 2010 01:36:28 +0000 (01:36 +0000)]
Add test case from PR5812, which works now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97535
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 2 Mar 2010 01:29:43 +0000 (01:29 +0000)]
Fix an amusing typo that completely the re-introduction of parameters
for the purposes of parsing default arguments. In effect, we would
re-introduce the parameter with a default argument N times (where N is
the number of parameters preceding the parameter with a default
argument). This showed up when a defaulted parameter of a member
function of a local class shadowed a parameter of the enclosing
function. Fixes PR6383.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97534
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Tue, 2 Mar 2010 01:19:04 +0000 (01:19 +0000)]
Cast a pointer to 'long long' to satisfy all compilation models.
Satisfies radar
7703202 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97532
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 2 Mar 2010 00:25:00 +0000 (00:25 +0000)]
Add comment
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97528
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Mar 2010 23:49:23 +0000 (23:49 +0000)]
When we're parsing template names as part of base-specifiers, we are
*not* entering the context of the nested-name-specifier. This was
causing us to look into an uninstantiated template that we shouldn't
look into. Fixes PR6376.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97524
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 1 Mar 2010 23:49:17 +0000 (23:49 +0000)]
Split out types that are non-canonical unless dependent as their own
category. Use this in a few places to eliminate unnecessary TST cases and
do some future-proofing. Provide terrible manglings for typeof. Mangle
decltype with some hope of accuracy.
Our manglings for some of the cases covered in the testcase are different
from gcc's, which I've raised as an issue with the ABI list.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97523
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 1 Mar 2010 23:36:21 +0000 (23:36 +0000)]
More rewriter of nested blocks fun stuff.
Radar
7696893 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97520
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Mar 2010 23:31:19 +0000 (23:31 +0000)]
Unbreak the build
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97519
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Mar 2010 23:15:13 +0000 (23:15 +0000)]
Keep an explicit stack of function and block scopes, each element of
which has the label map, switch statement stack, etc. Previously, we
had a single set of maps in Sema (for the function) along with a stack
of block scopes. However, this lead to funky behavior with nested
functions, e.g., in the member functions of local classes.
The explicit-stack approach is far cleaner, and we retain a 1-element
cache so that we're not malloc/free'ing every time we enter a
function. Fixes PR6382.
Also, tweaked the unused-variable warning suppression logic to look at
errors within a given Scope rather than within a given function. The
prior code wasn't looking at the right number-of-errors count when
dealing with blocks, since the block's count would be deallocated
before we got to ActOnPopScope. This approach works with nested
blocks/functions, and gives tighter error recovery.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97518
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 1 Mar 2010 21:17:36 +0000 (21:17 +0000)]
Fix the lookup of names used in a friend declaration to not attempt to
re-declare them. This fixes PR6317. Also add the beginnings of an interesting
test case for p1 of [class.friend] which also covers PR6317.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97499
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 1 Mar 2010 21:06:03 +0000 (21:06 +0000)]
fix PR5933: don't warn about unused variables if a function has other errors in it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97498
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 1 Mar 2010 20:59:53 +0000 (20:59 +0000)]
Implement jump checking for initialized c++ variables, implementing
a fixme and PR6451.
Only perform jump checking if the containing function has no errors,
and add the infrastructure needed to do this.
On the testcase in the PR, we produce:
t.cc:6:3: error: illegal goto into protected scope
goto later;
^
t.cc:7:5: note: jump bypasses variable initialization
X x;
^
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97497
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 1 Mar 2010 20:56:44 +0000 (20:56 +0000)]
avoid issues with the new scope protector. Previously we'd error
with "address taken of label in protected scope, jump to it would have unknown effect on scope"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97495
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Mar 2010 20:44:28 +0000 (20:44 +0000)]
Start detangling the BlockSemaInfo/Sema mess. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97494
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Mon, 1 Mar 2010 19:22:33 +0000 (19:22 +0000)]
Allow a '0' precision in format strings (as the man page says it is okay).
Fixes <rdar://problem/
7700339 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97482
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 1 Mar 2010 19:12:25 +0000 (19:12 +0000)]
The latest draft uses 'dt' to mangle member expressions, and now so do we.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97479
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Mar 2010 19:11:54 +0000 (19:11 +0000)]
When looking for a redeclaration of a static variable, only look for redeclarations. Fixes PR6449
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97478
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Mar 2010 19:00:07 +0000 (19:00 +0000)]
When instantiating a function-scoped enum, make sure that it and its
enumeration constants get placed into the local instantiation hash
table. Fixes PR6375.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97471
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Mar 2010 18:27:54 +0000 (18:27 +0000)]
Robustify instantiation of templates when there are errors in the
template definition. Do this both by being more tolerant of errors in
our asserts and by not dropping a variable declaration completely when
its initializer is ill-formed. Fixes the crash-on-invalid in PR6375,
but not the original issue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97463
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Mon, 1 Mar 2010 18:20:46 +0000 (18:20 +0000)]
Don't infinite-loop if TryAnnotateCXXScopeToken fails to annotate but doesn't
signal an error. This can happen even when the current token is '::' if
this is a ::new or ::delete expression.
This was an oversight in my recent parser refactor; fixes PR 5825.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97462
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Mar 2010 17:25:41 +0000 (17:25 +0000)]
Finish pushing source-location information though TreeTransform's
TransformDefinition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97445
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Mar 2010 15:56:25 +0000 (15:56 +0000)]
When looking for the instantiated declaration that corresponds to a
given declaration in a template, make sure that the context we're
searching through is complete. Fixes PR6376.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97444
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 1 Mar 2010 06:56:52 +0000 (06:56 +0000)]
Since now we store the cast type with an ElementRegion, there is
no need to store a type with SymbolRegionValue.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 1 Mar 2010 05:29:02 +0000 (05:29 +0000)]
Assert when loading from a code text region instead of returning an unknown silently.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Mon, 1 Mar 2010 03:48:10 +0000 (03:48 +0000)]
Add comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Mon, 1 Mar 2010 01:04:55 +0000 (01:04 +0000)]
Don't warn about case-value conversions from a negative value to a
larger unsigned value, since this is implementation-defined
behavior. (We previously suppressed this warning when converting from
a signed value to an unsigned value of the same size).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 28 Feb 2010 22:33:07 +0000 (22:33 +0000)]
Pass '-no-canonical-prefixes' on down to GCC. It's not specific to the Clang
driver and was in fact based on a feature in GCC. =]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97424
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 28 Feb 2010 22:05:49 +0000 (22:05 +0000)]
Improve name mangling for dependently-scoped declaration references.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97422
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 28 Feb 2010 21:40:32 +0000 (21:40 +0000)]
Add name mangling for DeclRefExprs that refer to external names
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97418
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Feb 2010 18:39:30 +0000 (18:39 +0000)]
Remove debug output.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97407
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Feb 2010 18:37:33 +0000 (18:37 +0000)]
Handle unused functions in construction vtables correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97406
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 28 Feb 2010 18:33:55 +0000 (18:33 +0000)]
pull some altivec stuff out of line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97405
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sun, 28 Feb 2010 18:30:25 +0000 (18:30 +0000)]
Warn about the deprecated string literal -> char* conversion. Fixes PR6428.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97404
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 28 Feb 2010 18:18:36 +0000 (18:18 +0000)]
Implement PR6423 by using one token of lookahead to disambiguate
an *almost* always incorrect case. This only does the lookahead
in the insanely unlikely case, so it shouldn't impact performance.
On this testcase:
struct foo {
}
typedef int x;
Before:
t.c:3:9: error: cannot combine with previous 'struct' declaration specifier
typedef int x;
^
After:
t.c:2:2: error: expected ';' after struct
}
^
;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97403
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Feb 2010 18:08:38 +0000 (18:08 +0000)]
When laying out vtables for virtual bases in construction vtables, we need to check if the vtable is a primary base in the layout class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97402
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Feb 2010 17:59:36 +0000 (17:59 +0000)]
Add another construction vtable test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97401
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Sun, 28 Feb 2010 13:00:19 +0000 (13:00 +0000)]
Support constant-evaluation of __builtin_nans* as well as the correct constant
evaluation of __builtin_nan*. Most of the work to make this work is in LLVM.
Fixes <rdar://problem/
7696712 > and part of PR 5255.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97383
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sun, 28 Feb 2010 06:39:11 +0000 (06:39 +0000)]
Use getBody() to get the function definition when the decl referenced is not
definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97373
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sun, 28 Feb 2010 05:14:08 +0000 (05:14 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97365
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Feb 2010 01:43:58 +0000 (01:43 +0000)]
More improvements to construction vtables; we know handle vbase offsets correctly (I hope).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97361
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Sun, 28 Feb 2010 00:55:40 +0000 (00:55 +0000)]
Opt into the Verifier now that it's an opt-in feature of
addPassesToEmitFile.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97358
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Feb 2010 00:36:23 +0000 (00:36 +0000)]
Pass information about whether a base is virtual or not down to getCtorVtable, we need this information in the vtable builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97356
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sun, 28 Feb 2010 00:10:58 +0000 (00:10 +0000)]
Add new function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97353
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 23:58:01 +0000 (23:58 +0000)]
Fix to dumpLayout; we want to be able to dump address points even if the vtable doesn't have any methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97350
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 27 Feb 2010 22:35:43 +0000 (22:35 +0000)]
Debian sid moved these headers into /4.4 and left /4.4.3 as a symlink. Update.
Also, add support for 32-bit x86 Debian sid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97347
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 21:09:00 +0000 (21:09 +0000)]
Add a simple construction vtable test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97344
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 20:39:05 +0000 (20:39 +0000)]
Start fleshing out construction vtable support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97342
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 20:02:53 +0000 (20:02 +0000)]
Enable the new vtable layout code for vtables that aren't construction vtables. (This doesn't mean that we emit LLVM IR using it yet, it just means that it's running and hopefully not crashing or asserting).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97341
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 19:57:44 +0000 (19:57 +0000)]
Move ComputeThisAdjustmentBaseOffset to VtableBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97340
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 19:51:04 +0000 (19:51 +0000)]
Make sure to insert the primary base in the set :)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97339
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 19:21:58 +0000 (19:21 +0000)]
Use the real base offset when calculating vbase offsets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97338
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 19:00:53 +0000 (19:00 +0000)]
Figured out why the test was failing, this will hopefully fix it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97336
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 18:16:50 +0000 (18:16 +0000)]
Don't add this adjustments for pure virtual member functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97334
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 18:09:40 +0000 (18:09 +0000)]
We want to store method info for unused functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97333
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 18:09:05 +0000 (18:09 +0000)]
XFAIL this for now. I have no idea why this test is failing on some machines. Looks like some sort of whitespace issue in FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97332
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Feb 2010 18:02:51 +0000 (18:02 +0000)]
Revert 97324. Chris says this cleanup could hurt -E performance.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97331
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Feb 2010 17:05:45 +0000 (17:05 +0000)]
Move method out-of-line. I thought this would be a candidate for inlining but I was wrong.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97330
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 16:55:58 +0000 (16:55 +0000)]
Add another test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97329
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 16:52:49 +0000 (16:52 +0000)]
Finish up the changes to this adjustments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97328
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Feb 2010 16:29:36 +0000 (16:29 +0000)]
Another trivial getSpelling simplification.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97327
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 16:18:19 +0000 (16:18 +0000)]
Stub out more of the 'this' pointer adjustment fixes I've been planning. Start using a set vector for primary bases so they will be ordered.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97326
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Feb 2010 14:22:08 +0000 (14:22 +0000)]
Simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97324
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Feb 2010 14:15:42 +0000 (14:15 +0000)]
Fix thinko.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97323
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Feb 2010 13:44:12 +0000 (13:44 +0000)]
Add an overload of Preprocessor::getSpelling which takes a SmallVector and
returns a StringRef. Use it to simplify some repetitive code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97322
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 27 Feb 2010 08:34:51 +0000 (08:34 +0000)]
Fix crasher caused by setting a bit in a possibly empty bitvector while
doing printf format string checking. This is a recent regression.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97318
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sat, 27 Feb 2010 07:46:49 +0000 (07:46 +0000)]
Wire up Daniel's new spiffy C interpreter into the CMake build system
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97311
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sat, 27 Feb 2010 07:06:44 +0000 (07:06 +0000)]
Add comment
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97309
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kovarththanan Rajaratnam [Sat, 27 Feb 2010 07:05:56 +0000 (07:05 +0000)]
Add header + comments
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97308
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 06:38:03 +0000 (06:38 +0000)]
Fix another vtable layout bug; we weren't looking hard enough for overriden functions when determining if an overrider will ever be used.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97306
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 04:12:52 +0000 (04:12 +0000)]
Handle vcall offset sharing between destructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97304
91177308 -0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Sat, 27 Feb 2010 04:05:52 +0000 (04:05 +0000)]
Fix a bug where we were generating an unnecessary vtable for a virtual base that's already a primary virtual base.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97303
91177308 -0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Sat, 27 Feb 2010 02:44:37 +0000 (02:44 +0000)]
Add test case for inlining call analysis.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97300
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 27 Feb 2010 02:42:25 +0000 (02:42 +0000)]
Robustify SourceManager::getLocation(), so that it returns an
end-of-line source location when given a column number beyond the
length of the line, or an end-of-file source location when given a
line number beyond the length of the file. Previously, we would return
an invalid location.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97299
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 27 Feb 2010 01:46:29 +0000 (01:46 +0000)]
Add reference to positional arguments documentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97298
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 27 Feb 2010 01:41:03 +0000 (01:41 +0000)]
For printf format string checking, add support for positional format strings.
Along the way, coelesce some of the diagnostics.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97297
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 27 Feb 2010 01:32:48 +0000 (01:32 +0000)]
When given unsaved files in clang_createTranslationUnitFromSourceFile,
copy the source buffers provided rather than referencing them
directly, so that the caller can free those buffers immediately after
calling clang_createTranslationUnitFromSourceFile(). Otherwise, we
risk hitting those buffers later (when building source ranges, forming
diagnostics, etc.).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97296
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Sat, 27 Feb 2010 00:25:28 +0000 (00:25 +0000)]
Skip dependent virtual base classes; fixes PR6413.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97291
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 26 Feb 2010 23:48:57 +0000 (23:48 +0000)]
Put BadLiteral in the NonGCC group. I'd completely forgotten about this.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97286
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 26 Feb 2010 23:35:57 +0000 (23:35 +0000)]
At sabre's request, drop the FP bounds diagnostics down to warnings and file
them under -Wbad-literal. They're still on by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97284
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 26 Feb 2010 22:49:11 +0000 (22:49 +0000)]
Prevent rewriter crash when variable type is missing.
Fixes radar
7692183 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97281
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 26 Feb 2010 22:36:30 +0000 (22:36 +0000)]
Minor cleanup of the rewriter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97280
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 26 Feb 2010 21:46:27 +0000 (21:46 +0000)]
Removed some unused code in rewriter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97274
91177308 -0d34-0410-b5e6-
96231b3b80d8
John McCall [Fri, 26 Feb 2010 20:22:44 +0000 (20:22 +0000)]
Sundry fixes to the new vtable builder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97258
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 26 Feb 2010 19:55:31 +0000 (19:55 +0000)]
Fix rewriting of byref variables in nested blocks.
Fixes radar
7692350 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97254
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 26 Feb 2010 19:42:53 +0000 (19:42 +0000)]
fix rdar://
7683173 , rejecting an invalid conditional
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97253
91177308 -0d34-0410-b5e6-
96231b3b80d8