Eli Friedman
e6eb2edb50
Fix for PR2386: distinguish between insertion and replacements in the
...
delta tree.
The issue is roughly a conflict in ReplaceText between two kinds of
uses. One, it should be possible to replace a replacement: for example, the
ObjC rewriter calls ReplaceStmt for an expression, then replaces the resulting
expression with another expression. Two, it should be possible to
replace text that already has text inserted before it: for example, the
HTML rewriter inserts a bunch of tags at the beginning of the line, then
tries to escape the first character on the line. This patch
distinguishes the two cases by storing the deltas separately;
essentially, replacements and insertions no longer interfere with
each other.
Another possibility would be to add some sort of flag to ReplaceText, but
this seems a bit more intuitive and flexible.
There are a few downsides to the current solution: one is that there isn't
any way to remove/replace an insertion without touching additional
surrounding text; if such an operation turns out to be useful, an
additional method or flag can be added. Another is that an insertion
and replacing a string of length zero are distinct operations; I'm not
sure how to resolve this, or whether it will be confusing in practice.
This is relatively sensitive code, so please test and tell me if
anything breaks.
llvm-svn: 72000
2009-05-18 13:56:52 +00:00
Eli Friedman
a97f07f22d
Tweak MemoryBuffer::getSTDIN so that it returns after the first EOF.
...
It doesn't matter for piped input, but it's annoying when typing at the
console.
llvm-svn: 71998
2009-05-18 08:44:04 +00:00
Eli Friedman
cc89325969
Remove tabs.
...
llvm-svn: 71997
2009-05-18 07:48:06 +00:00
Eli Friedman
174c310967
Remove unused parameter.
...
llvm-svn: 71996
2009-05-18 07:39:39 +00:00
Daniel Dunbar
5d8165435d
Fix a compile warning.
...
llvm-svn: 71993
2009-05-18 03:44:24 +00:00
Eli Friedman
07cdffc295
Add some comments to ASTConsumers.h describing what the different
...
ASTConsumers actually do.
llvm-svn: 71992
2009-05-18 01:16:21 +00:00
Lang Hames
4030d8122d
Prevented reg0 from being added to MBB live-in set, which was causing issues
...
for PostRAScheduler.
llvm-svn: 71991
2009-05-17 23:50:36 +00:00
Anders Carlsson
ee13926fbe
Make ActOnWhileStmt take a FullExprArg for the condition expr.
...
llvm-svn: 71990
2009-05-17 21:22:26 +00:00
Anders Carlsson
24824e5009
Make ActOnExprStmt take a FullExprArg.
...
llvm-svn: 71989
2009-05-17 21:11:30 +00:00
Anders Carlsson
0e70d84e29
Fix instantiate-function-1.cpp.
...
llvm-svn: 71988
2009-05-17 19:43:12 +00:00
Jakob Stoklund Olesen
1c3da3a94b
Rename MachineVerifier pass to avoid command line collision.
...
llvm-svn: 71987
2009-05-17 19:37:14 +00:00
Duncan Sands
c5161d4b83
Check that the gcc front-end is not doing inlining
...
when not doing unit-at-a-time.
llvm-svn: 71986
2009-05-17 19:37:02 +00:00
Anders Carlsson
cdf1ca1cf4
Fix DISABLE_SMART_POINTERS build.
...
llvm-svn: 71984
2009-05-17 19:34:11 +00:00
Anders Carlsson
85a307dffb
Implement Sema::ActOnFinishFullExpr and create a CXXExprWithTemporaries node if necessary.
...
llvm-svn: 71983
2009-05-17 18:41:29 +00:00
Anders Carlsson
5262746c28
Add the FullExprArg wrapper and use it for if statement conditions.
...
llvm-svn: 71982
2009-05-17 18:26:53 +00:00
Anders Carlsson
23ca0b4869
Add support for converting member pointer types to LLVM types. Also mangle pointer to member functions correctly and add tests.
...
llvm-svn: 71981
2009-05-17 17:41:20 +00:00
Fariborz Jahanian
078cd52297
This patch fixes two bugs in the GNU Objective-C runtime implementation. One is a case in rethrowing exceptions where the C types don't match correctly (I already sent this patch to Daniel Dunbar, who found the bug, so it may have already been committed). The other fixes the case properties so that the methods generated as property accessors are added to the class structure correctly.
...
Patch by David Chisnall.
llvm-svn: 71980
2009-05-17 16:49:27 +00:00
Anders Carlsson
9303134cef
Add FIXME about not using MemberExpr nodes when the base type is a dependent type.
...
llvm-svn: 71979
2009-05-17 16:28:18 +00:00
Anton Korobeynikov
6de08cd093
Mark rotl/rotr as expand. This generates pretty ugly code, but this is better than nothing.
...
llvm-svn: 71976
2009-05-17 10:16:28 +00:00
Anton Korobeynikov
6b5523aec2
Typo
...
llvm-svn: 71975
2009-05-17 10:15:22 +00:00
Bill Wendling
e9353d7d6f
Formatting. Some updating of data structures. More work needs to be done to update the examples.
...
llvm-svn: 71974
2009-05-17 05:52:39 +00:00
Owen Anderson
33c346b807
Significantly improve Atomic.h by pulling in code from libatomic_ops by HP. This is a little outdated, but reasonably complete.
...
llvm-svn: 71973
2009-05-17 04:57:54 +00:00
Anders Carlsson
32440a0f48
Use the Itanium ABI for member pointers. Add a missing 'break' statement and a test case
...
llvm-svn: 71972
2009-05-17 02:06:04 +00:00
Eli Friedman
8f1d33e218
A couple of tweaks to make -ast-print produce code that's closer to
...
valid C code.
llvm-svn: 71971
2009-05-17 01:05:34 +00:00
Anders Carlsson
3c01271e93
Rewrite PureVirtualMethodCollector to use the overridden methods. Fixes <rdar://problem/6854087>
...
llvm-svn: 71970
2009-05-17 00:00:05 +00:00
Anders Carlsson
776a1403ed
Add OldMD to the list of methods NewMD overrides
...
llvm-svn: 71969
2009-05-16 23:59:08 +00:00
Anders Carlsson
36d87e179a
Add setters/getters to CXXMethodDecl so it can keep track of which virtual member functions it overrides (if any)
...
llvm-svn: 71968
2009-05-16 23:58:37 +00:00
Eli Friedman
15af3ee6a9
Make the RAII extension warning silencing for __extension__ a bit
...
narrower, so it doesn't catch expresions that aren't sub-expressions of
__extension__ operator.
llvm-svn: 71967
2009-05-16 23:40:44 +00:00
Eli Friedman
678d3bac03
Targets without long long should reduce the size of intmax_t
...
accordingly.
llvm-svn: 71966
2009-05-16 23:30:57 +00:00
Eli Friedman
ce7f900b3b
Refactor address-of-void extension a bit so that it's more obviously
...
correct. No functionality change, as far as I know.
llvm-svn: 71965
2009-05-16 23:27:50 +00:00
Eli Friedman
c3dcdd0980
A few minor updates to the user manual.
...
llvm-svn: 71964
2009-05-16 23:17:30 +00:00
Anders Carlsson
7bf3c4227d
Fix another case where the extern-ness of extern "C" wasn't being captured.
...
This makes me think that we should make hasExternalStorage perform this check...
llvm-svn: 71962
2009-05-16 22:05:23 +00:00
Anders Carlsson
5b53576fe4
Don't return member pointer types for static member functions. Fixes 6879261.
...
llvm-svn: 71961
2009-05-16 21:43:42 +00:00
Eli Friedman
b529b01985
PR3942: Don't warn on unsigned overflow in preprocessor expressions.
...
llvm-svn: 71960
2009-05-16 21:24:10 +00:00
Owen Anderson
48371650b6
Remove the volatile marker from the cas_flag typedef, fixing some warnings.
...
It's now the client's resposibility to add it in when needed
llvm-svn: 71959
2009-05-16 21:08:25 +00:00
Anders Carlsson
d3a69ceaaf
extern "C" should preserve the 'extern' qualifier for VarDecls. Fixes 6853728.
...
llvm-svn: 71957
2009-05-16 21:02:39 +00:00
Anders Carlsson
524d5a4f5a
Improve checking of member expressions where the base type is a dependent type.
...
llvm-svn: 71956
2009-05-16 20:31:20 +00:00
Daniel Dunbar
f39ea8535b
Update test case; I'm confused why this wasn't failing on the buildbot
...
though?
llvm-svn: 71955
2009-05-16 19:30:01 +00:00
Sebastian Redl
45be55d181
Test case for previous commit. Explicit instantiation does the trick. (Thanks, Anders.)
...
llvm-svn: 71954
2009-05-16 18:59:35 +00:00
Sebastian Redl
e769ecf8ab
Implement instantiation of a few boring, simple expressions. I don't think these are testable yet, though.
...
llvm-svn: 71953
2009-05-16 18:50:46 +00:00
Eli Friedman
4f8b8ed2ac
Missing change for r71941 (PR2044).
...
llvm-svn: 71947
2009-05-16 13:58:00 +00:00
Eli Friedman
168fe15b0d
Avoid calling mergeTypes in C++. I think these are the correct C++
...
alternatives, but please correct me if I'm wrong.
I eventually plan to assert in mergeTypes that we aren't in C++ mode
because composite types are fundamentally not a part of C++. The
remaining callers for code in the regression tests are
Sema::WarnConflictingTypedMethods and CodeGenFunction::EmitFunctionProlog;
I'm not quite sure what the correct approach is for those callers.
llvm-svn: 71946
2009-05-16 13:54:38 +00:00
Eli Friedman
e2cad65015
Add stricter checking for va_arg.
...
llvm-svn: 71942
2009-05-16 12:46:54 +00:00
Eli Friedman
54135838e2
PR2044: reject declarations of functions returning variably modified
...
types.
llvm-svn: 71941
2009-05-16 12:15:55 +00:00
Eli Friedman
0b4af8f755
PR3009: Get rid of bogus warning for scalar compound literals.
...
This patch isn't quite ideal in that it eliminates the warning for
constructs like "int a = {1};", where the braces are in fact redundant.
However, that would have required a bunch of refactoring, and it's
much less likely to cause confusion compared to redundant nested braces.
llvm-svn: 71939
2009-05-16 11:45:48 +00:00
Mike Stump
18bb9284ff
Reflow some comments.
...
llvm-svn: 71937
2009-05-16 07:57:57 +00:00
Mike Stump
87c57acfb7
Reflow some comments.
...
llvm-svn: 71936
2009-05-16 07:39:55 +00:00
Jakob Stoklund Olesen
af917d8f85
Fix a missing def-flag on a Mips epilogue load.
...
llvm-svn: 71935
2009-05-16 07:26:06 +00:00
Jakob Stoklund Olesen
99abac8996
Remember to set def-flag on register loaded from stack slot in CellSPU.
...
llvm-svn: 71934
2009-05-16 07:25:44 +00:00
Jakob Stoklund Olesen
e61c7a3958
Verify that explicit definitions in the TargetInstrDesc are matched by
...
explicit register define operands.
llvm-svn: 71933
2009-05-16 07:25:20 +00:00