]> granicus.if.org Git - clang/log
clang
13 years agoUse CharUnits for the offset type in the ClassNamesAndOffsets map in
Ken Dyck [Sat, 2 Apr 2011 17:03:24 +0000 (17:03 +0000)]
Use CharUnits for the offset type in the ClassNamesAndOffsets map in
dumpLayout(). No change in functionality intended.

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

13 years agoUse CharUnits for the offsets in the VBaseOffsetOffsetsMapTy types. No
Ken Dyck [Sat, 2 Apr 2011 16:57:20 +0000 (16:57 +0000)]
Use CharUnits for the offsets in the VBaseOffsetOffsetsMapTy types. No
change in functionality intended.

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

13 years agoApply a bug-fix patch from Marcin Kowalczyk to the source locations for
Chandler Carruth [Sat, 2 Apr 2011 09:47:38 +0000 (09:47 +0000)]
Apply a bug-fix patch from Marcin Kowalczyk to the source locations for
a couple of operator overloads which form interesting expressions in the
AST.

I added test cases for both bugs with the c-index-test's token
annotation feature. Also, thanks to John McCall for confirming that this
is the correct solution.

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

13 years agoRemove a redundant method. We have a const version.
Zhongxing Xu [Sat, 2 Apr 2011 03:20:45 +0000 (03:20 +0000)]
Remove a redundant method. We have a const version.

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

13 years agoTeach IdempotentOperationsChecker about paths aborted because ExprEngine didn't know...
Ted Kremenek [Sat, 2 Apr 2011 02:56:23 +0000 (02:56 +0000)]
Teach IdempotentOperationsChecker about paths aborted because ExprEngine didn't know how to handle a specific Expr type.

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

13 years agostatic analyzer: Rename 'BlocksAborted' to 'BlocksExhausted' to reflect that a given...
Ted Kremenek [Sat, 2 Apr 2011 02:56:17 +0000 (02:56 +0000)]
static analyzer: Rename 'BlocksAborted' to 'BlocksExhausted' to reflect that a given CFGBlock was analyzed too many times.

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

13 years agoConvert BaseOffset::NonVirtualOffset to CharUnits. No change in
Ken Dyck [Sat, 2 Apr 2011 01:32:03 +0000 (01:32 +0000)]
Convert BaseOffset::NonVirtualOffset to CharUnits. No change in
functionality intended.

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

13 years agoConvert offset parameters and return values of VTableComponent methods to
Ken Dyck [Sat, 2 Apr 2011 01:14:48 +0000 (01:14 +0000)]
Convert offset parameters and return values of VTableComponent methods to
CharUnits. No change in functionality intended.

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

13 years agoConvert the offsets in VCallOffsetMap to CharUnits. No change in
Ken Dyck [Sat, 2 Apr 2011 00:51:15 +0000 (00:51 +0000)]
Convert the offsets in VCallOffsetMap to CharUnits. No change in
functionality intended.

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

13 years agoConvert offset parameters of VTableBuilder::IsOverriderUsed() to CharUnits.
Ken Dyck [Sat, 2 Apr 2011 00:44:58 +0000 (00:44 +0000)]
Convert offset parameters of VTableBuilder::IsOverriderUsed() to CharUnits.
No change in functionality intended.

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

13 years agoFixes a rewriter bug rewriting call to a byref
Fariborz Jahanian [Fri, 1 Apr 2011 23:08:13 +0000 (23:08 +0000)]
Fixes a rewriter bug rewriting call to a byref
block pointer nested inside a block. // rdar:// 9204669

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

13 years agoDriver/Darwin: Tweak simulator link logic a bit more to be closer to GCC.
Daniel Dunbar [Fri, 1 Apr 2011 21:02:42 +0000 (21:02 +0000)]
Driver/Darwin: Tweak simulator link logic a bit more to be closer to GCC.

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

13 years agoANother rewrite bug, rewriting a call of
Fariborz Jahanian [Fri, 1 Apr 2011 19:19:28 +0000 (19:19 +0000)]
ANother rewrite bug, rewriting a call of
__byref block. // rdar://9204669

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

13 years agoDo not try calculate the size of forward-declared template type array.
Devang Patel [Fri, 1 Apr 2011 19:02:33 +0000 (19:02 +0000)]
Do not try calculate the size of forward-declared template type array.

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

13 years agoDon't store reports when scan-build's build command matches /autogen/ (same as config...
Ted Kremenek [Fri, 1 Apr 2011 18:47:06 +0000 (18:47 +0000)]
Don't store reports when scan-build's build command matches /autogen/ (same as configure).

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

13 years agoFix an error in TreeTransform where we failed to copy the TemplateName's
Chandler Carruth [Fri, 1 Apr 2011 02:03:23 +0000 (02:03 +0000)]
Fix an error in TreeTransform where we failed to copy the TemplateName's
location into a TemplateSpecializationTypeLoc. These were found using
a hand-written program to inspect every source location in
TemplateSpecializationTypeLocs and Valgrind. I don't know of any way to
test them in Clang's existing test suite sadly.

Example code that triggers the ElaboratedType case:
  template <typename T> struct X1 {
    template <typename U> struct X1_1 {
      int x;
    };
  };

  template <typename T, typename U> struct X2 {
    typename X1<T>::template X1_1<U> B;
  };

  X2<char, int> x2;

The other fix was simply spotted by inspection. I audited all constructions of
[Dependent]TemplateSpecializationTypeLocs in TreeTransform.h, and the rest set
the TemplateNameLoc properly.

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

13 years agoIRgen: Reapply r128691 with a fix to ensure we don't increase alignment past
Daniel Dunbar [Fri, 1 Apr 2011 00:49:43 +0000 (00:49 +0000)]
IRgen: Reapply r128691 with a fix to ensure we don't increase alignment past
that of the array element type.

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

13 years agoRevert r128691, "IRgen: Improve GCC compatibility when dealing with packed
Daniel Dunbar [Fri, 1 Apr 2011 00:13:33 +0000 (00:13 +0000)]
Revert r128691, "IRgen: Improve GCC compatibility when dealing with packed
arrays by propagating", it's breaking test in ways I don't understand yet.

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

13 years agoIRgen: Improve GCC compatibility when dealing with packed arrays by propagating
Daniel Dunbar [Thu, 31 Mar 2011 23:32:15 +0000 (23:32 +0000)]
IRgen: Improve GCC compatibility when dealing with packed arrays by propagating
the array alignment to the array access.
 - This is more or less the best we can do without having alignment present in
   the type system, but is a long way from truly matching how GCC handles this.

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

13 years agoFix couple of rewriter bugs related to rewriting a
Fariborz Jahanian [Thu, 31 Mar 2011 22:49:32 +0000 (22:49 +0000)]
Fix couple of rewriter bugs related to rewriting a
__block block declaration. //rdar://9204669

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

13 years ago-Wuninitialized should not warn about variables captured by blocks as byref.
Ted Kremenek [Thu, 31 Mar 2011 22:32:41 +0000 (22:32 +0000)]
-Wuninitialized should not warn about variables captured by blocks as byref.

Note this can potentially be enhanced to detect if the __block variable
is actually written by the block, or only when the block "escapes" or
is actually used, but that requires more analysis than it is probably worth
for this simple check.

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

13 years agoAdd security syntax checker for strcpy() which causes the Static Analyzer to generate...
Lenny Maiorani [Thu, 31 Mar 2011 22:09:14 +0000 (22:09 +0000)]
Add security syntax checker for strcpy() which causes the Static Analyzer to generate a warning any time the strcpy() function is used with a note suggesting to use a function which provides bounded buffers.

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

13 years agoAdding Static Analyzer checker for mempcpy().
Lenny Maiorani [Thu, 31 Mar 2011 21:36:53 +0000 (21:36 +0000)]
Adding Static Analyzer checker for mempcpy().

Models mempcpy() so that if length is NULL the destination pointer is returned. Otherwise, the source and destination are confirmed not to be NULL and not overlapping. Finally the copy is validated to not cause a buffer overrun and the return value is bound to the address of the byte after the last byte copied.

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

13 years agoFix spelling in a comment. (test commit)
Lenny Maiorani [Thu, 31 Mar 2011 21:26:55 +0000 (21:26 +0000)]
Fix spelling in a comment. (test commit)

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

13 years agoMake ChainedIncludesSource an ExternalSemaSource, otherwise initialization of the...
Sebastian Redl [Thu, 31 Mar 2011 19:29:24 +0000 (19:29 +0000)]
Make ChainedIncludesSource an ExternalSemaSource, otherwise initialization of the ASTReader is incomplete, leading to errors like not realizing std::type_info is already defined.

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

13 years agoTell the diagnostic client about starting and ending source files when automatically...
Sebastian Redl [Thu, 31 Mar 2011 19:29:18 +0000 (19:29 +0000)]
Tell the diagnostic client about starting and ending source files when automatically creating chained PCHs. This way, we don't get a crash whenever a diagnostic is emitted while processing the include.

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

13 years agoDriver/Darwin: Tweak link logic for simulator.
Daniel Dunbar [Thu, 31 Mar 2011 17:12:33 +0000 (17:12 +0000)]
Driver/Darwin: Tweak link logic for simulator.

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

13 years agoWhoops.
John McCall [Thu, 31 Mar 2011 09:19:20 +0000 (09:19 +0000)]
Whoops.

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

13 years agoAfter much contemplation, I've decided that we probably shouldn't "unique"
John McCall [Thu, 31 Mar 2011 08:03:29 +0000 (08:03 +0000)]
After much contemplation, I've decided that we probably shouldn't "unique"
__block object copy/dispose helpers for C++ objects with those for
different variables with completely different semantics simply because
they happen to both be no more aligned than a pointer.

Found by inspection.

Also, internalize most of the helper generation logic within CGBlocks.cpp,
and refactor it to fit my peculiar aesthetic sense.

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

13 years agoStatic analyzer: fix bug in handling of dynamic_cast<>. The sink node wouldn't alway...
Ted Kremenek [Thu, 31 Mar 2011 04:46:53 +0000 (04:46 +0000)]
Static analyzer: fix bug in handling of dynamic_cast<>.  The sink node wouldn't always be the final node, thus causing the state to continue propagating.  Instead,
recover some path-sensitivity by conjuring a symbol.

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

13 years agoTeach static analyzer about the basics of handling new[]. We still don't simulate...
Ted Kremenek [Thu, 31 Mar 2011 04:04:48 +0000 (04:04 +0000)]
Teach static analyzer about the basics of handling new[].  We still don't simulate constructors, but at least the analyzer doesn't think the return value is uninitialized.

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

13 years agoMove all the significant __block code into CGBlocks.cpp. No functionality
John McCall [Thu, 31 Mar 2011 01:59:53 +0000 (01:59 +0000)]
Move all the significant __block code into CGBlocks.cpp.  No functionality
change.

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

13 years agoOops, prefer C-style cast here
Matt Beaumont-Gay [Thu, 31 Mar 2011 01:56:27 +0000 (01:56 +0000)]
Oops, prefer C-style cast here

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

13 years agoRemove a redundant isValid() check
Matt Beaumont-Gay [Thu, 31 Mar 2011 01:46:47 +0000 (01:46 +0000)]
Remove a redundant isValid() check

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

13 years agoSilence GCC warning about differing types on the branches of a conditional expression
Matt Beaumont-Gay [Thu, 31 Mar 2011 01:43:22 +0000 (01:43 +0000)]
Silence GCC warning about differing types on the branches of a conditional expression

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

13 years agoConvert the return value of
Ken Dyck [Thu, 31 Mar 2011 01:08:46 +0000 (01:08 +0000)]
Convert the return value of
VCallAndVBaseOffsetBuilder::getCurrentOffsetOffset() to CharUnits. No change
in functionality intended.

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

13 years agoConvert the OffsetInLayoutClass parameter of
Ken Dyck [Thu, 31 Mar 2011 00:56:47 +0000 (00:56 +0000)]
Convert the OffsetInLayoutClass parameter of
VCallAndVBaseOffsetBuilder::AddVBaseOffsets() to CharUnits. No change in
functionality intended.

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

13 years agoChange Clang's __VERSION__ to include the same basic info as in clang -v.
Daniel Dunbar [Thu, 31 Mar 2011 00:53:51 +0000 (00:53 +0000)]
Change Clang's __VERSION__ to include the same basic info as in clang -v.
 - Please never ever ever ever write a tool that sniffs this.

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

13 years agoConvert the OffsetInLayoutClass of the VCallAndVBaseOffsetBuilder
Ken Dyck [Thu, 31 Mar 2011 00:48:04 +0000 (00:48 +0000)]
Convert the OffsetInLayoutClass of the VCallAndVBaseOffsetBuilder
constructor to CharUnits. No change in functionality intended.

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

13 years agoConvert the RealBaseOffset parameter of
Ken Dyck [Thu, 31 Mar 2011 00:37:24 +0000 (00:37 +0000)]
Convert the RealBaseOffset parameter of
VCallAndVBaseOffsetBuilder::AddVCallAndVBaseOffsets() to
CharUnits. No change in functionality intended.

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

13 years agoBasic: Add support for a build variable to set the repository path that goes
Daniel Dunbar [Thu, 31 Mar 2011 00:32:50 +0000 (00:32 +0000)]
Basic: Add support for a build variable to set the repository path that goes
into the Clang version.

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

13 years agoUse intrinsics for Neon vmull operations. Radar 9208957.
Bob Wilson [Thu, 31 Mar 2011 00:09:00 +0000 (00:09 +0000)]
Use intrinsics for Neon vmull operations.  Radar 9208957.

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

13 years agoAdd '#ifndef _PTRDIFF_T' guard around definition of ptrdiff_t. Fixes <rdar://problem...
Ted Kremenek [Wed, 30 Mar 2011 21:43:52 +0000 (21:43 +0000)]
Add '#ifndef _PTRDIFF_T' guard around definition of ptrdiff_t.  Fixes <rdar://problem/9210154>.

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

13 years agoPut "#pragma message ..." into its own warning (human friendly) category.
Ted Kremenek [Wed, 30 Mar 2011 21:09:57 +0000 (21:09 +0000)]
Put "#pragma message ..." into its own warning (human friendly) category.

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

13 years agoSilence warnings of unkwown -Wlarger-than and -Wframe-larger-than. Fixes rdar://6970318.
Argyrios Kyrtzidis [Wed, 30 Mar 2011 18:02:43 +0000 (18:02 +0000)]
Silence warnings of unkwown -Wlarger-than and -Wframe-larger-than. Fixes rdar://6970318.

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

13 years agoBegin reworking static analyzer support for C++ method calls. The current logic...
Ted Kremenek [Wed, 30 Mar 2011 17:41:19 +0000 (17:41 +0000)]
Begin reworking static analyzer support for C++ method calls.  The current logic was divorced
from how we process ordinary function calls, had a tremendous about of redundancy, and relied
strictly on inlining behavior (which was incomplete) to provide semantics instead of falling
back to the conservative analysis we use for C functions.  This is a significant step into
making C++ analyzer support more useful.

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

13 years agode-sugared when accessing property reference type.
Fariborz Jahanian [Wed, 30 Mar 2011 16:59:30 +0000 (16:59 +0000)]
de-sugared when accessing property reference type.
Add a test case for synthesize ivar. // rdar://9070460

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

13 years agoFix IRGen issues related to using property-dot syntax
Fariborz Jahanian [Wed, 30 Mar 2011 16:11:20 +0000 (16:11 +0000)]
Fix IRGen issues related to using property-dot syntax
for prperty reference types. // rdar://9208606.

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

13 years agoRemove PHINode::reserveOperandSpace(). Instead, add a parameter to
Jay Foad [Wed, 30 Mar 2011 11:28:58 +0000 (11:28 +0000)]
Remove PHINode::reserveOperandSpace(). Instead, add a parameter to
PHINode::Create() giving the (known or expected) number of operands.

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

13 years ago(Almost) always call reserveOperandSpace() on newly created PHINodes.
Jay Foad [Wed, 30 Mar 2011 11:19:06 +0000 (11:19 +0000)]
(Almost) always call reserveOperandSpace() on newly created PHINodes.

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

13 years agoConvert the offset parameter of
Ken Dyck [Wed, 30 Mar 2011 10:11:40 +0000 (10:11 +0000)]
Convert the offset parameter of
VCallAndVBaseOffsetBuilder::AddVCallOffsets() to CharUnits. No change in
functionality intended.

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

13 years agoConvert local offset variable to CharUnits in AddVCallOffsets. No change in
Ken Dyck [Wed, 30 Mar 2011 01:21:33 +0000 (01:21 +0000)]
Convert local offset variable to CharUnits in AddVCallOffsets. No change in
functionality intended.

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

13 years agoConvert a local offset variable to CharUnits. No change in functionality
Ken Dyck [Wed, 30 Mar 2011 01:14:22 +0000 (01:14 +0000)]
Convert a local offset variable to CharUnits. No change in functionality
intended.

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

13 years agoConvert the OffsetInLayoutClass parameter of DeterminePrimaryVirtualBases()
Ken Dyck [Wed, 30 Mar 2011 01:10:23 +0000 (01:10 +0000)]
Convert the OffsetInLayoutClass parameter of DeterminePrimaryVirtualBases()
to CharUnits. No change in functionality intended.

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

13 years agoConvert the OffsetInLayoutClass parameter of LayoutSecondaryVTables to
Ken Dyck [Wed, 30 Mar 2011 00:50:28 +0000 (00:50 +0000)]
Convert the OffsetInLayoutClass parameter of LayoutSecondaryVTables to
CharUnits. No change in functionality intended.

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

13 years agoFix in r128471 is very broad. Some of the unconditional branches need line number...
Devang Patel [Wed, 30 Mar 2011 00:08:31 +0000 (00:08 +0000)]
Fix in r128471 is very broad. Some of the unconditional branches need line number information for better user experience.
Restrict the fix. This fixes break.exp failures from gdb testsuite.

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

13 years ago[analyzer] Allow all checkers of a group to be enabled.
Argyrios Kyrtzidis [Tue, 29 Mar 2011 23:57:41 +0000 (23:57 +0000)]
[analyzer] Allow all checkers of a group to be enabled.

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

13 years ago[analyzer] For -analyzer-checker-help show all the info about groups, packages, and...
Argyrios Kyrtzidis [Tue, 29 Mar 2011 23:57:38 +0000 (23:57 +0000)]
[analyzer] For -analyzer-checker-help show all the info about groups, packages, and which packages/checkers are hidden.

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

13 years agoAdd a libstdc++-4.4 patch for C++0x to the website.
Jeffrey Yasskin [Tue, 29 Mar 2011 22:27:50 +0000 (22:27 +0000)]
Add a libstdc++-4.4 patch for C++0x to the website.

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

13 years agoRobustify test string.
Devang Patel [Tue, 29 Mar 2011 21:06:43 +0000 (21:06 +0000)]
Robustify test string.

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

13 years agoCMake: removed some unnecesary conditionals from add_clang_library.
Oscar Fuentes [Tue, 29 Mar 2011 20:51:00 +0000 (20:51 +0000)]
CMake: removed some unnecesary conditionals from add_clang_library.

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

13 years agoAdd target triple.
Devang Patel [Tue, 29 Mar 2011 20:00:06 +0000 (20:00 +0000)]
Add target triple.

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

13 years ago[analyzer] Checker Packages can now belong to a group. This requires llvm commit...
Argyrios Kyrtzidis [Tue, 29 Mar 2011 18:54:02 +0000 (18:54 +0000)]
[analyzer] Checker Packages can now belong to a group. This requires llvm commit r128474.

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

13 years agoFix an unused variable warning in release builds and make the
Chandler Carruth [Tue, 29 Mar 2011 18:38:10 +0000 (18:38 +0000)]
Fix an unused variable warning in release builds and make the
assert-less codepath marginally more efficient.

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

13 years agoDo not line number entry for unconditional branches. Usually, users do not want to...
Devang Patel [Tue, 29 Mar 2011 18:35:54 +0000 (18:35 +0000)]
Do not line number entry for unconditional branches. Usually, users do not want to stop at closing '}'.

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

13 years agoFixed build error.
John Thompson [Tue, 29 Mar 2011 18:31:21 +0000 (18:31 +0000)]
Fixed build error.

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

13 years agoAdd a triple to make the test friendly on no windows platform.
Francois Pichet [Tue, 29 Mar 2011 11:38:04 +0000 (11:38 +0000)]
Add a triple to make the test friendly on no windows platform.

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

13 years agoAccept __declspec(dllimport) for function defined at class scope in Microsoft mode.
Francois Pichet [Tue, 29 Mar 2011 10:39:17 +0000 (10:39 +0000)]
Accept __declspec(dllimport) for function defined at class scope in Microsoft mode.

This fixes a bunch of errors when compiling MSVC header files with the -DDLL flag.

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

13 years agoFix a bug in how we were resolving the address of overloaded functions
Chandler Carruth [Tue, 29 Mar 2011 08:08:18 +0000 (08:08 +0000)]
Fix a bug in how we were resolving the address of overloaded functions
when the resolution took place due to a single template specialization
being named with an explicit template argument list. In this case, the
"resolution" doesn't take into account the target type at all, and
therefore can take place for functions, static member functions, and
*non-static* member functions. The latter weren't being properly checked
and their proper form enforced in this scenario. We now do so.

The result of this last form slipping through was some confusing logic
in IsStandardConversion handling of these resolved address-of
expressions which eventually exploded in an assert. Simplify this logic
a bit and add some more aggressive asserts to catch improperly formed
expressions getting into this routine.

Finally add systematic testing of member functions, both static and
non-static, in the various forms they can take. One of these is
essentially PR9563, and this commit fixes the crash in that PR. However,
the diagnostics for this are still pretty terrible. We at least are now
accepting the correct constructs and rejecting the invalid ones rather
than accepting invalid or crashing as before.

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

13 years agoAdd workaround for Sema issue found in <rdar://problem/9188004>, which leads to an...
Ted Kremenek [Tue, 29 Mar 2011 01:40:00 +0000 (01:40 +0000)]
Add workaround for Sema issue found in <rdar://problem/9188004>, which leads to an assertion failure in the uninitialized variables analysis.  The problem is that Sema isn't properly registering a variable in a DeclContext (which -Wuninitialized relies on), but
my expertise on the template instantiation logic isn't good enough to fix this problem for real.  This patch worksaround the
problem in -Wuninitialized, but we should fix it for real later.

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

13 years agoDon't do the checks of Sema::DiagnoseEqualityWithExtraParens() on type-dependent...
Argyrios Kyrtzidis [Mon, 28 Mar 2011 23:52:04 +0000 (23:52 +0000)]
Don't do the checks of Sema::DiagnoseEqualityWithExtraParens() on type-dependent expressions. Fixes rdar://9027658.

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

13 years agoImplements property of reference types. Adding
Fariborz Jahanian [Mon, 28 Mar 2011 23:47:18 +0000 (23:47 +0000)]
Implements property of reference types. Adding
an executable test to llvm test suite.
// rdar://9070460.

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

13 years agoIntegrated-As: Support -Wa,-L when using the integrated assembler.
Daniel Dunbar [Mon, 28 Mar 2011 22:49:28 +0000 (22:49 +0000)]
Integrated-As: Support -Wa,-L when using the integrated assembler.

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

13 years agoFrontend/cc1as: Add support for -L.
Daniel Dunbar [Mon, 28 Mar 2011 22:49:24 +0000 (22:49 +0000)]
Frontend/cc1as: Add support for -L.

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

13 years agorefactoring
Anton Yartsev [Mon, 28 Mar 2011 21:00:05 +0000 (21:00 +0000)]
refactoring

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

13 years agoAlso 'self' in blocks need be handled specially.
Fariborz Jahanian [Mon, 28 Mar 2011 16:23:34 +0000 (16:23 +0000)]
Also 'self' in blocks need be handled specially.
// rdar://9181463

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

13 years agoRemove stray null from the middle of a comment. (Found because my editor
Eli Friedman [Mon, 28 Mar 2011 02:00:21 +0000 (02:00 +0000)]
Remove stray null from the middle of a comment.  (Found because my editor
was refusing to open the file.)

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

13 years agoFix PR9572 and neighboring lurking crashers.
Matt Beaumont-Gay [Mon, 28 Mar 2011 01:39:13 +0000 (01:39 +0000)]
Fix PR9572 and neighboring lurking crashers.

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

13 years agoReduce indentation using early exits and add a couple of comments. No
Chandler Carruth [Sun, 27 Mar 2011 21:26:48 +0000 (21:26 +0000)]
Reduce indentation using early exits and add a couple of comments. No
functionality changed.

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

13 years agoAdd my test case for r128353. I think this is the last test case to fail
Chandler Carruth [Sun, 27 Mar 2011 21:03:41 +0000 (21:03 +0000)]
Add my test case for r128353. I think this is the last test case to fail
to be added... Sorry for the noise.

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

13 years agoAdd tests for the uninitialized checks added in r128376. Also clean up
Chandler Carruth [Sun, 27 Mar 2011 20:35:59 +0000 (20:35 +0000)]
Add tests for the uninitialized checks added in r128376. Also clean up
and flesh out the existing uninitialized testing for field initializers.

The tests come from Richard's original patch, but I've cleaned them up
a bit and ordered them more naturally.

Also, I added a test for the most simple base case:
int x = x;

And it turns out we miss this one! =[ That and another bad FIXME on the
field initializer checking are left in the test.

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

13 years agoConvert offset parameter in LayoutPrimaryAndSecondaryVTables() to CharUnits.
Ken Dyck [Sun, 27 Mar 2011 20:33:38 +0000 (20:33 +0000)]
Convert offset parameter in LayoutPrimaryAndSecondaryVTables() to CharUnits.
No change in functionality intended.

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

13 years agoConvert VTableBuilder::MostDerivedClassOffset to CharUnits. No change in
Ken Dyck [Sun, 27 Mar 2011 20:20:28 +0000 (20:20 +0000)]
Convert VTableBuilder::MostDerivedClassOffset to CharUnits. No change in
functionality intended.

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

13 years agoConvert FinalOverriders::MostDerivedClassOffset to CharUnits. No change in
Ken Dyck [Sun, 27 Mar 2011 20:10:29 +0000 (20:10 +0000)]
Convert FinalOverriders::MostDerivedClassOffset to CharUnits. No change in
functionality intended.

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

13 years agoFlip the default for showing include stacks on notes to false. This
Chandler Carruth [Sun, 27 Mar 2011 20:00:08 +0000 (20:00 +0000)]
Flip the default for showing include stacks on notes to false. This
required modifying a few tests that specifically use note include stacks
to check the source manager's view of include stacks. I've simply added
the flag to these tests for now, they may have to be more substantially
changed if we decide to remove support for note include stacks
altogether.

Also, add a test for include stacks on notes that was supposed to go in
with the previous commit.

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

13 years ago'self' is objective-c's 'self' objc pointer only in
Fariborz Jahanian [Sun, 27 Mar 2011 19:53:47 +0000 (19:53 +0000)]
'self' is objective-c's 'self' objc pointer only in
an objc method. Fixes // rdar://9181463

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

13 years agoImprove recovery (error + fix-it) when parsing type dependent template name without...
Francois Pichet [Sun, 27 Mar 2011 19:41:34 +0000 (19:41 +0000)]
Improve recovery (error + fix-it) when parsing type dependent template name without the "template" keyword.

For example:
   typename C1<T>:: /*template*/ Iterator<0> pos;

Also the error is downgraded to an ExtWarn in Microsoft mode.

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

13 years agoRemove a fixed FIXME comment (the base offset has already been converted to
Ken Dyck [Sun, 27 Mar 2011 19:19:52 +0000 (19:19 +0000)]
Remove a fixed FIXME comment (the base offset has already been converted to
CharUnits).

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

13 years agoConvert the offset parameters of AddMethods() to CharUnits. No change in
Ken Dyck [Sun, 27 Mar 2011 19:15:11 +0000 (19:15 +0000)]
Convert the offset parameters of AddMethods() to CharUnits. No change in
functionality intended.

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

13 years agoConvert the BaseOffsetInLayoutClass parameter of ComputeThisAdjustment() to
Ken Dyck [Sun, 27 Mar 2011 19:03:44 +0000 (19:03 +0000)]
Convert the BaseOffsetInLayoutClass parameter of ComputeThisAdjustment() to
CharUnits. No change in functionality intended.

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

13 years agoConvert offset members in MethodInfo to CharUnits. No change in
Ken Dyck [Sun, 27 Mar 2011 18:57:53 +0000 (18:57 +0000)]
Convert offset members in MethodInfo to CharUnits. No change in
functionality intended.

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

13 years agoAltiVec vector comparison logic now affect only vectors of fundamental AltiVec vector...
Anton Yartsev [Sun, 27 Mar 2011 15:36:07 +0000 (15:36 +0000)]
AltiVec vector comparison logic now affect only vectors of fundamental AltiVec vector types. It fixes bug 9347.

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

13 years agoClang supports __STDC_HOSTED__. Patch by Jonathan Sauer
Douglas Gregor [Sun, 27 Mar 2011 09:49:38 +0000 (09:49 +0000)]
Clang supports __STDC_HOSTED__. Patch by Jonathan Sauer

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

13 years agoDiagnose uninitialized uses of a variable within its own initializer.
Chandler Carruth [Sun, 27 Mar 2011 09:46:56 +0000 (09:46 +0000)]
Diagnose uninitialized uses of a variable within its own initializer.
This is basically the same idea as the warning on uninitialized uses of
fields within an initializer list. As such, it is on by default and
under -Wuninitialized.

Original patch by Richard Trieu, with some massaging from me on the
wording and grouping of the diagnostics.

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

13 years agosupported: AltiVec vector initialization with a single literal according to PIM secti...
Anton Yartsev [Sun, 27 Mar 2011 09:32:40 +0000 (09:32 +0000)]
supported: AltiVec vector initialization with a single literal according to PIM section 2.5.1 - after initialization all elements have the value specified by the literal

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

13 years agoWe were emitting construction v-tables with internal linkage all the time.
John McCall [Sun, 27 Mar 2011 09:00:25 +0000 (09:00 +0000)]
We were emitting construction v-tables with internal linkage all the time.
Emit them instead with the linkage of the VTT.

I'm actually really ambivalent about this;  it's what GCC does, but outside
of improving code size (if the linkage is coalescing), I'm not sure it's
at all relevant.  Construction vtables are naturally referenced only by the
VTT, which is itself only referenced by complete-object constructors and
destructors;  giving the construction vtables possibly-external linkage is
important if you have an optimization that drills through the VTT to a
reference to a particular construction vtable which it cannot just emit
itself.

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

13 years agowww/get_started.html: Fix a few URLs.
NAKAMURA Takumi [Sun, 27 Mar 2011 02:04:21 +0000 (02:04 +0000)]
www/get_started.html: Fix a few URLs.

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

13 years agoAdd an option to suppress include stack printing on note diagnostics.
Chandler Carruth [Sun, 27 Mar 2011 01:50:55 +0000 (01:50 +0000)]
Add an option to suppress include stack printing on note diagnostics.
These stacks are often less important than those on primary diagnostics.

As the number of notes grows, this becomes increasingly important. The
include stack printing is clever and doesn't print stacks for adjacent
diagnostics from the same file, but when a note is in between a sequence
of errors in a header file, and the notes all refer to some other file,
we end up getting a worst-case ping-pong of include stacks that take up
a great deal of vertical space.

Still, for now, the default behavior isn't changed. We can evaluate user
feedback with the flag.

Patch by Richard Trieu, a couple of style tweaks from me.

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

13 years agoAdd -f[no-]strict-overflow to the Clang driver. Use it to set the
Chandler Carruth [Sun, 27 Mar 2011 00:04:55 +0000 (00:04 +0000)]
Add -f[no-]strict-overflow to the Clang driver. Use it to set the
default for -fwrapv if that flag isn't specified explicitly. We always
prefer an explict setting of -fwrapv when present. Also adds support for
-fno-wrapv to allow disabling -fwrapv even when -fno-strict-overflow is
passed.

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

13 years agoImprove -Wheader-hygiene to warn about using directives inside linkage
Douglas Gregor [Sat, 26 Mar 2011 22:25:30 +0000 (22:25 +0000)]
Improve -Wheader-hygiene to warn about using directives inside linkage
specifications within the global scope, from Elliot Glaysher.

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