]> granicus.if.org Git - clang/log
clang
15 years agoAdditional tests for write-bariers.
Fariborz Jahanian [Wed, 16 Sep 2009 23:38:26 +0000 (23:38 +0000)]
Additional tests for write-bariers.

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

15 years agoTest for variety of write-barriers.
Fariborz Jahanian [Wed, 16 Sep 2009 23:30:59 +0000 (23:30 +0000)]
Test for variety of write-barriers.

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

15 years agopatch for generating objc'2 objc_assign_ivar. WIP.
Fariborz Jahanian [Wed, 16 Sep 2009 23:11:23 +0000 (23:11 +0000)]
patch for generating objc'2 objc_assign_ivar. WIP.

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

15 years agoImproved representation and support for friend class templates. Angst about same.
John McCall [Wed, 16 Sep 2009 22:47:08 +0000 (22:47 +0000)]
Improved representation and support for friend class templates.  Angst about same.

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

15 years agoCMake: Generate LIT site configuration file for Clang tests, which Daniel will probab...
Douglas Gregor [Wed, 16 Sep 2009 22:30:48 +0000 (22:30 +0000)]
CMake: Generate LIT site configuration file for Clang tests, which Daniel will probably have to fix

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

15 years agoThe CMake build system now derives the Clang version number from VER.
Douglas Gregor [Wed, 16 Sep 2009 21:59:05 +0000 (21:59 +0000)]
The CMake build system now derives the Clang version number from VER.

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

15 years agoStarting patch to generate more specific API for objc's
Fariborz Jahanian [Wed, 16 Sep 2009 21:37:16 +0000 (21:37 +0000)]
Starting patch to generate more specific API for objc's
GC. Currently, new API will be generated under
clang-cc's -fobjc-newgc-api flag which will eventually
become the default. WIP.

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

15 years agoFix spelling.
Mike Stump [Wed, 16 Sep 2009 20:41:09 +0000 (20:41 +0000)]
Fix spelling.

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

15 years agofit in 80 cols
Chris Lattner [Wed, 16 Sep 2009 20:18:54 +0000 (20:18 +0000)]
fit in 80 cols

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

15 years agoImprove handling of vector casts in C++.
Anders Carlsson [Wed, 16 Sep 2009 19:19:43 +0000 (19:19 +0000)]
Improve handling of vector casts in C++.

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

15 years agogrammaro
Chris Lattner [Wed, 16 Sep 2009 18:56:12 +0000 (18:56 +0000)]
grammaro

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

15 years agoTeach Sema::FindInstantiatedDecl to find instantiated RecordDecls even
Douglas Gregor [Wed, 16 Sep 2009 18:34:49 +0000 (18:34 +0000)]
Teach Sema::FindInstantiatedDecl to find instantiated RecordDecls even
when we are not instantiating the corresponding "current
instantiation." This happens, e.g., when we are instantiating a
declaration reference that refers into the "current instantiation" but
occurs in a default function argument. The libstdc++ vector default
constructor now instantiates properly.

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

15 years agoDo not generate write-barrier in indirect assignment to
Fariborz Jahanian [Wed, 16 Sep 2009 18:09:18 +0000 (18:09 +0000)]
Do not generate write-barrier in indirect assignment to
a weak object.

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

15 years agoRemoved a superfluous check before setting
Fariborz Jahanian [Wed, 16 Sep 2009 16:49:08 +0000 (16:49 +0000)]
Removed a superfluous check before setting
a flag (objc GC).

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

15 years agox86-64 ABI: If a type is a C++ record with either a non-trivial destructor or a non...
Anders Carlsson [Wed, 16 Sep 2009 15:53:40 +0000 (15:53 +0000)]
x86-64 ABI: If a type is a C++ record with either a non-trivial destructor or a non-trivial copy constructor, it should be passed in a pointer. Daniel, plz review.

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

15 years agoPR4991: Properly remove trailing newline from __TIMESTAMP__.
Benjamin Kramer [Wed, 16 Sep 2009 13:10:04 +0000 (13:10 +0000)]
PR4991: Properly remove trailing newline from __TIMESTAMP__.
Replace strcpy with memcpy while at it.

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

15 years agoIncremental improvement to logic determining whether we emit unwind tables or
Daniel Dunbar [Wed, 16 Sep 2009 06:17:29 +0000 (06:17 +0000)]
Incremental improvement to logic determining whether we emit unwind tables or
not.
 - PR4932.

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

15 years agoHave divide-by-zero checker not handled undefined denominators. This is handled...
Ted Kremenek [Wed, 16 Sep 2009 06:04:26 +0000 (06:04 +0000)]
Have divide-by-zero checker not handled undefined denominators.  This is handled by the generic checking for undefined operands for BinaryOperators.

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

15 years agoRemove ImplicitBadDivides/ExplicitBadDivides node sets. This checking is now down...
Ted Kremenek [Wed, 16 Sep 2009 06:03:39 +0000 (06:03 +0000)]
Remove ImplicitBadDivides/ExplicitBadDivides node sets.  This checking is now down by a 'Checker' and not build into GRExprEngine.

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

15 years agofix some ppc register name issues, patch by Richard Pennington!
Chris Lattner [Wed, 16 Sep 2009 05:05:27 +0000 (05:05 +0000)]
fix some ppc register name issues, patch by Richard Pennington!

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

15 years agoA toy for Doug: Add some 'lit' tests which just run clang++ -fsyntax-only over all...
Daniel Dunbar [Wed, 16 Sep 2009 01:40:13 +0000 (01:40 +0000)]
A toy for Doug: Add some 'lit' tests which just run clang++ -fsyntax-only over all the files in a directory.
 - 'lit utils/C++Tests' to run, you may need to fix the stdc++ include path, and your mileage may vary.

 - A handful of the LLVM headers are XFAIL because they don't include the right headers.

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

15 years agotests: Stash clang/clang-cc and LLVM src/obj paths for use elsewhere.
Daniel Dunbar [Wed, 16 Sep 2009 01:39:52 +0000 (01:39 +0000)]
tests: Stash clang/clang-cc and LLVM src/obj paths for use elsewhere.

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

15 years agoChris doesn't want the FIXME.
Mike Stump [Wed, 16 Sep 2009 01:35:21 +0000 (01:35 +0000)]
Chris doesn't want the FIXME.

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

15 years agoAdd a FIXME, so the next person don't trip as hard on the landmines.
Mike Stump [Wed, 16 Sep 2009 01:31:09 +0000 (01:31 +0000)]
Add a FIXME, so the next person don't trip as hard on the landmines.

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

15 years agoCollapse more clang version numbers down into fewer places.
Mike Stump [Wed, 16 Sep 2009 01:26:05 +0000 (01:26 +0000)]
Collapse more clang version numbers down into fewer places.

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

15 years agoSome people don't want to fix their broken code just yet, so turn off
Mike Stump [Wed, 16 Sep 2009 00:39:34 +0000 (00:39 +0000)]
Some people don't want to fix their broken code just yet, so turn off
hard error for falling off a noreturn function.

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

15 years agoFix a typo in a FIXME
Douglas Gregor [Wed, 16 Sep 2009 00:01:48 +0000 (00:01 +0000)]
Fix a typo in a FIXME

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

15 years agoBack to 1.1 we go.
Mike Stump [Tue, 15 Sep 2009 23:04:22 +0000 (23:04 +0000)]
Back to 1.1 we go.

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

15 years agoIn building list of visible conversion functions, use
Fariborz Jahanian [Tue, 15 Sep 2009 23:02:16 +0000 (23:02 +0000)]
In building list of visible conversion functions, use
result type of template convesion functions.

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

15 years agoBack out for now, as apparently there is some really broken code somewhere.
Mike Stump [Tue, 15 Sep 2009 22:49:27 +0000 (22:49 +0000)]
Back out for now, as apparently there is some really broken code somewhere.

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

15 years agoWhen implicitly declaring operators new, new[], delete, and delete[],
Douglas Gregor [Tue, 15 Sep 2009 22:30:29 +0000 (22:30 +0000)]
When implicitly declaring operators new, new[], delete, and delete[],
give them the appropriate exception specifications. This,
unfortunately, requires us to maintain and/or implicitly generate
handles to namespace "std" and the class "std::bad_alloc". However,
every other approach I've come up with was more hackish, and this
standard requirement itself is quite the hack.

Fixes PR4829.

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

15 years agoUpdate Clang version for CMake
Douglas Gregor [Tue, 15 Sep 2009 22:30:13 +0000 (22:30 +0000)]
Update Clang version for CMake

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

15 years ago1) don't do overload resolution in selecting conversion
Fariborz Jahanian [Tue, 15 Sep 2009 22:15:23 +0000 (22:15 +0000)]
1) don't do overload resolution in selecting conversion
to pointer function for delete expression. 2)
Treat type conversion function and its 'const' version
as identical in building the visible conversion list.

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

15 years agoBump.
Mike Stump [Tue, 15 Sep 2009 22:08:24 +0000 (22:08 +0000)]
Bump.

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

15 years agoBe sure to use the correct version instead of the wrong one.
Mike Stump [Tue, 15 Sep 2009 21:49:22 +0000 (21:49 +0000)]
Be sure to use the correct version instead of the wrong one.

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

15 years agoBe sure to use the correct version instead of inventing the wrong one.
Mike Stump [Tue, 15 Sep 2009 21:48:34 +0000 (21:48 +0000)]
Be sure to use the correct version instead of inventing the wrong one.

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

15 years agoAdd back the workaround since it lead to constructor conversion bugs :(
Anders Carlsson [Tue, 15 Sep 2009 21:14:33 +0000 (21:14 +0000)]
Add back the workaround since it lead to constructor conversion bugs :(

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

15 years agoCommit test case from PR4655, which tests the canonical-types fix in r81913
Douglas Gregor [Tue, 15 Sep 2009 21:14:05 +0000 (21:14 +0000)]
Commit test case from PR4655, which tests the canonical-types fix in r81913

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

15 years agoMake sure we're comparing the canonical types when we determine
Douglas Gregor [Tue, 15 Sep 2009 20:50:23 +0000 (20:50 +0000)]
Make sure we're comparing the canonical types when we determine
whether a constructor is a copy constructor.

Sadly, I wasn't able to get down to a test case smaller than libstdc++'s
<string>.

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

15 years ago- clang_getCursor(): Replace asserts with error codes (CXCursor_InvalidFile, CXCursor...
Steve Naroff [Tue, 15 Sep 2009 20:25:34 +0000 (20:25 +0000)]
- clang_getCursor(): Replace asserts with error codes (CXCursor_InvalidFile, CXCursor_NoDeclFound).
- Add predicate clang_isInvalid().
- Implement clang_getCursorFromDecl().

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

15 years agoWhen printing an overload candidate that is a function template specialization,
Douglas Gregor [Tue, 15 Sep 2009 20:11:42 +0000 (20:11 +0000)]
When printing an overload candidate that is a function template specialization,
point at the template and print out its template arguments, e.g.,

ambiguous-ovl-print.cpp:5:8: note: candidate function template specialization
      [with T = int]
  void f(T*, long);

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

15 years agoIssue good diagnostics when initialization failes due to
Fariborz Jahanian [Tue, 15 Sep 2009 19:12:21 +0000 (19:12 +0000)]
Issue good diagnostics when initialization failes due to
ambiguity in type conversion function selection.

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

15 years agoAdd an assertion and a test case, in a fruitless attempt to track down an existing bug
Douglas Gregor [Tue, 15 Sep 2009 18:26:13 +0000 (18:26 +0000)]
Add an assertion and a test case, in a fruitless attempt to track down an existing bug

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

15 years agoFix static analyzer regression when emitting undefined value warnings
Ted Kremenek [Tue, 15 Sep 2009 17:43:54 +0000 (17:43 +0000)]
Fix static analyzer regression when emitting undefined value warnings
with binary operators.  The result of a binary operator may be
undefined even if its operands are well-defined.

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

15 years agoPerform overload resolution when selecting a pointer conversion
Fariborz Jahanian [Tue, 15 Sep 2009 17:21:47 +0000 (17:21 +0000)]
Perform overload resolution when selecting a pointer conversion
function for delete of a class expression and issue
good diagnostic when result is ambiguous.

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

15 years agoSlightly improved template argument deduction for use in partial
Douglas Gregor [Tue, 15 Sep 2009 16:51:42 +0000 (16:51 +0000)]
Slightly improved template argument deduction for use in partial
ordering, along with another test case for partial ordering of partial
specializations.

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

15 years agoAdd test case.
Anders Carlsson [Tue, 15 Sep 2009 16:36:17 +0000 (16:36 +0000)]
Add test case.

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

15 years agoCode generation of Conditional operators that are lvalues (but that aren't bitfields).
Anders Carlsson [Tue, 15 Sep 2009 16:35:24 +0000 (16:35 +0000)]
Code generation of Conditional operators that are lvalues (but that aren't bitfields).

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

15 years agoImplement partial ordering of class template partial specializations
Douglas Gregor [Tue, 15 Sep 2009 16:23:51 +0000 (16:23 +0000)]
Implement partial ordering of class template partial specializations
(C++ [temp.class.order]).

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

15 years agoUpdate for inherited conversion function support.
Fariborz Jahanian [Tue, 15 Sep 2009 16:15:23 +0000 (16:15 +0000)]
Update for inherited conversion function support.

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

15 years agoUse getTrueExpr/getFalseExpr as suggested by Doug.
Anders Carlsson [Tue, 15 Sep 2009 16:03:44 +0000 (16:03 +0000)]
Use getTrueExpr/getFalseExpr as suggested by Doug.

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

15 years agoIf a conversion operator exists in a base class, make sure to cast the object to...
Anders Carlsson [Tue, 15 Sep 2009 07:42:44 +0000 (07:42 +0000)]
If a conversion operator exists in a base class, make sure to cast the object to that base class.

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

15 years agoWhen performing an user defined conversion sequence, perform the initial standard...
Anders Carlsson [Tue, 15 Sep 2009 06:28:28 +0000 (06:28 +0000)]
When performing an user defined conversion sequence, perform the initial standard conversion sequence. This lets us remove a workaround in SemaCompleteConstructorCall.

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

15 years agoRevert for real.
Anders Carlsson [Tue, 15 Sep 2009 05:49:31 +0000 (05:49 +0000)]
Revert for real.

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

15 years agoWhoops, didn't mean to commit this.
Anders Carlsson [Tue, 15 Sep 2009 05:31:01 +0000 (05:31 +0000)]
Whoops, didn't mean to commit this.

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

15 years agoOnly reuse an already existing ImplicitCastExpr if the cast kinds are the same.
Anders Carlsson [Tue, 15 Sep 2009 05:28:24 +0000 (05:28 +0000)]
Only reuse an already existing ImplicitCastExpr if the cast kinds are the same.

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

15 years agoGet rid of the CastInfo struct.
Anders Carlsson [Tue, 15 Sep 2009 05:13:45 +0000 (05:13 +0000)]
Get rid of the CastInfo struct.

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

15 years agoHandle reinterpret_cast between integral types and pointer types.
Anders Carlsson [Tue, 15 Sep 2009 04:48:33 +0000 (04:48 +0000)]
Handle reinterpret_cast between integral types and pointer types.

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

15 years agoCodegen support for nullptr from C++0x.
Anders Carlsson [Tue, 15 Sep 2009 04:39:46 +0000 (04:39 +0000)]
Codegen support for nullptr from C++0x.

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

15 years agoPer feedback from Eli, recognize in the transfer function logic for
Ted Kremenek [Tue, 15 Sep 2009 04:19:09 +0000 (04:19 +0000)]
Per feedback from Eli, recognize in the transfer function logic for
__builtin_offsetof in the static analyzer that __builtin_offsetof is
not guaranteed to return an integer constant.  We will need to shore
this up later, but now at least we have correct support for when this
*is* an integer constant.

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

15 years agoFix typo in comment.
Ted Kremenek [Tue, 15 Sep 2009 03:28:00 +0000 (03:28 +0000)]
Fix typo in comment.

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

15 years agoAdd static analyzer transfer function support for __builtin_offsetof.
Ted Kremenek [Tue, 15 Sep 2009 00:40:32 +0000 (00:40 +0000)]
Add static analyzer transfer function support for __builtin_offsetof.

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

15 years agoIssue a good diagnostics when attempt to select
Fariborz Jahanian [Tue, 15 Sep 2009 00:10:11 +0000 (00:10 +0000)]
Issue a good diagnostics when attempt to select
a type convesion function results in ambiguity.

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

15 years agoclang tracks multiple levels of macro expansion
Chris Lattner [Mon, 14 Sep 2009 23:44:08 +0000 (23:44 +0000)]
clang tracks multiple levels of macro expansion

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

15 years agoDiagnose taking the address of a bit-field inside a conditional operator.
Anders Carlsson [Mon, 14 Sep 2009 23:15:26 +0000 (23:15 +0000)]
Diagnose taking the address of a bit-field inside a conditional operator.

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

15 years agoImplement partial ordering of function templates when calling a
Douglas Gregor [Mon, 14 Sep 2009 23:02:14 +0000 (23:02 +0000)]
Implement partial ordering of function templates when calling a
conversion function.

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

15 years agoSlightly improve the test for partial ordering of overloaded function
Douglas Gregor [Mon, 14 Sep 2009 22:31:20 +0000 (22:31 +0000)]
Slightly improve the test for partial ordering of overloaded function
templates.

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

15 years agoTest function template partial ordering when resolving the address of
Douglas Gregor [Mon, 14 Sep 2009 22:02:01 +0000 (22:02 +0000)]
Test function template partial ordering when resolving the address of
an overloaded function (template).

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

15 years agoFix: <rdar://problem/5905851> do not report a leak when post-dominated by a call
Ted Kremenek [Mon, 14 Sep 2009 22:01:32 +0000 (22:01 +0000)]
Fix: <rdar://problem/5905851> do not report a leak when post-dominated by a call
                              to a noreturn or panic function

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

15 years agoUpdate tests
Anders Carlsson [Mon, 14 Sep 2009 22:00:20 +0000 (22:00 +0000)]
Update tests

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

15 years agoSkeletal support for friend class templates.
John McCall [Mon, 14 Sep 2009 21:59:20 +0000 (21:59 +0000)]
Skeletal support for friend class templates.

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

15 years agoARM/[A]APCS: Ignore empty records passed as arguments.
Daniel Dunbar [Mon, 14 Sep 2009 21:54:03 +0000 (21:54 +0000)]
ARM/[A]APCS: Ignore empty records passed as arguments.

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

15 years agoFor consistency, use "bit-field" instead of "bitfield" in our diagnostics.
Anders Carlsson [Mon, 14 Sep 2009 21:48:24 +0000 (21:48 +0000)]
For consistency, use "bit-field" instead of "bitfield" in our diagnostics.

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

15 years agoRefactor MarkDeductedTemplateParameters into
Douglas Gregor [Mon, 14 Sep 2009 21:25:05 +0000 (21:25 +0000)]
Refactor MarkDeductedTemplateParameters into
MarkUsedTemplateParameters, which is able to mark template parameters
used within non-deduced contexts as well as deduced contexts. Use this
to finish the implementation of [temp.deduct.partial]p11.

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

15 years agoUsed visible conversion function api to do overload
Fariborz Jahanian [Mon, 14 Sep 2009 20:41:01 +0000 (20:41 +0000)]
Used visible conversion function api to do overload
resolution of type conversion functions in base and
current class.

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

15 years agoImplement FIXME: free up BugReportEquivClass objects when deleting BugTypes.
Ted Kremenek [Mon, 14 Sep 2009 20:40:59 +0000 (20:40 +0000)]
Implement FIXME: free up BugReportEquivClass objects when deleting BugTypes.

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

15 years agoForce triple.
Daniel Dunbar [Mon, 14 Sep 2009 20:21:18 +0000 (20:21 +0000)]
Force triple.

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

15 years ago-Wchar-subscripts should not warn for explicit signed char subscripts either. Another...
Sam Weinig [Mon, 14 Sep 2009 20:14:57 +0000 (20:14 +0000)]
-Wchar-subscripts should not warn for explicit signed char subscripts either. Another fix for PR4978.

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

15 years agoTighten up checking of non-dependent arguments as part of template
Douglas Gregor [Mon, 14 Sep 2009 20:00:47 +0000 (20:00 +0000)]
Tighten up checking of non-dependent arguments as part of template
argument deduction. This fixes the new test case (since partial
ordering does not have a "verify the results of deduction" step), and
will allow failed template argument deductions to return more quickly
for, e.g., matching class template partial specializations.

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

15 years agoSmall fix to stop CGObjCGNU emitting symbols that break some versions of gas.
David Chisnall [Mon, 14 Sep 2009 19:04:10 +0000 (19:04 +0000)]
Small fix to stop CGObjCGNU emitting symbols that break some versions of gas.

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

15 years agoImplement partial ordering of function template specializations
Douglas Gregor [Mon, 14 Sep 2009 18:39:43 +0000 (18:39 +0000)]
Implement partial ordering of function template specializations
(C++ [temp.func.order]).

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

15 years ago-Wchar-subscripts should not warn for unsigned char subscripts. Fixes PR4978.
Sam Weinig [Mon, 14 Sep 2009 18:17:16 +0000 (18:17 +0000)]
-Wchar-subscripts should not warn for unsigned char subscripts. Fixes PR4978.

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

15 years agoRemove duplicate definition of char-subscripts DiagGroup.
Sam Weinig [Mon, 14 Sep 2009 17:50:09 +0000 (17:50 +0000)]
Remove duplicate definition of char-subscripts DiagGroup.

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

15 years agoRemoved couple of FIXME comments from test case.
Fariborz Jahanian [Mon, 14 Sep 2009 17:32:50 +0000 (17:32 +0000)]
Removed couple of FIXME comments from test case.

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

15 years agoUsing the property dot-syntax to invoke a non-eixsting
Fariborz Jahanian [Mon, 14 Sep 2009 16:40:48 +0000 (16:40 +0000)]
Using the property dot-syntax to invoke a non-eixsting
structure-valued setter should cause a user error instead of
crash.

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

15 years agoRemove an unnecessary FunctionDecl parameter to the synthesizing functions.
Anders Carlsson [Mon, 14 Sep 2009 05:32:02 +0000 (05:32 +0000)]
Remove an unnecessary FunctionDecl parameter to the synthesizing functions.

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

15 years agoFix subtle bug in generating LLVM function declarations for builtin functions.
Daniel Dunbar [Mon, 14 Sep 2009 04:33:21 +0000 (04:33 +0000)]
Fix subtle bug in generating LLVM function declarations for builtin functions.

The decl wasn't being passed down, which meant that function attributes were not
being set correctly. This is particularly important for ARM, since it wants to
override the calling convention. Instead we would emit the builtin with the
wrong calling convention, and instcombine would come along and merrily shred all
the calls to it. :)

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

15 years agoARM/APCS: Don't treat structs w/ floating point types as "integer like".
Daniel Dunbar [Mon, 14 Sep 2009 02:20:34 +0000 (02:20 +0000)]
ARM/APCS: Don't treat structs w/ floating point types as "integer like".

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

15 years agoAdd support for -Wchar-subscripts. Fixes PR4801.
Sam Weinig [Mon, 14 Sep 2009 01:58:58 +0000 (01:58 +0000)]
Add support for -Wchar-subscripts. Fixes PR4801.

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

15 years agoIf a function call returns a reference, don't bind it to a temporary.
Anders Carlsson [Mon, 14 Sep 2009 01:30:44 +0000 (01:30 +0000)]
If a function call returns a reference, don't bind it to a temporary.

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

15 years agoImplement CodeGenFunction::EmitCXXExprWithTemporariesLValue.
Anders Carlsson [Mon, 14 Sep 2009 01:10:45 +0000 (01:10 +0000)]
Implement CodeGenFunction::EmitCXXExprWithTemporariesLValue.

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

15 years agoSome minor clang/ARM/AAPCS tweaks.
Daniel Dunbar [Mon, 14 Sep 2009 00:56:55 +0000 (00:56 +0000)]
Some minor clang/ARM/AAPCS tweaks.

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

15 years agoAdd TargetInfo::getABI(), and base ARM APCS vs AAPCS choice on that.
Daniel Dunbar [Mon, 14 Sep 2009 00:35:03 +0000 (00:35 +0000)]
Add TargetInfo::getABI(), and base ARM APCS vs AAPCS choice on that.

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

15 years agoSupport -mabi= for clang/ARM.
Daniel Dunbar [Mon, 14 Sep 2009 00:34:46 +0000 (00:34 +0000)]
Support -mabi= for clang/ARM.

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

15 years agoHandle delete where the class has a virtual destructor.
Anders Carlsson [Mon, 14 Sep 2009 00:16:25 +0000 (00:16 +0000)]
Handle delete where the class has a virtual destructor.

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

15 years agoARM target tweaks.
Daniel Dunbar [Mon, 14 Sep 2009 00:02:24 +0000 (00:02 +0000)]
ARM target tweaks.
 - Change TargetData string to match llvm-gcc.
 - Some -target-abi support for 'apcs-gnu', most importantly the alignment of double and long long changes.

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

15 years agoAdd -target-abi clang-cc option, currently unused.
Daniel Dunbar [Mon, 14 Sep 2009 00:02:12 +0000 (00:02 +0000)]
Add -target-abi clang-cc option, currently unused.

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

15 years agoFix a bug in getFriendObjectKind where we would clear out all mask bits except IDNS_T...
Anders Carlsson [Sun, 13 Sep 2009 23:59:13 +0000 (23:59 +0000)]
Fix a bug in getFriendObjectKind where we would clear out all mask bits except IDNS_TagFriend and IDNS_OrdinaryFriend but then check for IDNS_Tag and IDNS_Ordinary.

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

15 years agoPerform the C++ specific semantic checks of a function declaration after it's been...
Anders Carlsson [Sun, 13 Sep 2009 21:33:06 +0000 (21:33 +0000)]
Perform the C++ specific semantic checks of a function declaration after it's been merged with the previous declaration. This ensures that getPreviousDecl() will have the right value when ActOnConversionDeclarator is called.

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

15 years agoCXXMethodDecl::isVirtual needs to check the canonical declaration. Fixes PR4878.
Anders Carlsson [Sun, 13 Sep 2009 21:01:57 +0000 (21:01 +0000)]
CXXMethodDecl::isVirtual needs to check the canonical declaration. Fixes PR4878.

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