]> granicus.if.org Git - clang/log
clang
15 years agoir-gen for generating copying of scalar data members in
Fariborz Jahanian [Mon, 10 Aug 2009 18:34:26 +0000 (18:34 +0000)]
ir-gen for generating copying of scalar data members in
a synthesized copy constructor.

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

15 years agoAdd walking bases in reverse order.
Mike Stump [Mon, 10 Aug 2009 18:21:22 +0000 (18:21 +0000)]
Add walking bases in reverse order.

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

15 years agoFixed a ir-gen bug in synthesizing copy constructors.
Fariborz Jahanian [Mon, 10 Aug 2009 17:20:45 +0000 (17:20 +0000)]
Fixed a ir-gen bug in synthesizing copy constructors.

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

15 years agoUse LLVM's new error handler API to report back end errors using Diagnostic.
Daniel Dunbar [Mon, 10 Aug 2009 03:40:28 +0000 (03:40 +0000)]
Use LLVM's new error handler API to report back end errors using Diagnostic.

For example,
--
ddunbar@giles:Frontend$ clang -c backend-errors.c
fatal error: error in backend: Global variable 'a' has an invalid section specifier
      'I AM, not, legal': mach-o section specifier uses an unknown section type.
--
compare to:
--
ddunbar@giles:Frontend$ gcc -c backend-errors.c
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Expected comma after segment-name
/var/folders/DQ/DQ8GT3++HESEzT1obWBynE+++TI/-Tmp-//cc45w2pq.s:2:Rest of line ignored. 1st junk character valued 77 (M).
--

Yay!

I am not tied to my wording choice, we could also go with "uncoverable error"
for the prefix, or just leave it off entirely.

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

15 years agoRevert r78535, it is causing a number of failures to build projects.
Daniel Dunbar [Mon, 10 Aug 2009 03:01:36 +0000 (03:01 +0000)]
Revert r78535, it is causing a number of failures to build projects.

--- Reverse-merging r78535 into '.':
D    test/Sema/altivec-init.c
U    include/clang/Basic/DiagnosticSemaKinds.td
U    include/clang/AST/Expr.h
U    include/clang/AST/StmtNodes.def
U    include/clang/Parse/Parser.h
U    include/clang/Parse/Action.h
U    tools/clang-cc/clang-cc.cpp
U    lib/Frontend/PrintParserCallbacks.cpp
U    lib/CodeGen/CGExprScalar.cpp
U    lib/Sema/SemaInit.cpp
U    lib/Sema/Sema.h
U    lib/Sema/SemaExpr.cpp
U    lib/Sema/SemaTemplateInstantiateExpr.cpp
U    lib/AST/StmtProfile.cpp
U    lib/AST/Expr.cpp
U    lib/AST/StmtPrinter.cpp
U    lib/Parse/ParseExpr.cpp
U    lib/Parse/ParseExprCXX.cpp

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

15 years agowarn, as gcc does, if __attribute__((malloc)) applied to function returning non-point...
Ryan Flynn [Sun, 9 Aug 2009 22:36:29 +0000 (22:36 +0000)]
warn, as gcc does, if __attribute__((malloc)) applied to function returning non-pointer type

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

15 years agomap previously ignored __attribute((malloc)) to noalias attribute of llvm function...
Ryan Flynn [Sun, 9 Aug 2009 20:07:29 +0000 (20:07 +0000)]
map previously ignored __attribute((malloc)) to noalias attribute of llvm function's return

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

15 years agoImprove handling of member pointers.
Anders Carlsson [Sun, 9 Aug 2009 18:26:27 +0000 (18:26 +0000)]
Improve handling of member pointers.

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

15 years agoAltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);
Nate Begeman [Sun, 9 Aug 2009 17:55:44 +0000 (17:55 +0000)]
AltiVec-style vector initializer syntax, vec4 a = (vec4)(a, b, c, d);

In addition to being defined by the AltiVec PIM, this is also the vector
initializer syntax used by OpenCL, so that vector literals are compatible
with macro arguments.

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

15 years agoOlder GCCs don't have vector::data().
Benjamin Kramer [Sat, 8 Aug 2009 23:43:26 +0000 (23:43 +0000)]
Older GCCs don't have vector::data().

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

15 years agoir-gen for initialization, in synthesize copy constructor,
Fariborz Jahanian [Sat, 8 Aug 2009 23:32:22 +0000 (23:32 +0000)]
ir-gen for initialization, in synthesize copy constructor,
 of base/field which have trivial copy constructor.

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

15 years agoAdd support for global initializers.
Anders Carlsson [Sat, 8 Aug 2009 23:24:23 +0000 (23:24 +0000)]
Add support for global initializers.

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

15 years agoRefactor some code and implement support for global destructors for static variables.
Anders Carlsson [Sat, 8 Aug 2009 21:45:14 +0000 (21:45 +0000)]
Refactor some code and implement support for global destructors for static variables.

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

15 years agoUse CastExpr::CK_ArrayToPointerDecay and fix an assert.
Anders Carlsson [Sat, 8 Aug 2009 21:04:35 +0000 (21:04 +0000)]
Use CastExpr::CK_ArrayToPointerDecay and fix an assert.

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

15 years agoAdd tests.
Anders Carlsson [Sat, 8 Aug 2009 19:43:14 +0000 (19:43 +0000)]
Add tests.

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

15 years agoTake #pragma pack into account when laying out structs. Fixes rdar://problem/7095436.
Anders Carlsson [Sat, 8 Aug 2009 19:38:24 +0000 (19:38 +0000)]
Take #pragma pack into account when laying out structs. Fixes rdar://problem/7095436.

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

15 years agoRefactoring of copy ctor ir-gen. No change in functionality.
Fariborz Jahanian [Sat, 8 Aug 2009 19:31:03 +0000 (19:31 +0000)]
Refactoring of copy ctor ir-gen. No change in functionality.

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

15 years agoPR4700 - remove shift by 0 warning
Ryan Flynn [Sat, 8 Aug 2009 19:18:23 +0000 (19:18 +0000)]
PR4700 - remove shift by 0 warning

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

15 years agoIntroduce a new PragmaPack attribute, and use it for #pragma pack. The PackedAttr...
Anders Carlsson [Sat, 8 Aug 2009 18:23:56 +0000 (18:23 +0000)]
Introduce a new PragmaPack attribute, and use it for #pragma pack. The PackedAttr now only represents __attribute__((packed)).

This is necessary because #pragma pack and __attribute__((packed)) have different semantics. No functionality change yet, but this lays the groundwork for fixing a record layout bug.

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

15 years agoAssert that the LLVM type has the same size as the RecordDecl size.
Anders Carlsson [Sat, 8 Aug 2009 18:01:57 +0000 (18:01 +0000)]
Assert that the LLVM type has the same size as the RecordDecl size.

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

15 years agogetFunctionLevelDeclContext needs to get the previous DeclContext if EnterDeclaratorC...
Anders Carlsson [Sat, 8 Aug 2009 17:48:49 +0000 (17:48 +0000)]
getFunctionLevelDeclContext needs to get the previous DeclContext if EnterDeclaratorContext has been called. Fixes PR4694. (Doug, please review)

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

15 years agoFactor some code to get the "function level" DeclContext out into a separate function.
Anders Carlsson [Sat, 8 Aug 2009 17:45:02 +0000 (17:45 +0000)]
Factor some code to get the "function level" DeclContext out into a separate function.

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

15 years agoMake sure to diagnose use of declarations in the case where we create an implicit...
Anders Carlsson [Sat, 8 Aug 2009 16:55:18 +0000 (16:55 +0000)]
Make sure to diagnose use of declarations in the case where we create an implicit CXXThisExpr.

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

15 years agoUpdate test case; I don't really understand why packed enums changed this, but
Daniel Dunbar [Sat, 8 Aug 2009 15:47:00 +0000 (15:47 +0000)]
Update test case; I don't really understand why packed enums changed this, but
the new havior is better so...

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

15 years agoPatch should implement packed enums - PR4098. Credit to Anders Johnsen.
Edward O'Callaghan [Sat, 8 Aug 2009 14:36:57 +0000 (14:36 +0000)]
Patch should implement packed enums - PR4098. Credit to Anders Johnsen.

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

15 years agoGet rid of Stmt::Clone now that we can reference count statements instead.
Anders Carlsson [Sat, 8 Aug 2009 02:50:17 +0000 (02:50 +0000)]
Get rid of Stmt::Clone now that we can reference count statements instead.

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

15 years agoIntroduce reference counting for statements and expressions, using it
Douglas Gregor [Sat, 8 Aug 2009 01:41:12 +0000 (01:41 +0000)]
Introduce reference counting for statements and expressions, using it
to allow sharing of nodes. Simplifies some aspects of template
instantiation, and fixes both PR3444 and <rdar://problem/6757457>.

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

15 years agoRemove use of uninitized variable.
Fariborz Jahanian [Sat, 8 Aug 2009 00:59:58 +0000 (00:59 +0000)]
Remove use of uninitized variable.

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

15 years agoSynthesize copying of non-static data members with
Fariborz Jahanian [Sat, 8 Aug 2009 00:15:41 +0000 (00:15 +0000)]
Synthesize copying of non-static data members with
non-trivial copy constructors.

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

15 years agoSynthesized copy constructor now generates code for
Fariborz Jahanian [Fri, 7 Aug 2009 23:51:33 +0000 (23:51 +0000)]
Synthesized copy constructor now generates code for
copying non-virtual base classes which have non-trivial
constructor. Work in progress.

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

15 years agoAdd a CK_ArrayToPointerDecay cast kind.
Anders Carlsson [Fri, 7 Aug 2009 23:48:20 +0000 (23:48 +0000)]
Add a CK_ArrayToPointerDecay cast kind.

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

15 years agoAdd CK_ToUnion and use it for aggregate expression codegen.
Anders Carlsson [Fri, 7 Aug 2009 23:22:37 +0000 (23:22 +0000)]
Add CK_ToUnion and use it for aggregate expression codegen.

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

15 years agoMore CastKind work.
Anders Carlsson [Fri, 7 Aug 2009 22:21:05 +0000 (22:21 +0000)]
More CastKind work.

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

15 years agoJust add global scope to the associated namespaces set instead of tracking it
John McCall [Fri, 7 Aug 2009 22:18:02 +0000 (22:18 +0000)]
Just add global scope to the associated namespaces set instead of tracking it
separately.  Add the framework (currently unfed) for finding friend declarations
during argument-dependent lookup.

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

15 years agoAdd vbase offsets to the vtable. Wow, having an rbegin was so
Mike Stump [Fri, 7 Aug 2009 21:54:03 +0000 (21:54 +0000)]
Add vbase offsets to the vtable.  Wow, having an rbegin was so
fortuitous.  WIP.

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

15 years agoAdd rbegin and rend for virtual bases, might come in handy some day.
Mike Stump [Fri, 7 Aug 2009 21:44:39 +0000 (21:44 +0000)]
Add rbegin and rend for virtual bases, might come in handy some day.

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

15 years agoFix: <rdar://problem/7075531> static analyzer wrongly detects unused ivars used in...
Ted Kremenek [Fri, 7 Aug 2009 21:13:23 +0000 (21:13 +0000)]
Fix: <rdar://problem/7075531> static analyzer wrongly detects unused ivars used in blocks

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

15 years agoConstify some pointers. No functionality change.
Ted Kremenek [Fri, 7 Aug 2009 20:55:20 +0000 (20:55 +0000)]
Constify some pointers.  No functionality change.

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

15 years agoMore synthesis of copy constructors. Work in progress.
Fariborz Jahanian [Fri, 7 Aug 2009 20:22:40 +0000 (20:22 +0000)]
More synthesis of copy constructors. Work in progress.

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

15 years agoFix typo.
Mike Stump [Fri, 7 Aug 2009 20:14:05 +0000 (20:14 +0000)]
Fix typo.

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

15 years agoAdd ability to generate vcall offsets for primary virtual base.
Mike Stump [Fri, 7 Aug 2009 19:00:50 +0000 (19:00 +0000)]
Add ability to generate vcall offsets for primary virtual base.

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

15 years agoUse the correct cast kind as suggested by Doug.
Anders Carlsson [Fri, 7 Aug 2009 18:45:49 +0000 (18:45 +0000)]
Use the correct cast kind as suggested by Doug.

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

15 years agoFix some const_cast issues. This is the beginning of the rabbit hole.
Mike Stump [Fri, 7 Aug 2009 18:05:12 +0000 (18:05 +0000)]
Fix some const_cast issues.  This is the beginning of the rabbit hole.

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

15 years agoPR3333: warn when shifting by invalid amount
Ryan Flynn [Fri, 7 Aug 2009 16:20:20 +0000 (16:20 +0000)]
PR3333: warn when shifting by invalid amount

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

15 years agoSeparate Stmt::Destroy into the entrypoint for destroying a statement
Douglas Gregor [Fri, 7 Aug 2009 06:08:38 +0000 (06:08 +0000)]
Separate Stmt::Destroy into the entrypoint for destroying a statement
or expression (Destroy) from the virtual function used to actually
destroy a given expression (DoDestroy).

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

15 years agoadd support for opensuse 11.1/11.2 search paths, patch by Stefan Reinauer
Chris Lattner [Fri, 7 Aug 2009 05:28:24 +0000 (05:28 +0000)]
add support for opensuse 11.1/11.2 search paths, patch by Stefan Reinauer
and Carl-Daniel Hailfinger!

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

15 years agoAdd support for vcall generation for vtables for virtual bases. WIP.
Mike Stump [Thu, 6 Aug 2009 23:48:32 +0000 (23:48 +0000)]
Add support for vcall generation for vtables for virtual bases.  WIP.

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

15 years agoPatch toward synthesizing copy constructors.
Fariborz Jahanian [Thu, 6 Aug 2009 23:38:16 +0000 (23:38 +0000)]
Patch toward synthesizing copy constructors.
Work in progress.

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

15 years agoFix a few more false positives involving RegionStore and unions, but this time
Ted Kremenek [Thu, 6 Aug 2009 22:33:36 +0000 (22:33 +0000)]
Fix a few more false positives involving RegionStore and unions, but this time
with array accesses. In the process, refactor some common logic in
RetrieveElement() and RetrieveField() into RetrieveFieldOrElementCommon().

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

15 years agoMinor refactoring to introduce a new transformation function,
Douglas Gregor [Thu, 6 Aug 2009 22:17:10 +0000 (22:17 +0000)]
Minor refactoring to introduce a new transformation function,
TransformStmt, into the tree transformer.

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

15 years agoAlmost forgot to turn on 32-bit test.
Mike Stump [Thu, 6 Aug 2009 22:02:55 +0000 (22:02 +0000)]
Almost forgot to turn on 32-bit test.

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

15 years agoTestcase for recent checkin.
Mike Stump [Thu, 6 Aug 2009 21:53:24 +0000 (21:53 +0000)]
Testcase for recent checkin.

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

15 years agoAlso generate the rtti field for virtual bases for vtables. Turn on
Mike Stump [Thu, 6 Aug 2009 21:49:36 +0000 (21:49 +0000)]
Also generate the rtti field for virtual bases for vtables.  Turn on
rtti so we can properly test it.  Refactor code a little.  Still a
work in progress.

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

15 years agoFix a couple false positive "uninitialized value" warnings with RegionStore
Ted Kremenek [Thu, 6 Aug 2009 21:43:54 +0000 (21:43 +0000)]
Fix a couple false positive "uninitialized value" warnings with RegionStore
involving reasoning about unions (which we don't handle yet).

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

15 years agoDrop the friend-inner-class diagnostic from an extwarn to an ext and don't
John McCall [Thu, 6 Aug 2009 21:21:21 +0000 (21:21 +0000)]
Drop the friend-inner-class diagnostic from an extwarn to an ext and don't
guard its report on GNUMode.

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

15 years agoAdd a simple tool for comparing two static analyzer runs, primarily for use from
Daniel Dunbar [Thu, 6 Aug 2009 21:15:33 +0000 (21:15 +0000)]
Add a simple tool for comparing two static analyzer runs, primarily for use from
buildbot.

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

15 years agoPermit a class to friend its members in C++0x, without restriction.
John McCall [Thu, 6 Aug 2009 20:49:32 +0000 (20:49 +0000)]
Permit a class to friend its members in C++0x, without restriction.
Permit a class to friend its class members in C++ 98, as long as extensions
are enabled (and even when they aren't, only give an extwarn about it).

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

15 years agoSet and use Elidable in elimination of copy ctors.
Fariborz Jahanian [Thu, 6 Aug 2009 19:12:38 +0000 (19:12 +0000)]
Set and use Elidable in elimination of copy ctors.

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

15 years agoLayout the primary base first in the vtable.
Mike Stump [Thu, 6 Aug 2009 18:05:22 +0000 (18:05 +0000)]
Layout the primary base first in the vtable.

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

15 years agoAfter reporting ill-formed copy constructor(12.8.p3)
Fariborz Jahanian [Thu, 6 Aug 2009 17:22:51 +0000 (17:22 +0000)]
After reporting ill-formed copy constructor(12.8.p3)
don't recurs and crash.

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

15 years agos/ccc/clang/
Daniel Dunbar [Thu, 6 Aug 2009 16:47:53 +0000 (16:47 +0000)]
s/ccc/clang/

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

15 years agoWhen we encounter a dependent type that was parsed before we know that
Douglas Gregor [Thu, 6 Aug 2009 16:20:37 +0000 (16:20 +0000)]
When we encounter a dependent type that was parsed before we know that
we were going to enter into the scope of a class template or class
template partial specialization, rebuild that type so that it can
refer to members of the current instantiation, as in code like

  template<typename T>
  struct X {
    typedef T* pointer;
    pointer data();
  };

  template<typename T>
  typename X<T>::pointer X<T>::data() { ... }

Without rebuilding the return type of this out-of-line definition, the
canonical return type of the out-of-line definition (a TypenameType)
will not match the canonical return type of the declaration (the
canonical type of T*).

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

15 years agoMore layout for virtual tables for virtual bases. Still in progress.
Mike Stump [Thu, 6 Aug 2009 15:50:11 +0000 (15:50 +0000)]
More layout for virtual tables for virtual bases.  Still in progress.

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

15 years agoLet's remember we want better codegen for these.
Mike Stump [Thu, 6 Aug 2009 14:16:19 +0000 (14:16 +0000)]
Let's remember we want better codegen for these.

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

15 years agoTestcase for a recent checkin for vbase layout ordering. I hate to
Mike Stump [Thu, 6 Aug 2009 14:12:47 +0000 (14:12 +0000)]
Testcase for a recent checkin for vbase layout ordering.  I hate to
optimize and check for non-optimal code, but until the frontend is as
powerful as fold...

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

15 years agoLayout virtual bases. Work in progress.
Mike Stump [Thu, 6 Aug 2009 13:41:24 +0000 (13:41 +0000)]
Layout virtual bases.  Work in progress.

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

15 years agoAdd link to LLVM's Getting Started page.
Anton Korobeynikov [Thu, 6 Aug 2009 13:00:08 +0000 (13:00 +0000)]
Add link to LLVM's Getting Started page.
Patch by John Thompson!

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

15 years agoSilence gcc warning about non-virtual destructors.
Benjamin Kramer [Thu, 6 Aug 2009 12:59:58 +0000 (12:59 +0000)]
Silence gcc warning about non-virtual destructors.

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

15 years agoI have a dream, one day, we won't need to do this.
Mike Stump [Thu, 6 Aug 2009 12:56:50 +0000 (12:56 +0000)]
I have a dream, one day, we won't need to do this.

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

15 years agoFix spell-o.
Mike Stump [Thu, 6 Aug 2009 12:52:13 +0000 (12:52 +0000)]
Fix spell-o.

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

15 years agoI forgot adding this header for r78298.
Zhongxing Xu [Thu, 6 Aug 2009 12:49:15 +0000 (12:49 +0000)]
I forgot adding this header for r78298.

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

15 years agoLast step of template cleanup: merge *BuilderImpl to *Builder.
Zhongxing Xu [Thu, 6 Aug 2009 12:48:26 +0000 (12:48 +0000)]
Last step of template cleanup: merge *BuilderImpl to *Builder.
Some Builders need further cleanup.

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

15 years agoCore analysis engine template cleanup step 2:
Zhongxing Xu [Thu, 6 Aug 2009 10:00:15 +0000 (10:00 +0000)]
Core analysis engine template cleanup step 2:
merge GRCoreEngineImpl and GRCoreEngine.

Introduce a new interface class GRSubEngine as the subengine of GRCoreEngine.
GRExprEngine subclasses GRSubEngine now.

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

15 years agoFix comment.
Zhongxing Xu [Thu, 6 Aug 2009 09:22:08 +0000 (09:22 +0000)]
Fix comment.

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

15 years agoImplement transformation of template names within the generic tree
Douglas Gregor [Thu, 6 Aug 2009 06:41:21 +0000 (06:41 +0000)]
Implement transformation of template names within the generic tree
transform, then use the result for template instantiation. The generic
transformation fixes a few issues:

  - It copes better with template template parameters and member
  templates (when they're implemented).
  - The logic used to replace template template parameters with their
  arguments is now centralized in TransformDecl, so that it will apply
  for other declaration-instantiation steps.
  - The error-recovery strategy is normalized now, so that any error
  results in a NULL TemplateName.

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

15 years agoCore analysis engine template cleanup step 2:
Zhongxing Xu [Thu, 6 Aug 2009 06:28:40 +0000 (06:28 +0000)]
Core analysis engine template cleanup step 2:
  merge ExplodedGraphImpl and ExplodedGraph.

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

15 years agoUpdate test case.
Ted Kremenek [Thu, 6 Aug 2009 06:26:40 +0000 (06:26 +0000)]
Update test case.

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

15 years agoImplement transformation of nested-name-specifiers within the general
Douglas Gregor [Thu, 6 Aug 2009 05:28:30 +0000 (05:28 +0000)]
Implement transformation of nested-name-specifiers within the general
tree transformation. Template instantiation uses this general
transformation rather than implementing its own transformation.

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

15 years agoFix typo reported in <rdar://problem/7121409>.
Ted Kremenek [Thu, 6 Aug 2009 05:01:36 +0000 (05:01 +0000)]
Fix typo reported in <rdar://problem/7121409>.

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

15 years agoRefactor RegionStoreManager::RemoveDeadBindings to also scan the bindings of LazyComp...
Ted Kremenek [Thu, 6 Aug 2009 04:50:20 +0000 (04:50 +0000)]
Refactor RegionStoreManager::RemoveDeadBindings to also scan the bindings of LazyCompoundSVals.

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

15 years agoPredefine __cplusplus to the right value (199711L), except when in GNU mode.
Douglas Gregor [Thu, 6 Aug 2009 04:09:28 +0000 (04:09 +0000)]
Predefine __cplusplus to the right value (199711L), except when in GNU mode.

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

15 years agoRemove unimplemented methods 'AddRegionView' and 'RemoveRegionView'. They are no...
Ted Kremenek [Thu, 6 Aug 2009 03:41:56 +0000 (03:41 +0000)]
Remove unimplemented methods 'AddRegionView' and 'RemoveRegionView'.  They are no longer needed.

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

15 years agoWhen profiling an ExplodedNode, don't re-profile the state: they have
Ted Kremenek [Thu, 6 Aug 2009 03:39:20 +0000 (03:39 +0000)]
When profiling an ExplodedNode, don't re-profile the state: they have
already been uniqued.

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

15 years agoSupport nested-name-specifiers for C++ member access expressions, e.g.,
Douglas Gregor [Thu, 6 Aug 2009 03:17:00 +0000 (03:17 +0000)]
Support nested-name-specifiers for C++ member access expressions, e.g.,

  this->Base::foo

from James Porter!

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

15 years agoadd support for FreeBSD's format(printf0,x,y) attribute; allows null format string.
Ryan Flynn [Thu, 6 Aug 2009 03:00:50 +0000 (03:00 +0000)]
add support for FreeBSD's format(printf0,x,y) attribute; allows null format string.

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

15 years agoFirst pass at friend semantics.
John McCall [Thu, 6 Aug 2009 02:15:43 +0000 (02:15 +0000)]
First pass at friend semantics.

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

15 years agoCompletely remove the code using region cast.
Zhongxing Xu [Thu, 6 Aug 2009 02:14:29 +0000 (02:14 +0000)]
Completely remove the code using region cast.

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

15 years agoAdd additional library paths for Linux distros on mixed 32/64-bit systems.
Daniel Dunbar [Thu, 6 Aug 2009 01:47:11 +0000 (01:47 +0000)]
Add additional library paths for Linux distros on mixed 32/64-bit systems.
 - Patch by Carl-Daniel Hailfinger.

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

15 years agoFix locating the 'lit.cfg' file when running on only a single file in the
Daniel Dunbar [Thu, 6 Aug 2009 01:41:03 +0000 (01:41 +0000)]
Fix locating the 'lit.cfg' file when running on only a single file in the
current directory.

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

15 years agoAs GRState seems general enough, it is time to merge some template classes
Zhongxing Xu [Thu, 6 Aug 2009 01:32:16 +0000 (01:32 +0000)]
As GRState seems general enough, it is time to merge some template classes
and their impl base classes. This can greatly simply some code of the core
analysis engine. This patch merges ExplodedNodeImpl into ExplodedNode.

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

15 years agoFix clang breakage, CGF can be null in this context.
Daniel Dunbar [Thu, 6 Aug 2009 01:24:27 +0000 (01:24 +0000)]
Fix clang breakage, CGF can be null in this context.

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

15 years agoImplement lazy "copying" of structures and arrays in RegionStore. While
Ted Kremenek [Thu, 6 Aug 2009 01:20:57 +0000 (01:20 +0000)]
Implement lazy "copying" of structures and arrays in RegionStore. While
RegionStore already lazily abstracted the contents of arrays and structs, when
doing an assignment from one array/struct to another we did an explicit
element-wise copy, which resulted in a loss of laziness and huge performance
problem when analyzing many code bases.

Now RegionStoreManager handles such assignments using a new SVal could
'LazyCompoundSVal', which basically means the value of a given struct or array
(a MemRegion*) in a specific state (GRState). When we do a load from a field
whose encompassing struct binds to a LazyCompoundSVal, we essentially do a field
lookup in the original structure. This means we have essentially zero copying of
data for structs/arrays and everything stays lazy.

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

15 years agoPatch to optimize away copy constructor call when
Fariborz Jahanian [Thu, 6 Aug 2009 01:02:49 +0000 (01:02 +0000)]
Patch to optimize away copy constructor call when
appropriate.

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

15 years agoAlisdairM pointed out that this will likely be relaxed in C++0x, so let's
John McCall [Thu, 6 Aug 2009 00:50:46 +0000 (00:50 +0000)]
AlisdairM pointed out that this will likely be relaxed in C++0x, so let's
make a note of it in the test case.

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

15 years agoFixup object layout when we have a primary base (it goes first). Start preping for
Mike Stump [Thu, 6 Aug 2009 00:38:46 +0000 (00:38 +0000)]
Fixup object layout when we have a primary base (it goes first).  Start preping for
virtual base layout.

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

15 years agoAdd a test for invalid uses of non-static members from nested classes, just
John McCall [Wed, 5 Aug 2009 23:56:26 +0000 (23:56 +0000)]
Add a test for invalid uses of non-static members from nested classes, just
because I was thinking about it.

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

15 years agoUpdate for LLVM API change.
Owen Anderson [Wed, 5 Aug 2009 23:18:46 +0000 (23:18 +0000)]
Update for LLVM API change.

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

15 years agoRefactor some bits.
Mike Stump [Wed, 5 Aug 2009 22:59:44 +0000 (22:59 +0000)]
Refactor some bits.

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

15 years agoAdd another test for a recent checkin.
Mike Stump [Wed, 5 Aug 2009 22:48:36 +0000 (22:48 +0000)]
Add another test for a recent checkin.

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

15 years agoCalculate the primary base class better and use that when laying down
Mike Stump [Wed, 5 Aug 2009 22:37:18 +0000 (22:37 +0000)]
Calculate the primary base class better and use that when laying down
the vtable.  Still a work in progress.

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