Commit Graph

9173 Commits

Author SHA1 Message Date
Steve Naroff 189d41f625 Fix <rdar://problem/6552648> error: redefinition of 'XCElementAnchorDelegate' as different kind of symbol.
At first glance, this looked like a recent regression (possibly created by http://llvm.org/viewvc/llvm-project?view=rev&revision=63354, which was the only recent change to this section of Sema::ActOnStartClassInterface()). After more investigation, it looks like an edge case bug that we didn't cover in our tests.

llvm-svn: 63738
2009-02-04 17:14:05 +00:00
Douglas Gregor 8a6be5ec64 Diagnose ambiguities in getTypeName. Fixes http://llvm.org/bugs/show_bug.cgi?id=3475
llvm-svn: 63737
2009-02-04 17:00:24 +00:00
Douglas Gregor 94eabf3355 Bring operator name lookup (as required for C++ operator overloading)
into the general name-lookup fold. This cleans up some ugly,
not-quite-working code in the handling of operator overloading.

llvm-svn: 63735
2009-02-04 16:44:47 +00:00
Douglas Gregor 7bad6d1d32 Argument Dependent Lookup is done (for now). Also, update the status
for a few other name-lookup sections.

llvm-svn: 63734
2009-02-04 15:07:16 +00:00
Douglas Gregor b8a9a41dd6 Fix our semantic analysis of
unqualified-id '('

in C++. The unqualified-id might not refer to any declaration in our
current scope, but declarations by that name might be found via
argument-dependent lookup. We now do so properly.

As part of this change, CXXDependentNameExpr, which was previously
designed to express the unqualified-id in the above constructor within
templates, has become UnresolvedFunctionNameExpr, which does
effectively the same thing but will work for both templates and
non-templates.

Additionally, we cope with all unqualified-ids, since ADL also applies
in cases like

  operator+(x, y)

llvm-svn: 63733
2009-02-04 15:01:18 +00:00
Douglas Gregor 82b7372941 An idea for limiting diagnostic output, from David Abrahams
llvm-svn: 63732
2009-02-04 13:07:56 +00:00
Daniel Dunbar 3ba943ed7a ccc: -ObjC and -ObjC++ change default language, but only for "source
files".

llvm-svn: 63727
2009-02-04 08:01:01 +00:00
Daniel Dunbar 6e3b7df125 Handle demotion of coerced arguments (as in void a(x) short x; { ... }).
llvm-svn: 63726
2009-02-04 07:22:24 +00:00
Chris Lattner 1c967784f3 Implement handling of file entry/exit notifications from GNU
line markers, including maintenance of the virtual include stack.

For something like this:

# 42 "bar.c" 1
# 142 "bar2.c" 1

#warning zappa
# 92 "bar.c" 2
#warning gonzo
# 102 "foo.c" 2
#warning bonkta


we now produce these three warnings:

#1:
In file included from foo.c:3:
In file included from bar.c:42:
bar2.c:143:2: warning: #warning zappa
#warning zappa
 ^

#2:
In file included from foo.c:3:
bar.c:92:2: warning: #warning gonzo
#warning gonzo
 ^

#3:
foo.c:102:2: warning: #warning bonkta
#warning bonkta
 ^

llvm-svn: 63722
2009-02-04 06:25:26 +00:00
Chris Lattner e7bfe52046 # 42 doesn't change system header state either, add test.
llvm-svn: 63721
2009-02-04 05:36:14 +00:00
Chris Lattner 95d9c5e778 make getFileCharacteristic linetable aware. line markers that
play around with the 'is system header' bit now function correctly.

llvm-svn: 63720
2009-02-04 05:33:01 +00:00
Chris Lattner 0a1a8d8514 propagate linemarker flags down into the the line table, currently
ignoring include stack push/pop info though.

llvm-svn: 63719
2009-02-04 05:21:58 +00:00
Chris Lattner 334a2ada06 replace gimpy linear search with svelte binary search ;-)
llvm-svn: 63717
2009-02-04 04:46:59 +00:00
Zhongxing Xu 6d5fe08e1b Remove dead code.
llvm-svn: 63715
2009-02-04 02:30:11 +00:00
Chris Lattner 8411e168f8 make my atrocious linear search at least search in the order that is
more likely to hit.

llvm-svn: 63714
2009-02-04 02:29:52 +00:00
Chris Lattner 7941b81498 Add simple #line directive test.
llvm-svn: 63713
2009-02-04 02:17:09 +00:00
Chris Lattner 20c50ba26c add comment
llvm-svn: 63712
2009-02-04 02:15:40 +00:00
Chris Lattner e508c36338 spelling change.
llvm-svn: 63711
2009-02-04 02:15:34 +00:00
Chris Lattner c1219ff7cc add the difference in the line marker phys line number and the
query point to the returned presumed location.  We now produce:

foo.h:92:2: warning: #warning blarg!
#warning blarg!
 ^
foo.h:93:2: warning: #warning blarg!
#warning blarg!
 ^
foo.h:94:2: warning: #warning blarg!
#warning blarg!
 ^

for:

#line 92 "foo.h"
#warning blarg!
#warning blarg!
#warning blarg!

blarg indeed!

llvm-svn: 63710
2009-02-04 02:00:59 +00:00
Chris Lattner d429392285 add really really trivial #line support, where #line now makes every
location below it report as coming from the #line location.  For example,
with:

#line 92 "foo.h"
#warning blarg!
#warning blarg!

we now emit:

foo.h:92:2: warning: #warning blarg!
#warning blarg!
 ^
foo.h:92:2: warning: #warning blarg!
#warning blarg!
 ^

llvm-svn: 63709
2009-02-04 01:55:42 +00:00
Chris Lattner 5177d3ee8f simplify.
llvm-svn: 63708
2009-02-04 01:54:28 +00:00
Chris Lattner 88ea93e6b4 lower the interface to getLineNumber like we did for
getColumnNumber.  This fixes a FIXME in 
SourceManager::getPresumedLoc because we now just decompose
the sloc once.

llvm-svn: 63701
2009-02-04 01:06:56 +00:00
Daniel Dunbar aa64e6807d Force triple for this test case.
llvm-svn: 63699
2009-02-04 00:58:28 +00:00
Chris Lattner e4ad417664 make SM::getColumnNumber take a predecomposed FileID/offset, which
makes it clear to clients that they have to pick an instantiation
or spelling location before calling it and allows optimization based
on that.

llvm-svn: 63698
2009-02-04 00:55:58 +00:00
Daniel Dunbar 310c5b1ab1 Update passing of _Bool values to match what function was declared to take.
llvm-svn: 63697
2009-02-04 00:55:44 +00:00
Daniel Dunbar 4d22e4975a Change construction of common ObjC functions to use CGCall
infrastructure to construct function type.
 - For consistencty, we should probably always use this to construct
   function types, but these are absolutely necessary to ensure that
   we can emit calls to these functions.

llvm-svn: 63695
2009-02-04 00:44:42 +00:00
Chris Lattner 153a0f1f52 build per-fid linetable entries.
llvm-svn: 63694
2009-02-04 00:40:31 +00:00
Douglas Gregor e254f90d94 Initial implementation of argument dependent lookup (a.k.a. ADL,
a.k.a. Koenig lookup) in C++. Most of the pieces are in place, but for
two:

  - In an unqualified call g(x), even if the name does not refer to
    anything in the current scope, we can still find functions named
    "g" based on ADL. We don't yet have this ability.
  - ADL will need updating for friend functions and templates.

llvm-svn: 63692
2009-02-04 00:32:51 +00:00
Fariborz Jahanian 3d9296e6f5 Some function stub added for new abi messaging.
llvm-svn: 63691
2009-02-04 00:22:57 +00:00
Daniel Dunbar eb39504426 Use -fnext-runtime for this test.
llvm-svn: 63688
2009-02-04 00:03:15 +00:00
Fariborz Jahanian 4193308b2a -x language fix.
Patch by David Chisnall

llvm-svn: 63686
2009-02-03 23:59:32 +00:00
Daniel Dunbar 84388bf397 Use CGCall infrastructure to call enumeration mutation function.
llvm-svn: 63685
2009-02-03 23:55:40 +00:00
Fariborz Jahanian 82c72e1ee4 Several new declarations for objc2 nonfragile
abi messaging.

llvm-svn: 63684
2009-02-03 23:49:23 +00:00
Daniel Dunbar 1ef7373ee8 Fix return type for calls to objc_setProperty.
llvm-svn: 63683
2009-02-03 23:43:59 +00:00
Daniel Dunbar a33461150d Use ConvertTypeForMem when creating alloca for scalar argument.
llvm-svn: 63681
2009-02-03 23:04:57 +00:00
Daniel Dunbar c41a0b8a3c Force -triple/-fnext-runtime for a few more test cases.
llvm-svn: 63679
2009-02-03 23:04:31 +00:00
Daniel Dunbar ee3da87ce7 Add CodeGenFunction::ConvertTypeForMem forwarding function.
llvm-svn: 63678
2009-02-03 23:03:55 +00:00
Chris Lattner 6e0e1f49a5 more plumbing for #line propagation. Use happy bit #3
out of FileInfo :)

llvm-svn: 63672
2009-02-03 22:13:05 +00:00
Daniel Dunbar 25bd032084 Force triple for codegen tests which have expectations on output
types.

llvm-svn: 63669
2009-02-03 21:54:49 +00:00
Chris Lattner a4e0d1d177 codegen is much farther along than when this was first written.
llvm-svn: 63668
2009-02-03 21:54:08 +00:00
Chris Lattner 1eaa70a612 stub out basic #line handling calls.
llvm-svn: 63667
2009-02-03 21:52:55 +00:00
Fariborz Jahanian e80f317886 GNUStep fast enumeration.
Patch by David Chisnall.

llvm-svn: 63666
2009-02-03 21:52:35 +00:00
Chris Lattner ab5d0ca71a update a couple entries, add a new idea
llvm-svn: 63665
2009-02-03 21:51:37 +00:00
Chris Lattner 1927267b9d silence some warnings.
llvm-svn: 63662
2009-02-03 21:29:32 +00:00
Daniel Dunbar ed1ba4fc12 Use /usr/bin/env to run Python for increased portability. Patch by
David Chisnall.

llvm-svn: 63661
2009-02-03 21:25:26 +00:00
Steve Naroff fcc6fd5c39 Fix <rdar://problem/6521757> clang ObjC rewriter: Mixed Mac and Windows line endings after rewrite.
llvm-svn: 63657
2009-02-03 20:39:18 +00:00
Sebastian Redl 3d3f75a995 Allow taking the address of data members, resulting in a member pointer.
Pointers to functions don't work yet, and pointers to overloaded functions even less. Also, far too much illegal code is accepted.

llvm-svn: 63655
2009-02-03 20:19:35 +00:00
Daniel Dunbar fc7c76159c x86_64 ABI: Initial implementation of ABI compliant parameter passing.
- Now only 27/500 failures on ABITest single argument tests; from
   350/500. :)
 - As with return types, a large percentage of these are likely to be
   gcc bugs, not yet reviewed.

Also, fix bug in handling of Ignore ABI type in argument lists.

llvm-svn: 63654
2009-02-03 20:00:13 +00:00
Douglas Gregor 9554952264 Remove a fixed FIXME
llvm-svn: 63648
2009-02-03 19:26:44 +00:00
Douglas Gregor 4489e9465f When looking for a tag name via unqualified name lookup, only look in
scopes where the name would be considered a redeclaration if we know
that we're declaring or defining that tag.

llvm-svn: 63647
2009-02-03 19:26:08 +00:00