]> granicus.if.org Git - clang/log
clang
15 years agoReapply Daniel's patch to match up with llvm 63765.
Dale Johannesen [Thu, 5 Feb 2009 01:50:47 +0000 (01:50 +0000)]
Reapply Daniel's patch to match up with llvm 63765.
Untested, Daniel or Nate please review.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63814 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agox86-32: Use Ignore to avoid passing empty structs (instead of Expand).
Daniel Dunbar [Thu, 5 Feb 2009 01:50:07 +0000 (01:50 +0000)]
x86-32: Use Ignore to avoid passing empty structs (instead of Expand).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63813 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHonor ByVal alignment. Patch by Nate Begeman!
Daniel Dunbar [Thu, 5 Feb 2009 01:31:19 +0000 (01:31 +0000)]
Honor ByVal alignment. Patch by Nate Begeman!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63811 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago This patch generates messaging code for objc2's non-fragile abi.
Fariborz Jahanian [Thu, 5 Feb 2009 01:13:09 +0000 (01:13 +0000)]
 This patch generates messaging code for objc2's non-fragile abi.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63810 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitialize alignment field for ByVal ABIInfo correctly.
Daniel Dunbar [Thu, 5 Feb 2009 01:01:30 +0000 (01:01 +0000)]
Initialize alignment field for ByVal ABIInfo correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63809 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix regression: Leak (BugType) object should have 'isLeak()' return true.
Ted Kremenek [Thu, 5 Feb 2009 00:38:00 +0000 (00:38 +0000)]
Fix regression: Leak (BugType) object should have 'isLeak()' return true.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63803 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUnbreak CGFunctionInfo::Profile method and reenable caching of ABI
Daniel Dunbar [Thu, 5 Feb 2009 00:00:23 +0000 (00:00 +0000)]
Unbreak CGFunctionInfo::Profile method and reenable caching of ABI
information.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63799 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOverhaul BugReporter interface and implementation. The new interface cleans up
Ted Kremenek [Wed, 4 Feb 2009 23:49:09 +0000 (23:49 +0000)]
Overhaul BugReporter interface and implementation. The new interface cleans up
the ownership of BugTypes and BugReports. Now BugReports are owned by BugTypes,
and BugTypes are owned by the BugReporter object.

The major functionality change in this patch is that reports are not immediately
emitted by a call to BugReporter::EmitWarning (now called EmitReport), but
instead of queued up in report "equivalence classes". When
BugReporter::FlushReports() is called, it emits one diagnostic per report
equivalence class. This provides a nice cleanup with the caching of reports as
well as enables the BugReporter engine to select the "best" path for reporting a
path-sensitive bug based on all the locations in the ExplodedGraph that the same
bug could occur.

Along with this patch, Leaks are now coalesced into a common equivalence class
by their allocation site, and the "summary" diagnostic for leaks now reports the
allocation site as the location of the bug (this may later be augmented to also
provide an example location where the leak occurs).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63796 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChase LLVM TOT in circles (i.e., revert r63773 to match revert of
Daniel Dunbar [Wed, 4 Feb 2009 23:40:00 +0000 (23:40 +0000)]
Chase LLVM TOT in circles (i.e., revert r63773 to match revert of
r63765).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63795 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd ABIArgInfo::dump()
Daniel Dunbar [Wed, 4 Feb 2009 23:24:38 +0000 (23:24 +0000)]
Add ABIArgInfo::dump()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63794 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement semantic analysis for the GNU flexible array initialization
Douglas Gregor [Wed, 4 Feb 2009 22:46:25 +0000 (22:46 +0000)]
Implement semantic analysis for the GNU flexible array initialization
extension. The interaction with designated initializers is a
bit... interesting... but we follow GNU's lead and don't permit too
much crazy code in this area.

Also, make the "excess initializers" error message a bit more
informative.

Addresses PR2561: http://llvm.org/bugs/show_bug.cgi?id=2561

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63785 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd support for blocks with explicit return types.
Mike Stump [Wed, 4 Feb 2009 22:31:32 +0000 (22:31 +0000)]
Add support for blocks with explicit return types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63784 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse correct signature for calling enumeration mutation function.
Daniel Dunbar [Wed, 4 Feb 2009 22:00:33 +0000 (22:00 +0000)]
Use correct signature for calling enumeration mutation function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63782 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTemporarily disable caching of ABI results; this is going horribly
Daniel Dunbar [Wed, 4 Feb 2009 21:36:22 +0000 (21:36 +0000)]
Temporarily disable caching of ABI results; this is going horribly
wrong in some cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63780 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement taking address of member functions, including overloaded ones.
Sebastian Redl [Wed, 4 Feb 2009 21:23:32 +0000 (21:23 +0000)]
Implement taking address of member functions, including overloaded ones.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63779 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoccc: Forward -femit-all-decls to clang and use an option group to
Daniel Dunbar [Wed, 4 Feb 2009 21:21:08 +0000 (21:21 +0000)]
ccc: Forward -femit-all-decls to clang and use an option group to
simplify handling of -f options clang recognizes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63778 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTest case for -femit-all-decls.
Daniel Dunbar [Wed, 4 Feb 2009 21:20:25 +0000 (21:20 +0000)]
Test case for -femit-all-decls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63777 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd -femit-all-decls codegen option.
Daniel Dunbar [Wed, 4 Feb 2009 21:19:06 +0000 (21:19 +0000)]
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).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63776 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd asserts that the function signature matches the other arguments provide
Daniel Dunbar [Wed, 4 Feb 2009 21:17:21 +0000 (21:17 +0000)]
Add asserts that the function signature matches the other arguments provide
to CGCall functions.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63775 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago(llvm up) Update for intrinsic lookup changes.
Daniel Dunbar [Wed, 4 Feb 2009 21:09:15 +0000 (21:09 +0000)]
(llvm up) Update for intrinsic lookup changes.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63773 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome early code for objc2's nonfragile abi messaging.
Fariborz Jahanian [Wed, 4 Feb 2009 20:42:28 +0000 (20:42 +0000)]
Some early code for objc2's nonfragile abi messaging.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63770 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoPatch fixes messaging for GNU runtime.
Fariborz Jahanian [Wed, 4 Feb 2009 20:31:19 +0000 (20:31 +0000)]
Patch fixes messaging for GNU runtime.
Patch by David Chisnall

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63769 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosmaller header.
Chris Lattner [Wed, 4 Feb 2009 19:47:38 +0000 (19:47 +0000)]
smaller header.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63766 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix PR3464 by searching for headers from the predefines
Chris Lattner [Wed, 4 Feb 2009 19:45:07 +0000 (19:45 +0000)]
Fix PR3464 by searching for headers from the predefines
buffer as if the #include happened from the main file.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63764 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoOk, we need a system header for this test to pass in the clang/test directory as...
Chris Lattner [Wed, 4 Feb 2009 19:44:14 +0000 (19:44 +0000)]
Ok, we need a system header for this test to pass in the clang/test directory as well as from the pp directory.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63763 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agofix test
Chris Lattner [Wed, 4 Feb 2009 19:40:02 +0000 (19:40 +0000)]
fix test

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63762 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename again
Chris Lattner [Wed, 4 Feb 2009 19:38:30 +0000 (19:38 +0000)]
rename again

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63761 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agorename some tests
Chris Lattner [Wed, 4 Feb 2009 19:38:12 +0000 (19:38 +0000)]
rename some tests

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63759 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoinclude smaller header for test.
Chris Lattner [Wed, 4 Feb 2009 19:37:49 +0000 (19:37 +0000)]
include smaller header for test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63758 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd DeclTemplate.h/cpp
Chris Lattner [Wed, 4 Feb 2009 19:21:34 +0000 (19:21 +0000)]
add DeclTemplate.h/cpp

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63757 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImprove documentation for Sema::getTypeName. Also, it's return type is
Douglas Gregor [Wed, 4 Feb 2009 19:16:12 +0000 (19:16 +0000)]
Improve documentation for Sema::getTypeName. Also, it's return type is
DeclTy*, not TypeTy*.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63756 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoNote the Radar number that corresponds to PR3137
Douglas Gregor [Wed, 4 Feb 2009 19:10:27 +0000 (19:10 +0000)]
Note the Radar number that corresponds to PR3137

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63754 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate checker build.
Ted Kremenek [Wed, 4 Feb 2009 19:09:38 +0000 (19:09 +0000)]
Update checker build.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63753 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBasic representation of C++ class templates, from Andrew Sutton.
Douglas Gregor [Wed, 4 Feb 2009 19:02:06 +0000 (19:02 +0000)]
Basic representation of C++ class templates, from Andrew Sutton.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63750 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTest for PR3137.
Eli Friedman [Wed, 4 Feb 2009 18:50:00 +0000 (18:50 +0000)]
Test for PR3137.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63749 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome name-lookup-related fixes, from Piotr Rak!
Douglas Gregor [Wed, 4 Feb 2009 17:27:36 +0000 (17:27 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63739 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix <rdar://problem/6552648> error: redefinition of 'XCElementAnchorDelegate' as...
Steve Naroff [Wed, 4 Feb 2009 17:14:05 +0000 (17:14 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63738 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoDiagnose ambiguities in getTypeName. Fixes http://llvm.org/bugs/show_bug.cgi?id=3475
Douglas Gregor [Wed, 4 Feb 2009 17:00:24 +0000 (17:00 +0000)]
Diagnose ambiguities in getTypeName. Fixes http://llvm.org/bugs/show_bug.cgi?id=3475

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63737 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoBring operator name lookup (as required for C++ operator overloading)
Douglas Gregor [Wed, 4 Feb 2009 16:44:47 +0000 (16:44 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63735 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoArgument Dependent Lookup is done (for now). Also, update the status
Douglas Gregor [Wed, 4 Feb 2009 15:07:16 +0000 (15:07 +0000)]
Argument Dependent Lookup is done (for now). Also, update the status
for a few other name-lookup sections.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63734 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix our semantic analysis of
Douglas Gregor [Wed, 4 Feb 2009 15:01:18 +0000 (15:01 +0000)]
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)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63733 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAn idea for limiting diagnostic output, from David Abrahams
Douglas Gregor [Wed, 4 Feb 2009 13:07:56 +0000 (13:07 +0000)]
An idea for limiting diagnostic output, from David Abrahams

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63732 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoccc: -ObjC and -ObjC++ change default language, but only for "source
Daniel Dunbar [Wed, 4 Feb 2009 08:01:01 +0000 (08:01 +0000)]
ccc: -ObjC and -ObjC++ change default language, but only for "source
files".

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63727 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoHandle demotion of coerced arguments (as in void a(x) short x; { ... }).
Daniel Dunbar [Wed, 4 Feb 2009 07:22:24 +0000 (07:22 +0000)]
Handle demotion of coerced arguments (as in void a(x) short x; { ... }).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63726 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoImplement handling of file entry/exit notifications from GNU
Chris Lattner [Wed, 4 Feb 2009 06:25:26 +0000 (06:25 +0000)]
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
 ^

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63722 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago# 42 doesn't change system header state either, add test.
Chris Lattner [Wed, 4 Feb 2009 05:36:14 +0000 (05:36 +0000)]
# 42 doesn't change system header state either, add test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63721 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake getFileCharacteristic linetable aware. line markers that
Chris Lattner [Wed, 4 Feb 2009 05:33:01 +0000 (05:33 +0000)]
make getFileCharacteristic linetable aware.  line markers that
play around with the 'is system header' bit now function correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63720 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agopropagate linemarker flags down into the the line table, currently
Chris Lattner [Wed, 4 Feb 2009 05:21:58 +0000 (05:21 +0000)]
propagate linemarker flags down into the the line table, currently
ignoring include stack push/pop info though.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63719 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoreplace gimpy linear search with svelte binary search ;-)
Chris Lattner [Wed, 4 Feb 2009 04:46:59 +0000 (04:46 +0000)]
replace gimpy linear search with svelte binary search ;-)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63717 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove dead code.
Zhongxing Xu [Wed, 4 Feb 2009 02:30:11 +0000 (02:30 +0000)]
Remove dead code.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63715 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake my atrocious linear search at least search in the order that is
Chris Lattner [Wed, 4 Feb 2009 02:29:52 +0000 (02:29 +0000)]
make my atrocious linear search at least search in the order that is
more likely to hit.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63714 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd simple #line directive test.
Chris Lattner [Wed, 4 Feb 2009 02:17:09 +0000 (02:17 +0000)]
Add simple #line directive test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63713 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd comment
Chris Lattner [Wed, 4 Feb 2009 02:15:40 +0000 (02:15 +0000)]
add comment

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63712 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agospelling change.
Chris Lattner [Wed, 4 Feb 2009 02:15:34 +0000 (02:15 +0000)]
spelling change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63711 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd the difference in the line marker phys line number and the
Chris Lattner [Wed, 4 Feb 2009 02:00:59 +0000 (02:00 +0000)]
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!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63710 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd really really trivial #line support, where #line now makes every
Chris Lattner [Wed, 4 Feb 2009 01:55:42 +0000 (01:55 +0000)]
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!
 ^

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63709 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosimplify.
Chris Lattner [Wed, 4 Feb 2009 01:54:28 +0000 (01:54 +0000)]
simplify.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63708 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agolower the interface to getLineNumber like we did for
Chris Lattner [Wed, 4 Feb 2009 01:06:56 +0000 (01:06 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63701 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForce triple for this test case.
Daniel Dunbar [Wed, 4 Feb 2009 00:58:28 +0000 (00:58 +0000)]
Force triple for this test case.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63699 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake SM::getColumnNumber take a predecomposed FileID/offset, which
Chris Lattner [Wed, 4 Feb 2009 00:55:58 +0000 (00:55 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63698 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUpdate passing of _Bool values to match what function was declared to take.
Daniel Dunbar [Wed, 4 Feb 2009 00:55:44 +0000 (00:55 +0000)]
Update passing of _Bool values to match what function was declared to take.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63697 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange construction of common ObjC functions to use CGCall
Daniel Dunbar [Wed, 4 Feb 2009 00:44:42 +0000 (00:44 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63695 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agobuild per-fid linetable entries.
Chris Lattner [Wed, 4 Feb 2009 00:40:31 +0000 (00:40 +0000)]
build per-fid linetable entries.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63694 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoInitial implementation of argument dependent lookup (a.k.a. ADL,
Douglas Gregor [Wed, 4 Feb 2009 00:32:51 +0000 (00:32 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63692 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSome function stub added for new abi messaging.
Fariborz Jahanian [Wed, 4 Feb 2009 00:22:57 +0000 (00:22 +0000)]
Some function stub added for new abi messaging.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63691 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse -fnext-runtime for this test.
Daniel Dunbar [Wed, 4 Feb 2009 00:03:15 +0000 (00:03 +0000)]
Use -fnext-runtime for this test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63688 91177308-0d34-0410-b5e6-96231b3b80d8

15 years ago-x language fix.
Fariborz Jahanian [Tue, 3 Feb 2009 23:59:32 +0000 (23:59 +0000)]
-x language fix.
Patch by David Chisnall

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63686 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse CGCall infrastructure to call enumeration mutation function.
Daniel Dunbar [Tue, 3 Feb 2009 23:55:40 +0000 (23:55 +0000)]
Use CGCall infrastructure to call enumeration mutation function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63685 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSeveral new declarations for objc2 nonfragile
Fariborz Jahanian [Tue, 3 Feb 2009 23:49:23 +0000 (23:49 +0000)]
Several new declarations for objc2 nonfragile
abi messaging.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63684 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix return type for calls to objc_setProperty.
Daniel Dunbar [Tue, 3 Feb 2009 23:43:59 +0000 (23:43 +0000)]
Fix return type for calls to objc_setProperty.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63683 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse ConvertTypeForMem when creating alloca for scalar argument.
Daniel Dunbar [Tue, 3 Feb 2009 23:04:57 +0000 (23:04 +0000)]
Use ConvertTypeForMem when creating alloca for scalar argument.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63681 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForce -triple/-fnext-runtime for a few more test cases.
Daniel Dunbar [Tue, 3 Feb 2009 23:04:31 +0000 (23:04 +0000)]
Force -triple/-fnext-runtime for a few more test cases.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63679 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAdd CodeGenFunction::ConvertTypeForMem forwarding function.
Daniel Dunbar [Tue, 3 Feb 2009 23:03:55 +0000 (23:03 +0000)]
Add CodeGenFunction::ConvertTypeForMem forwarding function.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63678 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomore plumbing for #line propagation. Use happy bit #3
Chris Lattner [Tue, 3 Feb 2009 22:13:05 +0000 (22:13 +0000)]
more plumbing for #line propagation.  Use happy bit #3
out of FileInfo :)

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63672 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoForce triple for codegen tests which have expectations on output
Daniel Dunbar [Tue, 3 Feb 2009 21:54:49 +0000 (21:54 +0000)]
Force triple for codegen tests which have expectations on output
types.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63669 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agocodegen is much farther along than when this was first written.
Chris Lattner [Tue, 3 Feb 2009 21:54:08 +0000 (21:54 +0000)]
codegen is much farther along than when this was first written.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63668 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agostub out basic #line handling calls.
Chris Lattner [Tue, 3 Feb 2009 21:52:55 +0000 (21:52 +0000)]
stub out basic #line handling calls.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63667 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoGNUStep fast enumeration.
Fariborz Jahanian [Tue, 3 Feb 2009 21:52:35 +0000 (21:52 +0000)]
GNUStep fast enumeration.
Patch by David Chisnall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63666 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoupdate a couple entries, add a new idea
Chris Lattner [Tue, 3 Feb 2009 21:51:37 +0000 (21:51 +0000)]
update a couple entries, add a new idea

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63665 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agosilence some warnings.
Chris Lattner [Tue, 3 Feb 2009 21:29:32 +0000 (21:29 +0000)]
silence some warnings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63662 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoUse /usr/bin/env to run Python for increased portability. Patch by
Daniel Dunbar [Tue, 3 Feb 2009 21:25:26 +0000 (21:25 +0000)]
Use /usr/bin/env to run Python for increased portability. Patch by
David Chisnall.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63661 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFix <rdar://problem/6521757> clang ObjC rewriter: Mixed Mac and Windows line endings...
Steve Naroff [Tue, 3 Feb 2009 20:39:18 +0000 (20:39 +0000)]
Fix <rdar://problem/6521757> clang ObjC rewriter: Mixed Mac and Windows line endings after rewrite.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63657 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoAllow taking the address of data members, resulting in a member pointer.
Sebastian Redl [Tue, 3 Feb 2009 20:19:35 +0000 (20:19 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63655 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agox86_64 ABI: Initial implementation of ABI compliant parameter passing.
Daniel Dunbar [Tue, 3 Feb 2009 20:00:13 +0000 (20:00 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63654 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove a fixed FIXME
Douglas Gregor [Tue, 3 Feb 2009 19:26:44 +0000 (19:26 +0000)]
Remove a fixed FIXME

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63648 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoWhen looking for a tag name via unqualified name lookup, only look in
Douglas Gregor [Tue, 3 Feb 2009 19:26:08 +0000 (19:26 +0000)]
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63647 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoSemantic analysis, ASTs, and unqualified name lookup support for C++
Douglas Gregor [Tue, 3 Feb 2009 19:21:40 +0000 (19:21 +0000)]
Semantic analysis, ASTs, and unqualified name lookup support for C++
using directives, from Piotr Rak!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63646 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoABI handling: Implement coercion for argument types (in addition to
Daniel Dunbar [Tue, 3 Feb 2009 19:12:28 +0000 (19:12 +0000)]
ABI handling: Implement coercion for argument types (in addition to
return types).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63645 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoir-gen for nonfragile ivar bitfield access (objc2 nonfragile abi).
Fariborz Jahanian [Tue, 3 Feb 2009 19:03:09 +0000 (19:03 +0000)]
ir-gen for nonfragile ivar bitfield access (objc2 nonfragile abi).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63644 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoTargets that don't have stack use global address space for parameters.
Sanjiv Gupta [Tue, 3 Feb 2009 18:07:49 +0000 (18:07 +0000)]
Targets that don't have stack use global address space for parameters.
Specify external linkage for such globals so that llvm optimizer do
not assume there values initialized as zero.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63636 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoMinor objc2 bug fix.
Fariborz Jahanian [Tue, 3 Feb 2009 17:34:34 +0000 (17:34 +0000)]
Minor objc2 bug fix.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63635 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoFixed the typo in comment.
Sanjiv Gupta [Tue, 3 Feb 2009 17:23:12 +0000 (17:23 +0000)]
Fixed the typo in comment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63634 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoreclaim my precious bit in FileInfo by ensuring that ContentCache objects
Chris Lattner [Tue, 3 Feb 2009 07:41:46 +0000 (07:41 +0000)]
reclaim my precious bit in FileInfo by ensuring that ContentCache objects
are 8-byte aligned.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63630 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoswitch SourceManager from using an std::map and std::list of
Chris Lattner [Tue, 3 Feb 2009 07:30:45 +0000 (07:30 +0000)]
switch SourceManager from using an std::map and std::list of
ContentCache objects to using a densemap and list, and allocating
the ContentCache objects from a bump pointer.  This does not speed
up or slow down things substantially, but gives us control over
their alignment.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63628 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agotrue is pass, false is success.
Chris Lattner [Tue, 3 Feb 2009 07:28:12 +0000 (07:28 +0000)]
true is pass, false is success.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63627 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agodisable this test too
Chris Lattner [Tue, 3 Feb 2009 07:25:43 +0000 (07:25 +0000)]
disable this test too

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63626 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agomake this fail faster.
Chris Lattner [Tue, 3 Feb 2009 07:24:53 +0000 (07:24 +0000)]
make this fail faster.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63625 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoadd #include to make more self-contained.
Chris Lattner [Tue, 3 Feb 2009 07:20:54 +0000 (07:20 +0000)]
add #include to make more self-contained.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63624 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoChange ABIInfo to compute information for a full signature at a time
Daniel Dunbar [Tue, 3 Feb 2009 06:51:18 +0000 (06:51 +0000)]
Change ABIInfo to compute information for a full signature at a time
(the main point of this restructing).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63619 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agoRemove ABIArgInfo::Default kind, ABI is now responsible for specifying
Daniel Dunbar [Tue, 3 Feb 2009 06:30:17 +0000 (06:30 +0000)]
Remove ABIArgInfo::Default kind, ABI is now responsible for specifying
acceptable kind with more precise semantics.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63617 91177308-0d34-0410-b5e6-96231b3b80d8