Douglas Gregor [Tue, 31 Aug 2010 23:48:11 +0000 (23:48 +0000)]
Add libclang support for namespace aliases (visitation + USRs) along
with a new cursor kind for a reference to a namespace.
There's still some oddities in the source location information for
NamespaceAliasDecl that I'll address with a separate commit, so the
source locations displayed in the load-namespaces.cpp test will
change.
llvm-svn: 112676
Dale Johannesen [Tue, 31 Aug 2010 23:43:55 +0000 (23:43 +0000)]
Testcase for llvm checkin 112674.
llvm-svn: 112675
Benjamin Kramer [Tue, 31 Aug 2010 23:38:13 +0000 (23:38 +0000)]
Remove noisy semicolon.
llvm-svn: 112673
Fariborz Jahanian [Tue, 31 Aug 2010 23:34:27 +0000 (23:34 +0000)]
Some support for unicode string constants
in wide strings. radar
8360841.
llvm-svn: 112672
Sebastian Redl [Tue, 31 Aug 2010 23:28:47 +0000 (23:28 +0000)]
Implement __has_feature(cxx_inline_namespaces)
llvm-svn: 112671
Johnny Chen [Tue, 31 Aug 2010 23:12:15 +0000 (23:12 +0000)]
Converted TestDeadStrip.py to Dsym/Dwarf combination.
llvm-svn: 112670
Chris Lattner [Tue, 31 Aug 2010 23:00:16 +0000 (23:00 +0000)]
licm is wasting time hoisting constant foldable operations,
instead of hoisting them, just fold them away. This occurs in the
testcase for PR8041, for example.
llvm-svn: 112669
Kevin Enderby [Tue, 31 Aug 2010 22:55:11 +0000 (22:55 +0000)]
This is the second of three patches to implement support for the .loc directive
and output the dwarf line number tables. This takes the current loc info after
an instruction is assembled and saves the needed info into an object that has
vector and for each section. These objects will be used for the final patch to
build and emit the encoded dwarf line number tables. Again for now this is only
in the Mach-O streamer but at some point will move to a more generic place.
llvm-svn: 112668
Dan Gohman [Tue, 31 Aug 2010 22:53:17 +0000 (22:53 +0000)]
Reapply r112432, now that the real problem is addressed.
llvm-svn: 112667
Dan Gohman [Tue, 31 Aug 2010 22:52:12 +0000 (22:52 +0000)]
Reapply r112433, now that the real problem is addressed.
llvm-svn: 112666
Dan Gohman [Tue, 31 Aug 2010 22:50:31 +0000 (22:50 +0000)]
Revert r110916. This patch is buggy because the code inside the
inner loop doesn't update all the variables in the outer loop.
llvm-svn: 112665
Bill Wendling [Tue, 31 Aug 2010 22:41:22 +0000 (22:41 +0000)]
We have a chance for an optimization. Consider this code:
int x(int t) {
if (t & 256)
return -26;
return 0;
}
We generate this:
tst.w r0, #256
mvn r0, #25
it eq
moveq r0, #0
while gcc generates this:
ands r0, r0, #256
it ne
mvnne r0, #25
bx lr
Scandalous really!
During ISel time, we can look for this particular pattern. One where we have a
"MOVCC" that uses the flag off of a CMPZ that itself is comparing an AND
instruction to 0. Something like this (greatly simplified):
%r0 = ISD::AND ...
ARMISD::CMPZ %r0, 0 @ sets [CPSR]
%r0 = ARMISD::MOVCC 0, -26 @ reads [CPSR]
All we have to do is convert the "ISD::AND" into an "ARM::ANDS" that sets [CPSR]
when it's zero. The zero value will all ready be in the %r0 register and we only
need to change it if the AND wasn't zero. Easy!
llvm-svn: 112664
Anton Korobeynikov [Tue, 31 Aug 2010 22:39:50 +0000 (22:39 +0000)]
Add NetBSD include search path
llvm-svn: 112663
Anton Korobeynikov [Tue, 31 Aug 2010 22:38:00 +0000 (22:38 +0000)]
Some fixes for NetBSD
llvm-svn: 112662
Bruno Cardoso Lopes [Tue, 31 Aug 2010 22:35:05 +0000 (22:35 +0000)]
Use x86 specific MOVSLDUP node, add more patterns to match it and remove useless load nodes
llvm-svn: 112661
Johnny Chen [Tue, 31 Aug 2010 22:26:16 +0000 (22:26 +0000)]
Converted TestClassTypes.py to Dsym/Dwarf combination. Marked one test case as
expectedFailure because in dwarf format, "variable list this" returns an error.
llvm-svn: 112660
Devang Patel [Tue, 31 Aug 2010 22:22:42 +0000 (22:22 +0000)]
Reapply r112623. Included additional check for unused byval argument.
llvm-svn: 112659
Bruno Cardoso Lopes [Tue, 31 Aug 2010 22:22:11 +0000 (22:22 +0000)]
Use x86 specific MOVSHDUP node and add more patterns to match it
llvm-svn: 112657
John McCall [Tue, 31 Aug 2010 22:21:26 +0000 (22:21 +0000)]
Add convenience accessors for determining whether template declarations are definitions.
llvm-svn: 112656
Douglas Gregor [Tue, 31 Aug 2010 22:12:17 +0000 (22:12 +0000)]
Add a new libclang function clang_getTemplateCursorKind(), which
determines the kind of declaration that would be generated if the
given template were instantiated. This allows a client to distinguish
among class/struct/union templates and function/member function/static
member function templates.
Also, teach clang_CXXMethod_isStatic() about function templates.
llvm-svn: 112655
Bill Wendling [Tue, 31 Aug 2010 22:05:37 +0000 (22:05 +0000)]
And ANDS pattern to match the t2ANDS pattern.
llvm-svn: 112654
Jakob Stoklund Olesen [Tue, 31 Aug 2010 22:01:07 +0000 (22:01 +0000)]
Stack slot access methods are in TargetInstrInfo.
llvm-svn: 112653
Dale Johannesen [Tue, 31 Aug 2010 21:53:15 +0000 (21:53 +0000)]
Comment typo.
llvm-svn: 112652
Jakob Stoklund Olesen [Tue, 31 Aug 2010 21:51:07 +0000 (21:51 +0000)]
Make %EFLAGS unallocatable.
No CCR virtual registers should exist, and %EFLAGS is used in ways that can
surprise RegAllocFast.
llvm-svn: 112650
Jakob Stoklund Olesen [Tue, 31 Aug 2010 21:51:05 +0000 (21:51 +0000)]
Track liveness of unallocatable, unreserved registers in machine DCE.
Reserved registers are unpredictable, and are treated as always live by machine
DCE.
Allocatable registers are never reserved, and can be used for virtual registers.
Unreserved, unallocatable registers can not be used for virtual registers, but
otherwise behave like a normal allocatable register. Most targets only have
the flag register in this set.
llvm-svn: 112649
Johnny Chen [Tue, 31 Aug 2010 21:49:24 +0000 (21:49 +0000)]
Converted TestBitfields.py to Dsym/Dwarf combination.
llvm-svn: 112646
Bruno Cardoso Lopes [Tue, 31 Aug 2010 21:38:49 +0000 (21:38 +0000)]
Use MOVHLPS node instead of matching using movhlps and movhlps_undef pattern fragments
llvm-svn: 112644
Chris Lattner [Tue, 31 Aug 2010 21:21:25 +0000 (21:21 +0000)]
tidy up
llvm-svn: 112643
Bruno Cardoso Lopes [Tue, 31 Aug 2010 21:15:21 +0000 (21:15 +0000)]
Use MOVLHPS and MOVHLPS x86 nodes whenever possible. Also remove some useless nodes
llvm-svn: 112642
John McCall [Tue, 31 Aug 2010 21:07:20 +0000 (21:07 +0000)]
Amusingly, I missed this point of abstraction in all my earlier
member-pointer refactoring: dereferencing a member data pointer.
llvm-svn: 112640
Dan Gohman [Tue, 31 Aug 2010 20:58:44 +0000 (20:58 +0000)]
Revert r112432. It appears to be exposing a problem in the emacs build.
llvm-svn: 112638
Sebastian Redl [Tue, 31 Aug 2010 20:53:31 +0000 (20:53 +0000)]
Make inline namespace not be transparent after all. The concept simply doesn't fit. Instead, special-case the few places where transparent contexts have the desired behavior for inline namespaces. Fixes a redeclaration issue in inline namespaces.
llvm-svn: 112637
Douglas Gregor [Tue, 31 Aug 2010 20:37:03 +0000 (20:37 +0000)]
Extend libclang with a new cursor kind that indicates a reference to a
template. Such cursors occur, for example, in template specialization
types such as vector<int>. Note that we do not handle the
super-interesting case where the template name is unresolved, e.g.,
within a template.
llvm-svn: 112636
Owen Anderson [Tue, 31 Aug 2010 20:27:17 +0000 (20:27 +0000)]
Merge 2010-08-31-InfiniteRecursion.ll into crash.ll.
llvm-svn: 112635
Owen Anderson [Tue, 31 Aug 2010 20:26:04 +0000 (20:26 +0000)]
More cleanups of my JumpThreading transforms, including extracting some duplicated code into a helper function.
llvm-svn: 112634
Jakob Stoklund Olesen [Tue, 31 Aug 2010 19:54:25 +0000 (19:54 +0000)]
Ignore unallocatable registers in RegAllocFast.
llvm-svn: 112632
Devang Patel [Tue, 31 Aug 2010 19:41:03 +0000 (19:41 +0000)]
Revert r112623. It is causing self host build failures.
llvm-svn: 112631
Duncan Sands [Tue, 31 Aug 2010 19:40:21 +0000 (19:40 +0000)]
Update the Ada instructions to LLVM 2.7 (from LLVM 2.5).
llvm-svn: 112630
Douglas Gregor [Tue, 31 Aug 2010 19:31:58 +0000 (19:31 +0000)]
Add libclang support for class template partial specializations,
including a cursor kind, visitation, and USRs.
llvm-svn: 112629
Owen Anderson [Tue, 31 Aug 2010 19:24:27 +0000 (19:24 +0000)]
Add an RAII helper to make cleanup of the RecursionSet more fool-proof.
llvm-svn: 112628
Douglas Gregor [Tue, 31 Aug 2010 19:02:00 +0000 (19:02 +0000)]
Add a libclang cursor kind, visitation support and USR support for C++
class templates.
llvm-svn: 112627
Greg Clayton [Tue, 31 Aug 2010 18:56:24 +0000 (18:56 +0000)]
Cleaned up my previous submission which had some header search paths that
were not needed and fixed a merge issue.
llvm-svn: 112626
Owen Anderson [Tue, 31 Aug 2010 18:55:52 +0000 (18:55 +0000)]
Only try to clean up the current block if we changed that block already.
llvm-svn: 112625
Jim Grosbach [Tue, 31 Aug 2010 18:52:31 +0000 (18:52 +0000)]
SP relative offsets need to be adjusted by the local allocation size when
determining if they're likely to be in range of the SP when resolving
frame references.
llvm-svn: 112624
Devang Patel [Tue, 31 Aug 2010 18:50:09 +0000 (18:50 +0000)]
Remember byval argument's frame index during argument lowering and use this info to emit debug info.
Fixes Radar
8367011.
llvm-svn: 112623
Jim Grosbach [Tue, 31 Aug 2010 18:49:31 +0000 (18:49 +0000)]
this assert should just be a condition, since this function is just asking if
the offset is legally encodable, not actually trying to do the encoding.
llvm-svn: 112622
Owen Anderson [Tue, 31 Aug 2010 18:49:12 +0000 (18:49 +0000)]
Add a test for the duplicated-conditional situation illutrated by PR5652.
llvm-svn: 112621
Owen Anderson [Tue, 31 Aug 2010 18:48:48 +0000 (18:48 +0000)]
Refactor my fix for PR5652 to terminate the predecessor lookups after the first failure.
llvm-svn: 112620
Ted Kremenek [Tue, 31 Aug 2010 18:47:37 +0000 (18:47 +0000)]
Improve CFG printing support for CXXOperatorCallExpr and CXXBindTemporaryExpr.
llvm-svn: 112619
Ted Kremenek [Tue, 31 Aug 2010 18:47:34 +0000 (18:47 +0000)]
Explicitly handle CXXOperatorCallExpr when building CFGs. We should treat it the same as CallExprs.
Fixes: <rdar://problem/8375510> [Boost] CFGBuilder crash in Boost.Graph
llvm-svn: 112618
Chris Lattner [Tue, 31 Aug 2010 18:44:03 +0000 (18:44 +0000)]
merge two tests.
llvm-svn: 112617
Greg Clayton [Tue, 31 Aug 2010 18:35:14 +0000 (18:35 +0000)]
Added the ability to disable ASLR (Address Space Layout Randomization). ASLR
is disabled by default, and can be enabled using:
(lldb) set disable-aslr 0
llvm-svn: 112616
Owen Anderson [Tue, 31 Aug 2010 18:16:29 +0000 (18:16 +0000)]
Manually reduce this testcase.
llvm-svn: 112615
Jim Ingham [Tue, 31 Aug 2010 18:05:13 +0000 (18:05 +0000)]
Add a "lldb host" logging channel, and put logging in the Host::OpenInExternalEditor code.
llvm-svn: 112614
Chris Lattner [Tue, 31 Aug 2010 18:05:08 +0000 (18:05 +0000)]
merge two tests and convert to filecheck.
llvm-svn: 112613
Fariborz Jahanian [Tue, 31 Aug 2010 18:02:20 +0000 (18:02 +0000)]
AST work to support [C++] [IRgen] for ?: with missing LHS
This is also pr7726 and wip. No change in functionality
at this time.
llvm-svn: 112612
Owen Anderson [Tue, 31 Aug 2010 17:59:07 +0000 (17:59 +0000)]
Add a micro-test for the transforms I added to JumpThreading.
I have not been able to find a way to test each in isolation, for a few reasons:
1) The ability to look-through non-i1 BinaryOperator's requires the ability to look through non-constant
ICmps in order for it to ever trigger.
2) The ability to do LVI-powered PHI value determination only matters in cases that ProcessBranchOnPHI
can't handle. Since it already handles all the cases without other instructions in the def-use chain
between the PHI and the branch, it requires the ability to look through ICmps and/or BinaryOperators
as well.
llvm-svn: 112611
Jim Grosbach [Tue, 31 Aug 2010 17:58:47 +0000 (17:58 +0000)]
Update test for 112609
llvm-svn: 112610
Jim Grosbach [Tue, 31 Aug 2010 17:58:19 +0000 (17:58 +0000)]
Improve virtual frame base register allocation heuristics.
1. Allocate them in the entry block of the function to enable function-wide
re-use. The instructions to create them should be re-materializable, so
there shouldn't be additional cost compared to creating them local
to the basic blocks where they are used.
2. Collect all of the frame index references for the function and sort them
by the local offset referenced. Iterate over the sorted list to
allocate the virtual base registers. This enables creation of base
registers optimized for positive-offset access of frame references.
(Note: This may be appropriate to later be a target hook to do the
sorting in a target appropriate manner. For now it's done here for
simplicity.)
llvm-svn: 112609
Dan Gohman [Tue, 31 Aug 2010 17:56:47 +0000 (17:56 +0000)]
Speculatively revert r112433.
llvm-svn: 112608
Johnny Chen [Tue, 31 Aug 2010 17:51:08 +0000 (17:51 +0000)]
Updated to reflect the "plugins" directory.
llvm-svn: 112607
Johnny Chen [Tue, 31 Aug 2010 17:42:54 +0000 (17:42 +0000)]
Changed the buildDsym()/buildDwarf() TestBase methods to use a plugin framework
to delegate the building of binaries to a sys.platform-sepcific plugin.
Modified the dotest.py test driver to add the "plugins" directory to the
PYTHONPATH as well.
darwin.py is the Mac OS X plugin module.
llvm-svn: 112606
Benjamin Kramer [Tue, 31 Aug 2010 17:03:33 +0000 (17:03 +0000)]
Allow creation of SHT_NULL sections, from Roman Divacky.
llvm-svn: 112605
Douglas Gregor [Tue, 31 Aug 2010 17:01:39 +0000 (17:01 +0000)]
Implement basic support for indexing function templates in
libclang. This includes:
- Cursor kind for function templates, with visitation logic
- Cursor kinds for template parameters, with visitation logic
- Visitation logic for template specialization types, qualified type
locations
- USR generation for function templates, template specialization
types, template parameter types.
Also happens to fix PR7804, which I tripped across while testing.
llvm-svn: 112604
Chris Lattner [Tue, 31 Aug 2010 16:44:54 +0000 (16:44 +0000)]
Add support for windows x86-64 varargs, patch by Cameron Esfahani!
llvm-svn: 112603
Chris Lattner [Tue, 31 Aug 2010 16:42:00 +0000 (16:42 +0000)]
improve isHexaLiteral to work with escaped newlines and trigraphs,
patch by Francois Pichet!
llvm-svn: 112602
Douglas Gregor [Tue, 31 Aug 2010 14:41:23 +0000 (14:41 +0000)]
libclang indexing support for C++ constructors, destructors, and
conversion functions. This introduces new cursor kinds for these three
C++ entities, and reworks visitation of function declarations so that
we get type-source information for the names.
llvm-svn: 112600
Douglas Gregor [Tue, 31 Aug 2010 13:31:19 +0000 (13:31 +0000)]
Add a simple test for indexing namespaces
llvm-svn: 112598
Duncan Sands [Tue, 31 Aug 2010 09:05:06 +0000 (09:05 +0000)]
Stop using the dom frontier in DwarfEHPrepare by not promoting alloca's
any more. I plan to reimplement alloca promotion using SSAUpdater later.
It looks like Bill's URoR logic really always needs domtree, so the pass
now always asks for domtree info.
llvm-svn: 112597
Nick Lewycky [Tue, 31 Aug 2010 08:29:37 +0000 (08:29 +0000)]
Fix an infinite loop; merging two functions will create a new function (if the
two are weak, we make them thunks to a new strong function) so don't iterate
through the function list as we're modifying it.
Also add back the outermost loop which got removed during the cleanups.
llvm-svn: 112595
Owen Anderson [Tue, 31 Aug 2010 07:55:56 +0000 (07:55 +0000)]
Don't perform an extra traversal of the function just to do cleanup. We can safely simplify instructions after each block has been processed without worrying about iterator invalidation.
llvm-svn: 112594
Bill Wendling [Tue, 31 Aug 2010 07:50:46 +0000 (07:50 +0000)]
- Cleanup some whitespaces.
- Convert {0,1} and friends into 0b01, which is identical and more consistent.
llvm-svn: 112593
Owen Anderson [Tue, 31 Aug 2010 07:50:31 +0000 (07:50 +0000)]
Rename test directory to reflect new pass name.
llvm-svn: 112592
Owen Anderson [Tue, 31 Aug 2010 07:48:34 +0000 (07:48 +0000)]
Rename ValuePropagation to a more descriptive CorrelatedValuePropagation.
llvm-svn: 112591
Owen Anderson [Tue, 31 Aug 2010 07:41:39 +0000 (07:41 +0000)]
Rename file to something more descriptive.
llvm-svn: 112590
Owen Anderson [Tue, 31 Aug 2010 07:36:34 +0000 (07:36 +0000)]
More Chris-inspired JumpThreading fixes: use ConstantExpr to correctly constant-fold undef, and be more careful with its return value.
This actually exposed an infinite recursion bug in ComputeValueKnownInPredecessors which theoretically already existed (in JumpThreading's
handling of and/or of i1's), but never manifested before. This patch adds a tracking set to prevent this case.
llvm-svn: 112589
John McCall [Tue, 31 Aug 2010 07:33:07 +0000 (07:33 +0000)]
Teach IR generation to return 'this' from constructors and destructors
under the ARM ABI.
llvm-svn: 112588
Michael J. Spencer [Tue, 31 Aug 2010 06:36:46 +0000 (06:36 +0000)]
Cleanup Whitespace.
llvm-svn: 112587
Michael J. Spencer [Tue, 31 Aug 2010 06:36:33 +0000 (06:36 +0000)]
System: Fix getMagicNumber on windows.
getMagicNumber was treating the _binary_ data it read in as a
null terminated string. This resulted in the std::string
calculating the length, and causing an assert in other code that
assumed that the length it passed was the same as the length of
the string it would get back.
llvm-svn: 112586
Michael J. Spencer [Tue, 31 Aug 2010 06:36:22 +0000 (06:36 +0000)]
Fix spelling/typo.
llvm-svn: 112585
Devang Patel [Tue, 31 Aug 2010 06:12:08 +0000 (06:12 +0000)]
Offset is not always unsigned number.
llvm-svn: 112584
Devang Patel [Tue, 31 Aug 2010 06:11:28 +0000 (06:11 +0000)]
Simplify.
llvm-svn: 112583
Nick Lewycky [Tue, 31 Aug 2010 05:53:05 +0000 (05:53 +0000)]
Switch to DenseSet, simplifying much more code. We now have a single iteration
where we hash, compare and fold, instead of one iteration where we build up
the hash buckets and a second one to fold.
llvm-svn: 112582
Chandler Carruth [Tue, 31 Aug 2010 05:42:40 +0000 (05:42 +0000)]
Fix a regression that allowed clearly ill formed code. The diagnostic is still
terrible, FIXME left to do a proper job of diagnosing this.
llvm-svn: 112581
Douglas Gregor [Tue, 31 Aug 2010 05:36:56 +0000 (05:36 +0000)]
Revert my lame attempt at appeasing the CFGBuilder
llvm-svn: 112580
Douglas Gregor [Tue, 31 Aug 2010 05:13:43 +0000 (05:13 +0000)]
When provide code completions for a variadic Objective-C method
declaration send or a variadic function call, collapse the ", ..."
into the parameter before it, so that we don't get a second
placeholder.
llvm-svn: 112579
Douglas Gregor [Tue, 31 Aug 2010 05:10:27 +0000 (05:10 +0000)]
Teach the CFGBuilder not do die on CXXBindTemporaryExpr, CXXOperatorCallExpr. Fixes a Boost.Graph crasher.
llvm-svn: 112578
Sebastian Redl [Tue, 31 Aug 2010 04:59:00 +0000 (04:59 +0000)]
Implement the __has_nothrow trait family, by Steven Watanabe.
llvm-svn: 112577
Owen Anderson [Tue, 31 Aug 2010 04:41:06 +0000 (04:41 +0000)]
Remove r111665, which implemented store-narrowing in InstCombine. Chris discovered a miscompilation in it, and it's not easily
fixable at the optimizer level. I'll investigate reimplementing it in DAGCombine.
llvm-svn: 112575
Bruno Cardoso Lopes [Tue, 31 Aug 2010 02:36:20 +0000 (02:36 +0000)]
zap unused method. x86 is the only user and already has a more powerfull version
llvm-svn: 112571
Bruno Cardoso Lopes [Tue, 31 Aug 2010 02:26:40 +0000 (02:26 +0000)]
Use X86ISD::MOVSS and MOVSD to represent the movl mask pattern, also fix the handling of those nodes when seeking for scalars inside vector shuffles
llvm-svn: 112570
Ted Kremenek [Tue, 31 Aug 2010 01:35:32 +0000 (01:35 +0000)]
Add range of return value expression in ReturnUndefChecker. Patch by Jim Goodnow II!
llvm-svn: 112569
Eric Christopher [Tue, 31 Aug 2010 01:28:42 +0000 (01:28 +0000)]
Rewrite slightly so we can expand for floating point types easier.
llvm-svn: 112568
Jakob Stoklund Olesen [Tue, 31 Aug 2010 01:27:49 +0000 (01:27 +0000)]
Add experimental -disable-physical-join command line option.
Eventually, we want to disable physreg coalescing completely, and let the
register allocator do its job using hints.
This option makes it possible to measure the impact of disabling physreg
coalescing.
llvm-svn: 112567
Sebastian Redl [Tue, 31 Aug 2010 00:36:45 +0000 (00:36 +0000)]
Enable inline namespaces in C++03 as an extension.
llvm-svn: 112566
Sebastian Redl [Tue, 31 Aug 2010 00:36:40 +0000 (00:36 +0000)]
Add a forgotten place where the enclosing namespace set matters, plus a big testcase for inline namespace fun.
llvm-svn: 112565
Sebastian Redl [Tue, 31 Aug 2010 00:36:36 +0000 (00:36 +0000)]
Enable inline namespaces in the AST.
llvm-svn: 112564
Sebastian Redl [Tue, 31 Aug 2010 00:36:30 +0000 (00:36 +0000)]
Rename DeclContext::getLookupContext to getRedeclContext and change its semantics slightly. No functionality change in the absence of inline namespaces. Also, change a few places where inline namespaces actually make a difference to be prepared for them.
llvm-svn: 112563
Sebastian Redl [Tue, 31 Aug 2010 00:36:23 +0000 (00:36 +0000)]
Decl::getEnclosingNamespaceContext has no reason to explicitly skip transparent contexts, and would be wrong to do so with inline namespaces.
llvm-svn: 112562
Douglas Gregor [Tue, 31 Aug 2010 00:26:14 +0000 (00:26 +0000)]
When instantiating a function type, instantiate the return type before
instantiating the parameters. In a perfect world, this wouldn't
matter, and compilers are free to instantiate in any order they
want. However, every other compiler seems to instantiate the return
type first, and some code (in this case, Boost.Polygon) depends on
this and SFINAE to avoid instantiating something that shouldn't be
instantiated.
We could fight this battle, and insist that Clang is allowed to do
what it does, but it's not beneficial: it's more predictable to
instantiate this way, in source order. When we implement
late-specified return types, we'll need to instantiate the return type
last when it was late-specified, hence the FIXME.
We now compile Boost.Polygon properly.
llvm-svn: 112561