Commit Graph

9197 Commits

Author SHA1 Message Date
Daniel Dunbar 46353ece18 Use correct signature for calling enumeration mutation function.
llvm-svn: 63782
2009-02-04 22:00:33 +00:00
Daniel Dunbar fb5fdf1f14 Temporarily disable caching of ABI results; this is going horribly
wrong in some cases.

llvm-svn: 63780
2009-02-04 21:36:22 +00:00
Sebastian Redl 18f8ff62a3 Implement taking address of member functions, including overloaded ones.
llvm-svn: 63779
2009-02-04 21:23:32 +00:00
Daniel Dunbar ed9309ef46 ccc: Forward -femit-all-decls to clang and use an option group to
simplify handling of -f options clang recognizes.

llvm-svn: 63778
2009-02-04 21:21:08 +00:00
Daniel Dunbar fa803cd260 Test case for -femit-all-decls.
llvm-svn: 63777
2009-02-04 21:20:25 +00:00
Daniel Dunbar 1e8052b36d Add -femit-all-decls codegen option.
- Emits all declarations, even unused (static) ones.
 - Useful when doing minimization of codegen problems (otherwise
   problems localized to a static function aren't minimized well).

llvm-svn: 63776
2009-02-04 21:19:06 +00:00
Daniel Dunbar a45bdbbb6a Add asserts that the function signature matches the other arguments provide
to CGCall functions.

llvm-svn: 63775
2009-02-04 21:17:21 +00:00
Daniel Dunbar 91b73d441e (llvm up) Update for intrinsic lookup changes.
llvm-svn: 63773
2009-02-04 21:09:15 +00:00
Fariborz Jahanian e4dc35deb9 Some early code for objc2's nonfragile abi messaging.
llvm-svn: 63770
2009-02-04 20:42:28 +00:00
Fariborz Jahanian b73a23e47e Patch fixes messaging for GNU runtime.
Patch by David Chisnall

llvm-svn: 63769
2009-02-04 20:31:19 +00:00
Chris Lattner 2e731e369c smaller header.
llvm-svn: 63766
2009-02-04 19:47:38 +00:00
Chris Lattner 022923a22a Fix PR3464 by searching for headers from the predefines
buffer as if the #include happened from the main file.

llvm-svn: 63764
2009-02-04 19:45:07 +00:00
Chris Lattner 7ead0396f6 Ok, we need a system header for this test to pass in the clang/test directory as well as from the pp directory.
llvm-svn: 63763
2009-02-04 19:44:14 +00:00
Chris Lattner 988dff84f1 fix test
llvm-svn: 63762
2009-02-04 19:40:02 +00:00
Chris Lattner 2f7bb79c86 rename again
llvm-svn: 63761
2009-02-04 19:38:30 +00:00
Chris Lattner 4a82a24108 rename some tests
llvm-svn: 63759
2009-02-04 19:38:12 +00:00
Chris Lattner 3b04af73f1 include smaller header for test.
llvm-svn: 63758
2009-02-04 19:37:49 +00:00
Chris Lattner 29321443f6 add DeclTemplate.h/cpp
llvm-svn: 63757
2009-02-04 19:21:34 +00:00
Douglas Gregor ec6e1893d7 Improve documentation for Sema::getTypeName. Also, it's return type is
DeclTy*, not TypeTy*.

llvm-svn: 63756
2009-02-04 19:16:12 +00:00
Douglas Gregor 4ab311dc30 Note the Radar number that corresponds to PR3137
llvm-svn: 63754
2009-02-04 19:10:27 +00:00
Ted Kremenek 77de9885f8 Update checker build.
llvm-svn: 63753
2009-02-04 19:09:38 +00:00
Douglas Gregor ded2d7b021 Basic representation of C++ class templates, from Andrew Sutton.
llvm-svn: 63750
2009-02-04 19:02:06 +00:00
Eli Friedman cddff7fd62 Test for PR3137.
llvm-svn: 63749
2009-02-04 18:50:00 +00:00
Douglas Gregor 2ada048975 Some name-lookup-related fixes, from Piotr Rak!
- Changes Lookup*Name functions to return NamedDecls, instead of
Decls. Unfortunately my recent statement that it will simplify lot of
code, was not quite right, but it simplifies some...
- Makes MergeLookupResult SmallPtrSet instead of vector, following
Douglas suggestions.
- Adds %qN format for printing qualified names to Diagnostic.
- Avoids searching for using-directives in Scopes, which are not
DeclScope, during unqualified name lookup.

llvm-svn: 63739
2009-02-04 17:27:36 +00:00
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