]> granicus.if.org Git - clang/log
clang
13 years agoHandle overloaded operators in ?: precedence warning
Hans Wennborg [Thu, 9 Jun 2011 17:06:51 +0000 (17:06 +0000)]
Handle overloaded operators in ?: precedence warning

This is a follow-up to r132565, and should address the rest of PR9969:

Warn about cases such as

int foo(A a, bool b) {
 return a + b ? 1 : 2; // user probably meant a + (b ? 1 : 2);
}

also when + is an overloaded operator call.

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

13 years agoAdd isVCVT_N flag to identify Neon VCVT_N intrinsics, which require special
Bob Wilson [Thu, 9 Jun 2011 17:03:27 +0000 (17:03 +0000)]
Add isVCVT_N flag to identify Neon VCVT_N intrinsics, which require special
range checking for immediate operands.  Radar 9558930.

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

13 years ago[analyzer] Ignore parentheses around block-level expressions when computing liveness...
Jordy Rose [Thu, 9 Jun 2011 05:44:04 +0000 (05:44 +0000)]
[analyzer] Ignore parentheses around block-level expressions when computing liveness. Fixes the other half of PR8962.

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

13 years ago[analyzer] Look through __extension__ expressions in a GRState's Environment. Fixes...
Jordy Rose [Wed, 8 Jun 2011 22:47:39 +0000 (22:47 +0000)]
[analyzer] Look through __extension__ expressions in a GRState's Environment. Fixes PR8962.

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

13 years agoRemove stale reference to libIndex.
Ted Kremenek [Wed, 8 Jun 2011 19:52:31 +0000 (19:52 +0000)]
Remove stale reference to libIndex.

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

13 years agoRemove 'atomic' as a property attribute keyword.
Fariborz Jahanian [Wed, 8 Jun 2011 16:40:09 +0000 (16:40 +0000)]
Remove 'atomic' as a property attribute keyword.
It is not a sanctioned keyword and is assumed as default.
// rdar://8790791

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

13 years agoFollowup to 132737; make two-character string explicit, add some
Stuart Hastings [Wed, 8 Jun 2011 16:06:31 +0000 (16:06 +0000)]
Followup to 132737; make two-character string explicit, add some
comments.  rdar://problem/9037836

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

13 years agoModify a diagnostic introduced in r132612 to emit QualTypes directly
Peter Collingbourne [Wed, 8 Jun 2011 15:15:17 +0000 (15:15 +0000)]
Modify a diagnostic introduced in r132612 to emit QualTypes directly

This fixes a memory error on FreeBSD (and is the right thing to do
in any case).

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

13 years agoFix a bunch more notes that were emitted even when the diagnostic they
Chandler Carruth [Wed, 8 Jun 2011 10:26:03 +0000 (10:26 +0000)]
Fix a bunch more notes that were emitted even when the diagnostic they
were intended for was suppressed.

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

13 years agoRevert "hack in my new variables for GCC"
Chandler Carruth [Wed, 8 Jun 2011 10:14:38 +0000 (10:14 +0000)]
Revert "hack in my new variables for GCC"

Very sorry for the accidental commit of WIP code.

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

13 years agoFix a regression in the two-phase lookup diagnostics that switching the
Chandler Carruth [Wed, 8 Jun 2011 10:13:17 +0000 (10:13 +0000)]
Fix a regression in the two-phase lookup diagnostics that switching the
namespace set algorithm (re-)introduced. We may not have seen the 'std'
namespace, but we should still suggested associated namespaces. Easy
fix, but a bit annoying to test.

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

13 years agohack in my new variables for GCC
Chandler Carruth [Wed, 8 Jun 2011 10:13:14 +0000 (10:13 +0000)]
hack in my new variables for GCC

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

13 years agoClang support for ARM Uv/Uy/Uq inline-asm constraints.
Stuart Hastings [Tue, 7 Jun 2011 23:45:05 +0000 (23:45 +0000)]
Clang support for ARM Uv/Uy/Uq inline-asm constraints.
rdar://problem/9037836

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

13 years agoSort -lgcc after -lgcc_s for NetBSD, otherwise shared libraries on i386
Joerg Sonnenberger [Tue, 7 Jun 2011 23:39:17 +0000 (23:39 +0000)]
Sort -lgcc after -lgcc_s for NetBSD, otherwise shared libraries on i386
may pick it up. This would create bad text relocations.

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

13 years agoMore coherent diagnostic when a stack variable is
Fariborz Jahanian [Tue, 7 Jun 2011 20:15:46 +0000 (20:15 +0000)]
More coherent diagnostic when a stack variable is
declared __weak objc-gc mode.  // rdar://9666091.

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

13 years agoThe macros defined by the language standard are still available even when the
Nick Lewycky [Tue, 7 Jun 2011 06:07:12 +0000 (06:07 +0000)]
The macros defined by the language standard are still available even when the
-undef flag is passed in. Also __ASSEMBLER__ with -x assembler-with-cpp. (Don't
ask.)

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

13 years agoDowngrade the warning about the use of typedefs for class template
Douglas Gregor [Tue, 7 Jun 2011 02:21:18 +0000 (02:21 +0000)]
Downgrade the warning about the use of typedefs for class template
specializations within an explicit instantiation to default to off
(enabled by -pedantic). Nobody else seem to implement C++
[temp.explicit]p3. Fixes PR10093.

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

13 years agoCatch the memory leak in a bucket
Sean Hunt [Tue, 7 Jun 2011 00:11:58 +0000 (00:11 +0000)]
Catch the memory leak in a bucket

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

13 years agoSecond try at fixing this test, this time without breaking 32-bit Darwin builders.
Eli Friedman [Mon, 6 Jun 2011 22:25:48 +0000 (22:25 +0000)]
Second try at fixing this test, this time without breaking 32-bit Darwin builders.

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

13 years agoStart fixing up clang tests to work on the clang-native-arm-cortex-a9 builder.
Eli Friedman [Mon, 6 Jun 2011 21:23:05 +0000 (21:23 +0000)]
Start fixing up clang tests to work on the clang-native-arm-cortex-a9 builder.

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

13 years agoDon't put a note in the DiagGroup
Sean Hunt [Mon, 6 Jun 2011 20:30:15 +0000 (20:30 +0000)]
Don't put a note in the DiagGroup

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

13 years agoTouchup to comments that weren't quite in sync with code
Jonathan D. Turner [Mon, 6 Jun 2011 16:22:39 +0000 (16:22 +0000)]
Touchup to comments that weren't quite in sync with code

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

13 years agoDiagnose the condition in C++ [temp.expl.spec]p16 that prohibits
Douglas Gregor [Mon, 6 Jun 2011 15:22:55 +0000 (15:22 +0000)]
Diagnose the condition in C++ [temp.expl.spec]p16 that prohibits
specializing a member of an unspecialized template, and recover from
such errors without crashing. Fixes PR10024 / <rdar://problem/9509761>.

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

13 years agook now, let's fix that MSVC warning for real.
Francois Pichet [Mon, 6 Jun 2011 02:57:59 +0000 (02:57 +0000)]
ok now, let's fix that MSVC warning for real.

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

13 years agoFix MSVC warning:
Francois Pichet [Mon, 6 Jun 2011 02:42:06 +0000 (02:42 +0000)]
Fix MSVC warning:
"unsafe mix of type 'int' and type 'bool' in operation"

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

13 years agoRichard Smith was correct about how the sets should be computed for
Chandler Carruth [Sun, 5 Jun 2011 23:36:55 +0000 (23:36 +0000)]
Richard Smith was correct about how the sets should be computed for
this. My suggestion assumed a viable erase method for iterators on
SmallPtrSet.

This patch restores his original pattern.

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

13 years agoFix PR10053: Improve diagnostics and error recovery for code which some compilers...
Richard Smith [Sun, 5 Jun 2011 22:42:48 +0000 (22:42 +0000)]
Fix PR10053: Improve diagnostics and error recovery for code which some compilers incorrectly accept due to a lack of proper support for two-phase name lookup.

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

13 years agoToolchain support for Ubuntu Oneiric. Patch by Michael Wild!
Benjamin Kramer [Sun, 5 Jun 2011 16:08:59 +0000 (16:08 +0000)]
Toolchain support for Ubuntu Oneiric. Patch by Michael Wild!

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

13 years agoDrop most of InitializationSequence::SequenceKind's values. They didn't really contai...
Sebastian Redl [Sun, 5 Jun 2011 13:59:11 +0000 (13:59 +0000)]
Drop most of InitializationSequence::SequenceKind's values. They didn't really contain any information that the step array didn't contain too. This makes debugging dumps a bit less informative, but probably not significantly so. The advantage is that the redundancy is gone, so the code is easier to understand.
ReferenceBinding is still there, because it is used in some unclear code.

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

13 years agoRemove more references to FailedSequence.
Sebastian Redl [Sun, 5 Jun 2011 13:59:05 +0000 (13:59 +0000)]
Remove more references to FailedSequence.

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

13 years agoRemove all references to InitializationSequence::FailedSequence from outside SemaInit...
Sebastian Redl [Sun, 5 Jun 2011 12:23:28 +0000 (12:23 +0000)]
Remove all references to InitializationSequence::FailedSequence from outside SemaInit.cpp. Replace them with the boolean conversion or the new Failed() function. This is a first step towards removing InitializationSequence::SequenceKind. No functionality change.

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

13 years agoMore std::initializer_list tests.
Sebastian Redl [Sun, 5 Jun 2011 12:23:21 +0000 (12:23 +0000)]
More std::initializer_list tests.

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

13 years agoParse C++0x generalized initializers.
Sebastian Redl [Sun, 5 Jun 2011 12:23:16 +0000 (12:23 +0000)]
Parse C++0x generalized initializers.

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

13 years agoExpand on braced init list tests.
Sebastian Redl [Sun, 5 Jun 2011 12:23:08 +0000 (12:23 +0000)]
Expand on braced init list tests.

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

13 years agoIdentity and non-identity standard conversion sequences can be
Douglas Gregor [Sun, 5 Jun 2011 06:15:20 +0000 (06:15 +0000)]
Identity and non-identity standard conversion sequences can be
compared even when one is a reference binding and the other is not
(<rdar://problem/9173984>), but the definition of an identity sequence
does not involve lvalue-to-rvalue adjustments (PR9507). Fix both
inter-related issues.

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

13 years agoAdd name mangling for expr .* expr. Fixes PR9983 / <rdar://problem/9486332>.
Douglas Gregor [Sun, 5 Jun 2011 05:27:58 +0000 (05:27 +0000)]
Add name mangling for expr .* expr. Fixes PR9983 / <rdar://problem/9486332>.

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

13 years agoAllow block returns in C++ with the form
Douglas Gregor [Sun, 5 Jun 2011 05:14:41 +0000 (05:14 +0000)]
Allow block returns in C++ with the form

  return <expression> ;

in blocks with a 'void' result type, so long as <expression> has type
'void'. This follows the rules for C++ functions.

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

13 years agoWhen inferring the result type of a block based on a return statement
Douglas Gregor [Sun, 5 Jun 2011 05:04:23 +0000 (05:04 +0000)]
When inferring the result type of a block based on a return statement
with a type-dependent expression, infer the placeholder type
'Context.DependentTy' to indicate that this is just a
placeholder. Fixes PR9982 / <rdar://problem/9486685>.

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

13 years agoFix cmake build.
Rafael Espindola [Sat, 4 Jun 2011 23:22:38 +0000 (23:22 +0000)]
Fix cmake build.

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

13 years agoRemove the old implementation of -verify, which has been dead code since r88750.
Richard Smith [Sat, 4 Jun 2011 21:35:57 +0000 (21:35 +0000)]
Remove the old implementation of -verify, which has been dead code since r88750.

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

13 years agoRevert r132630. GCC passes everything down, we aren't trying to replicate that.
Nick Lewycky [Sat, 4 Jun 2011 09:06:25 +0000 (09:06 +0000)]
Revert r132630. GCC passes everything down, we aren't trying to replicate that.

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

13 years agoAdjust the linker for PowerPC64/-m32 on FreeBSD too.
Roman Divacky [Sat, 4 Jun 2011 07:40:24 +0000 (07:40 +0000)]
Adjust the linker for PowerPC64/-m32 on FreeBSD too.

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

13 years agoMake -m32 work on FreeBSD/PowerPC64.
Roman Divacky [Sat, 4 Jun 2011 07:37:31 +0000 (07:37 +0000)]
Make -m32 work on FreeBSD/PowerPC64.

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

13 years agoGCC passes -z foo directly through to the linker (and yes -z=foo becomes
Nick Lewycky [Sat, 4 Jun 2011 06:48:26 +0000 (06:48 +0000)]
GCC passes -z foo directly through to the linker (and yes -z=foo becomes
"-z =foo"). Do the same thing in clang.

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

13 years agoOn linux, -nostdlib was causing a --start-group with no --end-group to be passed
Nick Lewycky [Sat, 4 Jun 2011 06:27:06 +0000 (06:27 +0000)]
On linux, -nostdlib was causing a --start-group with no --end-group to be passed
to the linker.

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

13 years agoIdentifiers with _CapitalLetter are reserved, so don't use them. Prefer the
Nick Lewycky [Sat, 4 Jun 2011 05:19:42 +0000 (05:19 +0000)]
Identifiers with _CapitalLetter are reserved, so don't use them. Prefer the
common C++ pattern of using the same name for the constructor argument as you
do for the member. Noticed by inspection.

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

13 years agoThese tests require particular registered targets. Declared as such.
Galina Kistanova [Sat, 4 Jun 2011 04:38:16 +0000 (04:38 +0000)]
These tests require particular registered targets. Declared as such.

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

13 years agoReimplement r132572 on top of a FoldingSet, thus hopefully solving both
Sean Hunt [Sat, 4 Jun 2011 04:32:43 +0000 (04:32 +0000)]
Reimplement r132572 on top of a FoldingSet, thus hopefully solving both
the self-host failures and Chandler's concerns.

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

13 years agoRemove extraneous "virtual" keyword and non-virtual destructor. Caught by
Nick Lewycky [Sat, 4 Jun 2011 02:04:22 +0000 (02:04 +0000)]
Remove extraneous "virtual" keyword and non-virtual destructor. Caught by
-Wnon-virtual-dtor!

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

13 years ago[analyzer] Change an indent-if to an early return. No functionality change.
Jordy Rose [Sat, 4 Jun 2011 01:50:25 +0000 (01:50 +0000)]
[analyzer] Change an indent-if to an early return. No functionality change.

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

13 years ago[analyzer] Don't crash when copying an unknown number of bytes with memcpy(). Also...
Jordy Rose [Sat, 4 Jun 2011 01:47:27 +0000 (01:47 +0000)]
[analyzer] Don't crash when copying an unknown number of bytes with memcpy(). Also handle all memcpy-family return values in evalCopyCommon(), rather than having some outside and some inside.

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

13 years ago[analyzer] Remove extra assignment that actually lost a few of the assumptions.
Jordy Rose [Sat, 4 Jun 2011 01:22:21 +0000 (01:22 +0000)]
[analyzer] Remove extra assignment that actually lost a few of the assumptions.

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

13 years agoAdd support for builtin astype:
Tanya Lattner [Sat, 4 Jun 2011 00:47:47 +0000 (00:47 +0000)]
Add support for builtin astype:
__builtin_astype(): Used to reinterpreted as another data type of the same size using for both scalar and vector data types.
Added test case.

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

13 years agoRework r132576.
Devang Patel [Sat, 4 Jun 2011 00:38:02 +0000 (00:38 +0000)]
Rework r132576.
Emit debug info only if there is an insertion point. The debug info should not force an insertion point. Codegen may later on decide to not emit code for some reason, see extensive comment in CodeGenFunction::EmitStmt(), and debug info should not get in the way.

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

13 years ago[analyzer] Fix comment for (still-disabled) evalStrncpy
Jordy Rose [Sat, 4 Jun 2011 00:05:23 +0000 (00:05 +0000)]
[analyzer] Fix comment for (still-disabled) evalStrncpy

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

13 years ago[analyzer] Fix handling of "copy zero bytes" for memcpy and friends.
Jordy Rose [Sat, 4 Jun 2011 00:04:22 +0000 (00:04 +0000)]
[analyzer] Fix handling of "copy zero bytes" for memcpy and friends.

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

13 years ago[analyzer] __mempcpy_chk is the same as mempcpy (at least to CStringChecker)
Jordy Rose [Fri, 3 Jun 2011 23:42:56 +0000 (23:42 +0000)]
[analyzer] __mempcpy_chk is the same as mempcpy (at least to CStringChecker)

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

13 years agoImprovements to abbreviations for PCH which add support for EnumDecl, ObjCIvarDecl...
Jonathan D. Turner [Fri, 3 Jun 2011 23:11:16 +0000 (23:11 +0000)]
Improvements to abbreviations for PCH which add support for EnumDecl, ObjCIvarDecl, TypedefDecl, VarDecl and FieldDecl and improve support for ParmVarDecl.

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

13 years agoExpose @synthesize and @dynamic via their own cursor kinds in
Douglas Gregor [Fri, 3 Jun 2011 23:08:58 +0000 (23:08 +0000)]
Expose @synthesize and @dynamic via their own cursor kinds in
libclang. Fixes <rdar://problem/9537904>.

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

13 years agoThese tests require particular registered targets. Declared as such.
Galina Kistanova [Fri, 3 Jun 2011 22:24:54 +0000 (22:24 +0000)]
These tests require particular registered targets. Declared as such.

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

13 years agoTest of commit access.
Jonathan D. Turner [Fri, 3 Jun 2011 21:46:44 +0000 (21:46 +0000)]
Test of commit access.

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

13 years agoRevert r132572 to figure out why it broke selfhost and clean it up as
Sean Hunt [Fri, 3 Jun 2011 21:10:40 +0000 (21:10 +0000)]
Revert r132572 to figure out why it broke selfhost and clean it up as
suggested by Chandler.

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

13 years agoEmit debug info only if there is an insertion point. The debug info should not force...
Devang Patel [Fri, 3 Jun 2011 19:21:47 +0000 (19:21 +0000)]
Emit debug info only if there is an insertion point. The debug info should not force an insertion point. Codegen may later on decide to not emit code for some reason, see extensive comment in CodeGenFunction::EmitStmt(), and debug info should not get in the way.

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

13 years agoBegin implementing a cache of special member lookups. Currently only
Sean Hunt [Fri, 3 Jun 2011 18:36:49 +0000 (18:36 +0000)]
Begin implementing a cache of special member lookups. Currently only
destructors are implemented but other special members are on the way,
which is where the real benefits of this will be visible.

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

13 years agoAdded registered targets for in-test dependency declarations.
Galina Kistanova [Fri, 3 Jun 2011 18:36:30 +0000 (18:36 +0000)]
Added registered targets for in-test dependency declarations.

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

13 years agoDon't warn about -Wno-foo where foo is an unknown warning option. Explicitly
Matt Beaumont-Gay [Fri, 3 Jun 2011 18:30:50 +0000 (18:30 +0000)]
Don't warn about -Wno-foo where foo is an unknown warning option. Explicitly
passing -Wunknown-warning-option will re-enable warnings about -Wno-foo.

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

13 years agoI've had too much to drink, apparently.
Sean Hunt [Fri, 3 Jun 2011 18:05:29 +0000 (18:05 +0000)]
I've had too much to drink, apparently.

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

13 years agoWarn about missing parentheses for conditional operator.
Hans Wennborg [Fri, 3 Jun 2011 18:00:36 +0000 (18:00 +0000)]
Warn about missing parentheses for conditional operator.

Warn in cases such as "x + someCondition ? 42 : 0;",
where the condition expression looks arithmetic, and has
a right-hand side that looks boolean.

This (partly) addresses http://llvm.org/bugs/show_bug.cgi?id=9969

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

13 years agoImplement a warning flag for the warning about default arguments making
Sean Hunt [Fri, 3 Jun 2011 17:55:52 +0000 (17:55 +0000)]
Implement a warning flag for the warning about default arguments making
special member functions.

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

13 years agoMake -Wignored-qualifiers point to the first ignored qualifier.
Hans Wennborg [Fri, 3 Jun 2011 17:37:26 +0000 (17:37 +0000)]
Make -Wignored-qualifiers point to the first ignored qualifier.

In code such as "char* volatile const j()", Clang warns that "volatile
const" will be ignored. Make it point to the first ignored qualifier,
and simplify the code a bit.

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

13 years agoSimplify.
Devang Patel [Fri, 3 Jun 2011 17:23:47 +0000 (17:23 +0000)]
Simplify.

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

13 years agoFix typedef's context.
Devang Patel [Fri, 3 Jun 2011 17:05:26 +0000 (17:05 +0000)]
Fix typedef's context.

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

13 years agoWe were looking at /usr/lib only if the distro had multilib. This is bogus:
Rafael Espindola [Fri, 3 Jun 2011 15:39:42 +0000 (15:39 +0000)]
We were looking at /usr/lib only if the distro had multilib. This is bogus:
we look in /usr/lib to find crt1.o, and that depends only on where libc
is installed.

This fixes the case of using a different gcc installation in a distro
without multilib.

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

13 years agoAdd support for centos.
Rafael Espindola [Fri, 3 Jun 2011 15:23:24 +0000 (15:23 +0000)]
Add support for centos.

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

13 years ago80-column cleanup.
Eric Christopher [Fri, 3 Jun 2011 14:52:25 +0000 (14:52 +0000)]
80-column cleanup.

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

13 years agoImprove the instantiation of static data members in
Douglas Gregor [Fri, 3 Jun 2011 14:28:43 +0000 (14:28 +0000)]
Improve the instantiation of static data members in
Sema::RequireCompleteExprType() a bit more, setting the point of
instantiation if needed, and skipping explicit specializations entirely.

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

13 years agoRevert r132544. Accidental commit. I got confused with the Tortoise SVN menu.
Francois Pichet [Fri, 3 Jun 2011 13:59:45 +0000 (13:59 +0000)]
Revert r132544. Accidental commit. I got confused with the Tortoise SVN menu.

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

13 years agogit-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132544 91177308-0d34-0410...
Francois Pichet [Fri, 3 Jun 2011 13:51:55 +0000 (13:51 +0000)]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@132544 91177308-0d34-0410-b5e6-96231b3b80d8

13 years ago80-col cleanup.
Eric Christopher [Fri, 3 Jun 2011 13:28:31 +0000 (13:28 +0000)]
80-col cleanup.

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

13 years agoSeparate out these paths a bit by architecture. There are likely other
Eric Christopher [Fri, 3 Jun 2011 13:24:15 +0000 (13:24 +0000)]
Separate out these paths a bit by architecture. There are likely other
places this is a problem.

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

13 years agoAdd multi-arch include support for Ubuntu 11.11 with gcc 4.6.0.
Eric Christopher [Fri, 3 Jun 2011 13:06:30 +0000 (13:06 +0000)]
Add multi-arch include support for Ubuntu 11.11 with gcc 4.6.0.

Patch by Tobias Hunger!

Fixes PR10008

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

13 years agoCopy IsWarnIfUnused too when making a copy of a MacroInfo.
Benjamin Kramer [Fri, 3 Jun 2011 10:33:36 +0000 (10:33 +0000)]
Copy IsWarnIfUnused too when making a copy of a MacroInfo.

Found by valgrind.

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

13 years agoMy testing shows that function stat has no problem with trailing separators. (tested...
Francois Pichet [Fri, 3 Jun 2011 09:44:29 +0000 (09:44 +0000)]
My testing shows that function stat has no problem with trailing separators. (tested on Windows and Darwin).

This fixes a bug on Windows:
clang c:\test.cpp

Here the call stat("c:") is not recognized as a directory (must be "c:\").

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

13 years agoCorrectly revert r131347: function explicit specialization at class scope.
Francois Pichet [Fri, 3 Jun 2011 07:35:49 +0000 (07:35 +0000)]
Correctly revert r131347: function explicit specialization at class scope.
I'll try to implement this functionality again soon.

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

13 years agoClean up the "non-POD memaccess" stuff some. This adds a properly named
Chandler Carruth [Fri, 3 Jun 2011 06:23:57 +0000 (06:23 +0000)]
Clean up the "non-POD memaccess" stuff some. This adds a properly named
diagnostic group to cover the cases where we have definitively bad
behavior: dynamic classes.

It also rips out the existing support for POD-based checking. This
didn't work well, and triggered too many false positives. I'm looking
into a possibly more principled way to warn on the fundamental buggy
construct here. POD-ness isn't the critical aspect anyways, so a clean
slate is better. This also removes some silliness from the code until
the new checks arrive.

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

13 years agoUntabify and fix whitespace.
NAKAMURA Takumi [Fri, 3 Jun 2011 03:49:51 +0000 (03:49 +0000)]
Untabify and fix whitespace.

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

13 years agoWhen performing template argument deduction given a function argument
Douglas Gregor [Fri, 3 Jun 2011 03:35:07 +0000 (03:35 +0000)]
When performing template argument deduction given a function argument
of incomplete array type, attempt to complete the array type. This was
made much easier by Chandler's addition of RequireCompleteExprType(),
which I've tweaked (slightly) to improve the consistency of the
DeclRefExpr. Fixes PR7985.

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

13 years agoWhen checking the instantiation of a default template argument against
Douglas Gregor [Fri, 3 Jun 2011 02:59:40 +0000 (02:59 +0000)]
When checking the instantiation of a default template argument against
the template parameter, perform the checking as a "specified" template
argument rather than a "deduced" template argument; the latter implies
stricter type checking that is not permitted for default template
arguments.

Also, cleanup our handling of substitution of explicit template
arguments for a function template. We were actually performing some
substitution of default arguments at this point!

Fixes PR10069.

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

13 years agoIntroduce additional abbreviations into the AST writer for
Douglas Gregor [Fri, 3 Jun 2011 02:27:19 +0000 (02:27 +0000)]
Introduce additional abbreviations into the AST writer for
DeclRefExprs, IntegerLiterals, and others, reducing Cocoa PCH size by
~1% and C++ header size by ~2.5%. From Jonathan Turner!

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

13 years agoFix the Windows buildbots, now that I can actually see what was going wrong with...
Eli Friedman [Fri, 3 Jun 2011 00:54:56 +0000 (00:54 +0000)]
Fix the Windows buildbots, now that I can actually see what was going wrong with this test.

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

13 years agoTest case for some AVX builtins. Patch by Syoyo Fujita!
John McCall [Fri, 3 Jun 2011 00:02:45 +0000 (00:02 +0000)]
Test case for some AVX builtins.  Patch by Syoyo Fujita!

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

13 years agoWe already have support for using c++ headers from a custom location.
Rafael Espindola [Thu, 2 Jun 2011 22:18:46 +0000 (22:18 +0000)]
We already have support for using c++ headers from a custom location.
Before this patch we would still link with the system libstdc++. It worked
fine most of the time, but would break if the used headers were a lot newer
than the system libraries.

This patch changes the driver to use the libraries corresponding to the
headers the user selected.

This fixes, for example, using 4.5 headers in a system with gcc 4.1.

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

13 years agoSwitch a ridiculous grep over to FileCheck.
Eli Friedman [Thu, 2 Jun 2011 22:16:39 +0000 (22:16 +0000)]
Switch a ridiculous grep over to FileCheck.

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

13 years agoReverted r132330, r132321, r132320, r132319 as per discussion. Will try in-test requi...
Galina Kistanova [Thu, 2 Jun 2011 21:55:39 +0000 (21:55 +0000)]
Reverted r132330, r132321, r132320, r132319 as per discussion. Will try in-test requirement declarations instead.

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

13 years agoAdd Debian wheezy/sid to ToolChains.cpp. Patch by Michael Wild. PR10064.
Eli Friedman [Thu, 2 Jun 2011 21:36:53 +0000 (21:36 +0000)]
Add Debian wheezy/sid to ToolChains.cpp.  Patch by Michael Wild.  PR10064.

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

13 years ago[PCH] Store the offsets of source location file entries and go through them
Argyrios Kyrtzidis [Thu, 2 Jun 2011 20:01:46 +0000 (20:01 +0000)]
[PCH] Store the offsets of source location file entries and go through them
in ASTReader::validateFileEntries().

This avoids going through all source location entries and fixes the performance regression.
Many thanks to Doug for the hint!
(rdar://9530587)

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

13 years agoChange how we link libprofile_rt.a. While at it, refactor the code a bit.
Rafael Espindola [Thu, 2 Jun 2011 18:58:46 +0000 (18:58 +0000)]
Change how we link libprofile_rt.a. While at it, refactor the code a bit.

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

13 years agoAdd -fno-gnu89-inline.
Rafael Espindola [Thu, 2 Jun 2011 17:30:53 +0000 (17:30 +0000)]
Add -fno-gnu89-inline.

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

13 years agoReverts the Tooling changes as requested by Chris.
Manuel Klimek [Thu, 2 Jun 2011 16:58:33 +0000 (16:58 +0000)]
Reverts the Tooling changes as requested by Chris.

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

13 years agoImplement -fgnu89-inline. Fixes PR10041.
Rafael Espindola [Thu, 2 Jun 2011 16:13:27 +0000 (16:13 +0000)]
Implement -fgnu89-inline. Fixes PR10041.

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