]> granicus.if.org Git - clang/log
clang
15 years agoAdd parsing for references to member function templates with explicit
Douglas Gregor [Mon, 31 Aug 2009 21:16:32 +0000 (21:16 +0000)]
Add parsing for references to member function templates with explicit
template argument lists, e.g., x.f<int>().

Semantic analysis will be a separate commit.

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

15 years agoPR4836, part 1: add Sema support for __builtin_isnan and friends; they
Eli Friedman [Mon, 31 Aug 2009 20:06:00 +0000 (20:06 +0000)]
PR4836, part 1: add Sema support for __builtin_isnan and friends; they
are apparently used by Solaris libc despite the fact that clang claims
to be compatible with gcc 4.2, which doesn't support them.

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

15 years agoImplement template instantiation for member operator access.
Douglas Gregor [Mon, 31 Aug 2009 20:00:26 +0000 (20:00 +0000)]
Implement template instantiation for member operator access.

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

15 years agoSupport explicit C++ member operator syntax, from James Porter!
Douglas Gregor [Mon, 31 Aug 2009 19:52:13 +0000 (19:52 +0000)]
Support explicit C++ member operator syntax, from James Porter!

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

15 years agoRe-implemented generation of objc_memmove_collectable
Fariborz Jahanian [Mon, 31 Aug 2009 19:33:16 +0000 (19:33 +0000)]
Re-implemented generation of objc_memmove_collectable
API for copying GC'able aggregates (Next runtime only).

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

15 years agoFix a -Asserts warning.
Daniel Dunbar [Mon, 31 Aug 2009 19:16:38 +0000 (19:16 +0000)]
Fix a -Asserts warning.

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

15 years agoAdded test cases for presence and absence of __has_feature(objc_nonfragile_abi) with...
David Chisnall [Mon, 31 Aug 2009 16:53:06 +0000 (16:53 +0000)]
Added test cases for presence and absence of __has_feature(objc_nonfragile_abi) with and without -fobjc-nonfragile-abi.

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

15 years agoUpdated GNU runtime non-fragile ABI.
David Chisnall [Mon, 31 Aug 2009 16:41:57 +0000 (16:41 +0000)]
Updated GNU runtime non-fragile ABI.
Added -fconstant-string-class= option.
Added __has_feature() test for non-fragile ABI.

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

15 years agoImplement source/line/column hooks.
Steve Naroff [Mon, 31 Aug 2009 14:26:51 +0000 (14:26 +0000)]
Implement source/line/column hooks.

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

15 years agoMore fleshing out the C-based indexing API (under construction).
Steve Naroff [Mon, 31 Aug 2009 00:59:03 +0000 (00:59 +0000)]
More fleshing out the C-based indexing API (under construction).

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

15 years agoMore missing member goodness.
Anders Carlsson [Sun, 30 Aug 2009 07:09:50 +0000 (07:09 +0000)]
More missing member goodness.

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

15 years agoImprove missing error messages as suggested by Doug.
Anders Carlsson [Sun, 30 Aug 2009 06:49:43 +0000 (06:49 +0000)]
Improve missing error messages as suggested by Doug.

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

15 years agoUse DiagnoseMissingMember for UsingDecls.
Anders Carlsson [Sun, 30 Aug 2009 00:58:45 +0000 (00:58 +0000)]
Use DiagnoseMissingMember for UsingDecls.

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

15 years agoImprove diagnostics for missing members. This renames the err_typecheck_no_member...
Anders Carlsson [Sun, 30 Aug 2009 00:54:35 +0000 (00:54 +0000)]
Improve diagnostics for missing members. This renames the err_typecheck_no_member to err_typecheck_no_member_deprecated. The idea is that err_typecheck_no_member_deprecated should be phased out and any call sites that reference it should call DiagnoseMissingMember instead.

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

15 years agoUnbreak tests. I'll look into why this is necessary later.
Eli Friedman [Sun, 30 Aug 2009 00:53:54 +0000 (00:53 +0000)]
Unbreak tests.  I'll look into why this is necessary later.

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

15 years agoFix the start source location for type-specs like long, short, etc.
Argyrios Kyrtzidis [Sat, 29 Aug 2009 22:39:34 +0000 (22:39 +0000)]
Fix the start source location for type-specs like long, short, etc.

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

15 years agoFix TypeLoc::operator bool().
Argyrios Kyrtzidis [Sat, 29 Aug 2009 22:39:19 +0000 (22:39 +0000)]
Fix TypeLoc::operator bool().

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

15 years agoMake instantiating initializers for classes with a dependent base type
Eli Friedman [Sat, 29 Aug 2009 22:22:07 +0000 (22:22 +0000)]
Make instantiating initializers for classes with a dependent base type
work correctly.

The change in lib/AST/DeclCXX.cpp is mostly a large reindentation; I
couldn't figure out a good way to avoid it.

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

15 years agoMake IRGen for initializing a member reference work correctly.
Eli Friedman [Sat, 29 Aug 2009 20:58:20 +0000 (20:58 +0000)]
Make IRGen for initializing a member reference work correctly.

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

15 years agoAdd a workaround for decls that come from friend decls pointing to undeclared classes.
Anders Carlsson [Sat, 29 Aug 2009 20:47:47 +0000 (20:47 +0000)]
Add a workaround for decls that come from friend decls pointing to undeclared classes.

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

15 years agoIn DeclPrinter, assert when asked to print AS_None.
Anders Carlsson [Sat, 29 Aug 2009 20:36:12 +0000 (20:36 +0000)]
In DeclPrinter, assert when asked to print AS_None.

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

15 years agoPatch to ir-gen user-defined conversions used in expressions
Fariborz Jahanian [Sat, 29 Aug 2009 20:33:32 +0000 (20:33 +0000)]
Patch to ir-gen user-defined conversions used in expressions
[12.3.2-p3]

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

15 years agoSet the access specifier for using decls.
Anders Carlsson [Sat, 29 Aug 2009 19:54:19 +0000 (19:54 +0000)]
Set the access specifier for using decls.

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

15 years agoImprove instantiation of UnresolvedUsingDecls.
Anders Carlsson [Sat, 29 Aug 2009 19:37:28 +0000 (19:37 +0000)]
Improve instantiation of UnresolvedUsingDecls.

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

15 years agoPatch for code gen. for c-style cast which ends in
Fariborz Jahanian [Sat, 29 Aug 2009 19:15:16 +0000 (19:15 +0000)]
Patch for code gen. for c-style cast which ends in
using class's conversion functions [12.3.2-p2]

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

15 years agoGet rid of mostly-unused, buggy method.
Eli Friedman [Sat, 29 Aug 2009 19:09:59 +0000 (19:09 +0000)]
Get rid of mostly-unused, buggy method.

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

15 years agogcc 4.4 needs cstdio for printf. Reorder includes while at it.
Benjamin Kramer [Sat, 29 Aug 2009 12:56:35 +0000 (12:56 +0000)]
gcc 4.4 needs cstdio for printf. Reorder includes while at it.

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

15 years agoTest case.
John McCall [Sat, 29 Aug 2009 08:20:44 +0000 (08:20 +0000)]
Test case.

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

15 years agoFix the breakage by handling indirect instantiations. This would be much
John McCall [Sat, 29 Aug 2009 08:11:13 +0000 (08:11 +0000)]
Fix the breakage by handling indirect instantiations.  This would be much
improved if there were a consistent name for getInstantiatedFromMemberX()
across all classes.  Cheap refactor if someone wants to do it, but let's get the
buildbots happy first.

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

15 years agoInstantiate member and base initializers. Patch by Anders Johnsen! (tweaked slightly...
Anders Carlsson [Sat, 29 Aug 2009 05:16:22 +0000 (05:16 +0000)]
Instantiate member and base initializers. Patch by Anders Johnsen! (tweaked slightly by me)

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

15 years agoFix a couple issues with parsing invalid nested-name-specifiers.
Eli Friedman [Sat, 29 Aug 2009 04:08:08 +0000 (04:08 +0000)]
Fix a couple issues with parsing invalid nested-name-specifiers.

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

15 years agoFor consistency, just make friend declarations AS_public.
John McCall [Sat, 29 Aug 2009 03:50:18 +0000 (03:50 +0000)]
For consistency, just make friend declarations AS_public.

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

15 years agoFix a last-minute typo and make the test not emit temporaries.
John McCall [Sat, 29 Aug 2009 03:28:20 +0000 (03:28 +0000)]
Fix a last-minute typo and make the test not emit temporaries.

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

15 years agoEnsure code generation for friend declarations in class templates.
John McCall [Sat, 29 Aug 2009 03:16:09 +0000 (03:16 +0000)]
Ensure code generation for friend declarations in class templates.

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

15 years agoRefactor undefined argument checking into a Checker.
Zhongxing Xu [Sat, 29 Aug 2009 02:11:01 +0000 (02:11 +0000)]
Refactor undefined argument checking into a Checker.

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

15 years agoStore the SourceLocation of right parentheses in member initializers. Patch by Anders...
Anders Carlsson [Sat, 29 Aug 2009 01:31:33 +0000 (01:31 +0000)]
Store the SourceLocation of right parentheses in member initializers. Patch by Anders Johnsen!

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

15 years agoDon't assert that friend declarations must have access specifiers for now.
Anders Carlsson [Sat, 29 Aug 2009 01:13:02 +0000 (01:13 +0000)]
Don't assert that friend declarations must have access specifiers for now.

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

15 years agoCreateDeclRefExprs that point to UnresolvedUsingDecls.
Anders Carlsson [Sat, 29 Aug 2009 01:06:32 +0000 (01:06 +0000)]
CreateDeclRefExprs that point to UnresolvedUsingDecls.

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

15 years agoAdd another check for UnresolvedUsingDecl.
Anders Carlsson [Sat, 29 Aug 2009 00:56:38 +0000 (00:56 +0000)]
Add another check for UnresolvedUsingDecl.

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

15 years agoiGenerate vcalls as we build up the methods. WIP.
Mike Stump [Fri, 28 Aug 2009 23:22:54 +0000 (23:22 +0000)]
iGenerate vcalls as we build up the methods.  WIP.

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

15 years agoMake sure we actually found a redeclaration before complaining about attributes added...
Douglas Gregor [Fri, 28 Aug 2009 22:54:55 +0000 (22:54 +0000)]
Make sure we actually found a redeclaration before complaining about attributes added to a redeclaration in C++

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

15 years agoAdd printing of access specifiers to DeclPrinter. The formatting is pretty bad but...
Anders Carlsson [Fri, 28 Aug 2009 22:39:52 +0000 (22:39 +0000)]
Add printing of access specifiers to DeclPrinter. The formatting is pretty bad but it works :)

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

15 years agoRemove #if 0'd code that is clearly not needed
Douglas Gregor [Fri, 28 Aug 2009 22:06:43 +0000 (22:06 +0000)]
Remove #if 0'd code that is clearly not needed

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

15 years agopath to ir-gen 12.3.1 Conversion by constructor
Fariborz Jahanian [Fri, 28 Aug 2009 22:04:50 +0000 (22:04 +0000)]
path to ir-gen 12.3.1 Conversion by constructor

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

15 years agoDon't crash when instantiating templates containing anonymous structs/unions
Douglas Gregor [Fri, 28 Aug 2009 22:03:51 +0000 (22:03 +0000)]
Don't crash when instantiating templates containing anonymous structs/unions

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

15 years agoTest instantiation of static data members that live within nested
Douglas Gregor [Fri, 28 Aug 2009 21:41:19 +0000 (21:41 +0000)]
Test instantiation of static data members that live within nested
member templates.

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

15 years agoTest instantiations of out-of-line member definitions of nested templates.
Douglas Gregor [Fri, 28 Aug 2009 21:15:08 +0000 (21:15 +0000)]
Test instantiations of out-of-line member definitions of nested templates.

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

15 years agoFix and test template instantiation for nested member templates.
Douglas Gregor [Fri, 28 Aug 2009 21:09:48 +0000 (21:09 +0000)]
Fix and test template instantiation for nested member templates.

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

15 years agoTighten up the conversion from a single-level template argument list
Douglas Gregor [Fri, 28 Aug 2009 20:50:45 +0000 (20:50 +0000)]
Tighten up the conversion from a single-level template argument list
to a multi-level template argument list by making it explicit. The
forced auditing of callers found a bug in the instantiation of member
classes inside member templates.

I *love* static type systems.

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

15 years agoRemove the conversion from a multi-level template argument list back to a single...
Douglas Gregor [Fri, 28 Aug 2009 20:33:09 +0000 (20:33 +0000)]
Remove the conversion from a multi-level template argument list back to a single template argument list. We no longer need this crutch

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

15 years agoImplement template instantiation for member class templates.
Douglas Gregor [Fri, 28 Aug 2009 20:31:08 +0000 (20:31 +0000)]
Implement template instantiation for member class templates.

When performing template instantiation of the definitions of member
templates (or members thereof),  we build a data structure containing
the template arguments from each "level" of template
instantiation. During template instantiation, we substitute all levels
of template arguments simultaneously.

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

15 years agoAdd uninitialized values test case.
Ted Kremenek [Fri, 28 Aug 2009 20:25:33 +0000 (20:25 +0000)]
Add uninitialized values test case.

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

15 years agoretain/release checker: [CIContext createCGImage...] and friends returned CF
Ted Kremenek [Fri, 28 Aug 2009 19:52:12 +0000 (19:52 +0000)]
retain/release checker: [CIContext createCGImage...] and friends returned CF
objects that are not automatically garbage collected. This fixes
<rdar://problem/7174400>.

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

15 years agoImprove support for using decls in the decl printer.
Anders Carlsson [Fri, 28 Aug 2009 19:16:39 +0000 (19:16 +0000)]
Improve support for using decls in the decl printer.

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

15 years agoAdd CIndex dependencies: libLLVMC and libclangSema (for IdentifierResolver).
Ted Kremenek [Fri, 28 Aug 2009 18:33:53 +0000 (18:33 +0000)]
Add CIndex dependencies: libLLVMC and libclangSema (for IdentifierResolver).

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

15 years agoTweak CIndex file to resolve to linking issues with the clang libraries. In
Ted Kremenek [Fri, 28 Aug 2009 18:29:48 +0000 (18:29 +0000)]
Tweak CIndex file to resolve to linking issues with the clang libraries. In
particular, clangFrontend was not being linked in.

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

15 years agoCheck for UnresolvedUsingDecl when determining if a declaration is a redeclaration...
Anders Carlsson [Fri, 28 Aug 2009 17:57:07 +0000 (17:57 +0000)]
Check for UnresolvedUsingDecl when determining if a declaration is a redeclaration or not.

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

15 years agotest case for my last patch.
Fariborz Jahanian [Fri, 28 Aug 2009 17:53:05 +0000 (17:53 +0000)]
test case for my last patch.

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

15 years agopatch to prevent crash in hopelessly incorrect
Fariborz Jahanian [Fri, 28 Aug 2009 17:52:37 +0000 (17:52 +0000)]
patch to prevent crash in hopelessly incorrect
method definition with labels.

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

15 years agoCollect multiple levels of template arguments into a new type,
Douglas Gregor [Fri, 28 Aug 2009 17:37:35 +0000 (17:37 +0000)]
Collect multiple levels of template arguments into a new type,
MultiLevelTemplateArgumentList. This is a baby step toward
instantiating member templates; no intended functionality change yet.

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

15 years agoFix this for real.
Anders Carlsson [Fri, 28 Aug 2009 16:57:08 +0000 (16:57 +0000)]
Fix this for real.

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

15 years agoHide IdxVisitor and remove unimplemented method (causing link errors on x86_64
Daniel Dunbar [Fri, 28 Aug 2009 16:30:07 +0000 (16:30 +0000)]
Hide IdxVisitor and remove unimplemented method (causing link errors on x86_64
linux builder).

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

15 years agoTest case for conversion type method call ir-gen.
Fariborz Jahanian [Fri, 28 Aug 2009 16:23:54 +0000 (16:23 +0000)]
Test case for conversion type method call ir-gen.

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

15 years agoAllow explicit ctors for casts.
Anders Carlsson [Fri, 28 Aug 2009 16:22:20 +0000 (16:22 +0000)]
Allow explicit ctors for casts.

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

15 years agoWhen doing overload resolution, expressions that are value dependent but not type...
Anders Carlsson [Fri, 28 Aug 2009 15:55:56 +0000 (15:55 +0000)]
When doing overload resolution, expressions that are value dependent but not type dependent and of integral type should not be treated as null pointer constants.

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

15 years agoPass InOverloadResolution all the way down to IsPointerConversion.
Anders Carlsson [Fri, 28 Aug 2009 15:33:32 +0000 (15:33 +0000)]
Pass InOverloadResolution all the way down to IsPointerConversion.

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

15 years agoLot's of little changes to get the C-based indexing API going...
Steve Naroff [Fri, 28 Aug 2009 15:28:48 +0000 (15:28 +0000)]
Lot's of little changes to get the C-based indexing API going...

Work in progress.

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

15 years agoInstantiate unresolved using declarations.
Anders Carlsson [Fri, 28 Aug 2009 15:18:15 +0000 (15:18 +0000)]
Instantiate unresolved using declarations.

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

15 years agoir-gen related patch for type conversion
Fariborz Jahanian [Fri, 28 Aug 2009 15:11:24 +0000 (15:11 +0000)]
ir-gen related patch for type conversion
with class type conversion methods. WIP.

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

15 years agoAdd CX prefix to Cursor and move a comment.
Steve Naroff [Fri, 28 Aug 2009 12:07:44 +0000 (12:07 +0000)]
Add CX prefix to Cursor and move a comment.

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

15 years agoOmnibus friend decl refactoring. Instead of cloning AST classes for friend
John McCall [Fri, 28 Aug 2009 07:59:38 +0000 (07:59 +0000)]
Omnibus friend decl refactoring.  Instead of cloning AST classes for friend
declarations of same, introduce a single AST class and add appropriate bits
(encoded in the namespace) for whether a decl is "real" or not.  Much hackery
about previously-declared / not-previously-declared, but it's essentially
mandated by the standard that friends alter lookup, and this is at least
fairly non-intrusive.

Refactor the Sema methods specific to friends for cleaner flow and less nesting.

Incidentally solve a few bugs, but I remain confident that we can put them back.

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

15 years agoCreate UnresolvedUsingDecls.
Anders Carlsson [Fri, 28 Aug 2009 05:49:21 +0000 (05:49 +0000)]
Create UnresolvedUsingDecls.

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

15 years agoFactor declaration building out to Sema::BuildUsingDeclaration.
Anders Carlsson [Fri, 28 Aug 2009 05:40:36 +0000 (05:40 +0000)]
Factor declaration building out to Sema::BuildUsingDeclaration.

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

15 years agoCheck in UnresolvedUsingDecl.
Anders Carlsson [Fri, 28 Aug 2009 05:30:28 +0000 (05:30 +0000)]
Check in UnresolvedUsingDecl.

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

15 years agoUse SymbolicRegion instead of CodeTextRegion for symbolic function
Ted Kremenek [Fri, 28 Aug 2009 04:49:15 +0000 (04:49 +0000)]
Use SymbolicRegion instead of CodeTextRegion for symbolic function
pointers.  Most logic cares first about whether or not a region is
symbolic, and second if represents code.  This should fix a series of
silent corner case bugs (as well as simplify a bunch of code).

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

15 years agoMore work on using declarations.
Anders Carlsson [Fri, 28 Aug 2009 03:35:18 +0000 (03:35 +0000)]
More work on using declarations.

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

15 years agoMany improvements to using declarations.
Anders Carlsson [Fri, 28 Aug 2009 03:16:11 +0000 (03:16 +0000)]
Many improvements to using declarations.

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

15 years agoAccept and ignore a few more -Wflags.
Chris Lattner [Fri, 28 Aug 2009 00:35:39 +0000 (00:35 +0000)]
Accept and ignore a few more -Wflags.

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

15 years agoUpdate checker build.
Ted Kremenek [Fri, 28 Aug 2009 00:30:56 +0000 (00:30 +0000)]
Update checker build.

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

15 years agoUse C++ style comments.
Ted Kremenek [Fri, 28 Aug 2009 00:24:55 +0000 (00:24 +0000)]
Use C++ style comments.

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

15 years agoImplement: <rdar://problem/6337132> CWE-273: Failure to Check Whether Privileges
Ted Kremenek [Fri, 28 Aug 2009 00:08:09 +0000 (00:08 +0000)]
Implement: <rdar://problem/6337132> CWE-273: Failure to Check Whether Privileges
                                    Were Dropped Successfully

Patch by Geoff Keating!

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

15 years agoUpdate exports list.
Ted Kremenek [Thu, 27 Aug 2009 23:50:46 +0000 (23:50 +0000)]
Update exports list.

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

15 years agoWhen looking for overloaded member operators, make sure to instantiate
Douglas Gregor [Thu, 27 Aug 2009 23:35:55 +0000 (23:35 +0000)]
When looking for overloaded member operators, make sure to instantiate
class template specializations (when possible) and look into base
classes. Thanks to Eli for the test case!

FIXME -=1.

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

15 years agoconvert to filecheck and force a triple so that this passes on big
Chris Lattner [Thu, 27 Aug 2009 23:22:19 +0000 (23:22 +0000)]
convert to filecheck and force a triple so that this passes on big
endian hosts.  Fixes PR4792

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

15 years agoCFG construction: Abort CFG construction when processing a CompoundStmt if any
Ted Kremenek [Thu, 27 Aug 2009 23:16:26 +0000 (23:16 +0000)]
CFG construction: Abort CFG construction when processing a CompoundStmt if any
of its subexpressions resulted in a "bad CFG".

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

15 years agoRename 'bindExpr' to 'BindExpr'.
Ted Kremenek [Thu, 27 Aug 2009 22:17:37 +0000 (22:17 +0000)]
Rename 'bindExpr' to 'BindExpr'.

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

15 years agoMove the AnalysisContext* from GRState to Environment.
Ted Kremenek [Thu, 27 Aug 2009 22:15:20 +0000 (22:15 +0000)]
Move the AnalysisContext* from GRState to Environment.

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

15 years agoDefine _GNU_SOURCE in C++ mode so that clang works with GNU libstdc++.
Eli Friedman [Thu, 27 Aug 2009 22:01:41 +0000 (22:01 +0000)]
Define _GNU_SOURCE in C++ mode so that clang works with GNU libstdc++.

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

15 years agoAdd __builtin_memchr (used by GNU libstdc++).
Eli Friedman [Thu, 27 Aug 2009 22:00:18 +0000 (22:00 +0000)]
Add __builtin_memchr (used by GNU libstdc++).

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

15 years agoClean up CodeGenFunction::EmitCastLValue to use the cast kind. Error
Eli Friedman [Thu, 27 Aug 2009 21:19:33 +0000 (21:19 +0000)]
Clean up CodeGenFunction::EmitCastLValue to use the cast kind.  Error
out for user-defined conversions instead of crashing.

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

15 years agoFill in Index.h header file and add stubs to implementation file.
Steve Naroff [Thu, 27 Aug 2009 19:51:58 +0000 (19:51 +0000)]
Fill in Index.h header file and add stubs to implementation file.

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

15 years agoFix for PR4794 (instantiating friend class decl); this version shouldn't
Eli Friedman [Thu, 27 Aug 2009 19:11:42 +0000 (19:11 +0000)]
Fix for PR4794 (instantiating friend class decl); this version shouldn't
cause any regressions.

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

15 years agoExtend the exception spec test even further. Now I need to implement this.
Sebastian Redl [Thu, 27 Aug 2009 19:07:16 +0000 (19:07 +0000)]
Extend the exception spec test even further. Now I need to implement this.

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

15 years agoRemove unnecessary include.
Eli Friedman [Thu, 27 Aug 2009 19:02:44 +0000 (19:02 +0000)]
Remove unnecessary include.

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

15 years agoDon't create a junk file in the source directory.
Eli Friedman [Thu, 27 Aug 2009 19:01:37 +0000 (19:01 +0000)]
Don't create a junk file in the source directory.

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

15 years agoBack out bad piece of r80272. Will look at fixing this a different way.
Eli Friedman [Thu, 27 Aug 2009 18:44:04 +0000 (18:44 +0000)]
Back out bad piece of r80272.  Will look at fixing this a different way.

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

15 years agoPR4794: Make instantiating friend class decls not crash.
Eli Friedman [Thu, 27 Aug 2009 18:38:56 +0000 (18:38 +0000)]
PR4794: Make instantiating friend class decls not crash.

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

15 years agoAdd an InOverloadResolution flag to TryCopyInitialization.
Anders Carlsson [Thu, 27 Aug 2009 17:37:39 +0000 (17:37 +0000)]
Add an InOverloadResolution flag to TryCopyInitialization.

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

15 years agoRemove more default arguments.
Anders Carlsson [Thu, 27 Aug 2009 17:30:43 +0000 (17:30 +0000)]
Remove more default arguments.

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

15 years agoRemove default arguments from TryImplicitConversion and fix a bug found in the process.
Anders Carlsson [Thu, 27 Aug 2009 17:24:15 +0000 (17:24 +0000)]
Remove default arguments from TryImplicitConversion and fix a bug found in the process.

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