]> granicus.if.org Git - clang/log
clang
14 years agoMaintain type source information for functions through template
John McCall [Thu, 11 Mar 2010 09:03:00 +0000 (09:03 +0000)]
Maintain type source information for functions through template
instantiation.  Based on a patch by Enea Zaffanella!  I found a way to
reduce some of the redundancy between TreeTransform's "standard"
FunctionProtoType transformation and TemplateInstantiator's override,
and I killed off the old SubstFunctionType by adding type source info
for the last cases where we were creating FunctionDecls without TSI
(at least that get passed through template instantiation).

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

14 years agoSplit C++ friend declarations into their own header/implementation file.
John McCall [Thu, 11 Mar 2010 07:50:04 +0000 (07:50 +0000)]
Split C++ friend declarations into their own header/implementation file.
I'm expecting this portion of the AST to grow and change, and I'd like to
be able to do that with minimal recompilation.  If this proves unnecessary
when access control is fully-implemented, I'll fold the classes back into
DeclCXX.h.

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

14 years agoRename getVirtualBaseOffsetIndex to getVirtualBaseOffsetOffset to reflect what it...
Anders Carlsson [Thu, 11 Mar 2010 07:15:17 +0000 (07:15 +0000)]
Rename getVirtualBaseOffsetIndex to getVirtualBaseOffsetOffset to reflect what it actually does.

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

14 years agoWhen possible, use the vbase offset offsets from the most derived class directly.
Anders Carlsson [Thu, 11 Mar 2010 07:00:45 +0000 (07:00 +0000)]
When possible, use the vbase offset offsets from the most derived class directly.

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

14 years agoAdd a test.
Anders Carlsson [Thu, 11 Mar 2010 06:44:31 +0000 (06:44 +0000)]
Add a test.

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

14 years agoKeep track of, and dump, vbase offset offsets.
Anders Carlsson [Thu, 11 Mar 2010 06:43:12 +0000 (06:43 +0000)]
Keep track of, and dump, vbase offset offsets.

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

14 years agoFix tests.
Anders Carlsson [Thu, 11 Mar 2010 06:10:52 +0000 (06:10 +0000)]
Fix tests.

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

14 years agoRun the new vtable builder for construction vtables as well now. Note that we still...
Anders Carlsson [Thu, 11 Mar 2010 05:48:21 +0000 (05:48 +0000)]
Run the new vtable builder for construction vtables as well now. Note that we still don't use the data it generates.

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

14 years agoMore record layout builder cleanup and simplification.
Anders Carlsson [Thu, 11 Mar 2010 05:42:17 +0000 (05:42 +0000)]
More record layout builder cleanup and simplification.

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

14 years agoGet rid of the PrimaryBase parameter from LayoutVirtualBases.
Anders Carlsson [Thu, 11 Mar 2010 04:33:54 +0000 (04:33 +0000)]
Get rid of the PrimaryBase parameter from LayoutVirtualBases.

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

14 years agoMore cleanup towards fixing the real bug.
Anders Carlsson [Thu, 11 Mar 2010 04:24:02 +0000 (04:24 +0000)]
More cleanup towards fixing the real bug.

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

14 years agoReplace the class offset vectors in RecordLayoutBuilder with maps instead so we'll...
Anders Carlsson [Thu, 11 Mar 2010 04:10:39 +0000 (04:10 +0000)]
Replace the class offset vectors in RecordLayoutBuilder with maps instead so we'll have faster lookup and so we can detect duplicates.

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

14 years agoMore cleanup.
Anders Carlsson [Thu, 11 Mar 2010 03:39:12 +0000 (03:39 +0000)]
More cleanup.

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

14 years agoMore record layout builder cleanup.
Anders Carlsson [Thu, 11 Mar 2010 02:41:30 +0000 (02:41 +0000)]
More record layout builder cleanup.

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

14 years agoAssert that primary bases always have offset 0.
Anders Carlsson [Thu, 11 Mar 2010 01:49:18 +0000 (01:49 +0000)]
Assert that primary bases always have offset 0.

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

14 years agoRemove unused 'IVars' field from ObjCInterfaceDecl. That functionality
Ted Kremenek [Thu, 11 Mar 2010 00:36:10 +0000 (00:36 +0000)]
Remove unused 'IVars' field from ObjCInterfaceDecl.  That functionality
has migrated to DeclContext.

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

14 years agoRemove the IndirectPrimary parameter in LayoutVirtualBases; it's already there as...
Anders Carlsson [Thu, 11 Mar 2010 00:21:21 +0000 (00:21 +0000)]
Remove the IndirectPrimary parameter in LayoutVirtualBases; it's already there as a member variable.

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

14 years agoMore cleanup and simplification of the record layout builder.
Anders Carlsson [Thu, 11 Mar 2010 00:15:35 +0000 (00:15 +0000)]
More cleanup and simplification of the record layout builder.

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

14 years agoSupport PPC-32 DWARF EH intrinisics. Thanks to rdivacky for his assistance.
John McCall [Thu, 11 Mar 2010 00:10:12 +0000 (00:10 +0000)]
Support PPC-32 DWARF EH intrinisics.  Thanks to rdivacky for his assistance.

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

14 years agoset alignment on static locals properly, patch by Arnaud de Grandmaison!
Chris Lattner [Wed, 10 Mar 2010 23:59:59 +0000 (23:59 +0000)]
set alignment on static locals properly, patch by Arnaud de Grandmaison!

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

14 years agoGet rid of the LayoutBaseNonVirtually; it was used to lay out a base either as a...
Anders Carlsson [Wed, 10 Mar 2010 22:26:24 +0000 (22:26 +0000)]
Get rid of the LayoutBaseNonVirtually; it was used to lay out a base either as a non-virtual base or a virtual base.

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

14 years agoMore shuffling.
Anders Carlsson [Wed, 10 Mar 2010 22:21:28 +0000 (22:21 +0000)]
More shuffling.

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

14 years agoCleanups, no functionality change yet.
Anders Carlsson [Wed, 10 Mar 2010 22:16:06 +0000 (22:16 +0000)]
Cleanups, no functionality change yet.

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

14 years agoadd DESTDIR support for clang headers, PR6556.
Chris Lattner [Wed, 10 Mar 2010 21:26:01 +0000 (21:26 +0000)]
add DESTDIR support for clang headers, PR6556.
Patch by Matthias Klose!

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

14 years agoFix calculation of whether a member function needs a thunk in construction vtables.
Anders Carlsson [Wed, 10 Mar 2010 21:25:37 +0000 (21:25 +0000)]
Fix calculation of whether a member function needs a thunk in construction vtables.

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

14 years agoChange the 'super' messaging API in the rewriter.
Fariborz Jahanian [Wed, 10 Mar 2010 21:17:41 +0000 (21:17 +0000)]
Change the 'super' messaging API in the rewriter.
Fixes radar 7738452.

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

14 years agoSuppress the tag when printing an ElaboratedType if the language options
John McCall [Wed, 10 Mar 2010 21:05:46 +0000 (21:05 +0000)]
Suppress the tag when printing an ElaboratedType if the language options
claim this is C.  We don't make ElaboratedTypes in C, but sometimes
the language options during pretty-print lie to us.

The rewriter should really be fixed to not rely on how types are pretty-printed,
though.

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

14 years agoWe were mistakenly marking morally virtual bases as being uninteresting. Fix this.
Anders Carlsson [Wed, 10 Mar 2010 19:39:11 +0000 (19:39 +0000)]
We were mistakenly marking morally virtual bases as being uninteresting. Fix this.

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

14 years agoIgnore non-interesting bases when emitting construction vtables.
Anders Carlsson [Wed, 10 Mar 2010 19:15:26 +0000 (19:15 +0000)]
Ignore non-interesting bases when emitting construction vtables.

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

14 years agoSimplify assertion.
Ted Kremenek [Wed, 10 Mar 2010 19:09:37 +0000 (19:09 +0000)]
Simplify assertion.

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

14 years agoRemove '#if 0' code. Lazy compound values have proven their worth.
Ted Kremenek [Wed, 10 Mar 2010 19:09:34 +0000 (19:09 +0000)]
Remove '#if 0' code.  Lazy compound values have proven their worth.

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

14 years agoFix -Wsign-compare warnings reported by clang++.
Ted Kremenek [Wed, 10 Mar 2010 19:09:31 +0000 (19:09 +0000)]
Fix -Wsign-compare warnings reported by clang++.

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

14 years agoFix -Wsign-compare warning reported by clang++.
Ted Kremenek [Wed, 10 Mar 2010 18:22:38 +0000 (18:22 +0000)]
Fix -Wsign-compare warning reported by clang++.

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

14 years agoRemove the subregion map cache. It is no longer used.
Ted Kremenek [Wed, 10 Mar 2010 16:38:44 +0000 (16:38 +0000)]
Remove the subregion map cache.  It is no longer used.

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

14 years agoFix stale comment.
Ted Kremenek [Wed, 10 Mar 2010 16:38:41 +0000 (16:38 +0000)]
Fix stale comment.

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

14 years agoReally apply (unnoticed weird git-svn merge conflict in 98144): Refactor RegionStore...
Ted Kremenek [Wed, 10 Mar 2010 16:32:56 +0000 (16:32 +0000)]
Really apply (unnoticed weird git-svn merge conflict in 98144): Refactor RegionStore::RemoveDeadBindings to use the same core cluster analysis algorithm as RegionStore::InvalidateRegions().

Beyond simplifying the algorithm significantly, we no longer
need to build subregion maps in RemoveDeadBindings().  This
and other changes cause a significant speedup: the time to
analyze sqlite3.c (single core) drops by 14%.

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

14 years agoMove test and also test codegen.
Rafael Espindola [Wed, 10 Mar 2010 14:01:14 +0000 (14:01 +0000)]
Move test and also test codegen.

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

14 years agoWhen pretty-printing tag types, only print the tag if we're in C (and
John McCall [Wed, 10 Mar 2010 11:27:22 +0000 (11:27 +0000)]
When pretty-printing tag types, only print the tag if we're in C (and
therefore not creating ElaboratedTypes, which are still pretty-printed
with the written tag).

Most of these testcase changes were done by script, so don't feel too
sorry for my fingers.

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

14 years agoRefactor RegionStore::RemoveDeadBindings to use the same core
Ted Kremenek [Wed, 10 Mar 2010 07:20:03 +0000 (07:20 +0000)]
Refactor RegionStore::RemoveDeadBindings to use the same core
cluster analysis algorithm as RegionStore::InvalidateRegions().

Beyond simplifying the algorithm significantly, we no longer
need to build subregion maps in RemoveDeadBindings().  This
and other changes cause a significant speedup: the time to
analyze sqlite3.c (single core) drops by 14%.

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

14 years agoRefactor some of RegionStore's InvalidateRegionsWorker class
Ted Kremenek [Wed, 10 Mar 2010 07:19:59 +0000 (07:19 +0000)]
Refactor some of RegionStore's InvalidateRegionsWorker class
into a 'ClusterAnalysis' parent class.  The idea is
to potentially reuse this for reworking RemoveDeadBindings.

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

14 years agoAdd newline.
Anders Carlsson [Wed, 10 Mar 2010 06:51:56 +0000 (06:51 +0000)]
Add newline.

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

14 years agoDon't accidentally mark some functions in construction vtables as unused. Also land...
Anders Carlsson [Wed, 10 Mar 2010 06:51:42 +0000 (06:51 +0000)]
Don't accidentally mark some functions in construction vtables as unused. Also land the test for a previous checkin, now that it's correct.

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

14 years agoAllow the fast path through ASTContext::getTypeDeclType to be inlined.
John McCall [Wed, 10 Mar 2010 06:48:02 +0000 (06:48 +0000)]
Allow the fast path through ASTContext::getTypeDeclType to be inlined.

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

14 years agoAdd use-after-free check to MallocChecker.
Zhongxing Xu [Wed, 10 Mar 2010 04:58:55 +0000 (04:58 +0000)]
Add use-after-free check to MallocChecker.

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

14 years agoStatement expressions can be used in global- or namespace-scoped blocks
Douglas Gregor [Wed, 10 Mar 2010 04:54:39 +0000 (04:54 +0000)]
Statement expressions can be used in global- or namespace-scoped blocks

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

14 years agoCreate a new InjectedClassNameType to represent bare-word references to the
John McCall [Wed, 10 Mar 2010 03:28:59 +0000 (03:28 +0000)]
Create a new InjectedClassNameType to represent bare-word references to the
injected class name of a class template or class template partial specialization.
This is a non-canonical type;  the canonical type is still a template
specialization type.  This becomes the TypeForDecl of the pattern declaration,
which cleans up some amount of code (and complicates some other parts, but
whatever).

Fixes PR6326 and probably a few others, primarily by re-establishing a few
invariants about TypeLoc sizes.

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

14 years agoWhen building construction vtables, we need to check if a primary virtual base is...
Anders Carlsson [Wed, 10 Mar 2010 03:02:01 +0000 (03:02 +0000)]
When building construction vtables, we need to check if a primary virtual base is actually a primary virtual base in the layout class.

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

14 years agoadd missing test
Rafael Espindola [Wed, 10 Mar 2010 02:43:01 +0000 (02:43 +0000)]
add missing test

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

14 years agoImprove vcall offset handling in construction vtables. With this we layout the constr...
Anders Carlsson [Wed, 10 Mar 2010 02:33:41 +0000 (02:33 +0000)]
Improve vcall offset handling in construction vtables. With this we layout the construction vtables from the ABI examples correctly.

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

14 years agoDelay codegen of vtables when handling implicit instantiations.
Rafael Espindola [Wed, 10 Mar 2010 02:19:29 +0000 (02:19 +0000)]
Delay codegen of vtables when handling implicit instantiations.

This fixes PR6474.

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

14 years agoAdd insert/extract_ps and related random macros.
Eric Christopher [Wed, 10 Mar 2010 00:50:58 +0000 (00:50 +0000)]
Add insert/extract_ps and related random macros.

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

14 years agoUse SmallString instead of alloca.
Devang Patel [Wed, 10 Mar 2010 00:19:43 +0000 (00:19 +0000)]
Use SmallString instead of alloca.

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

14 years agoWhen computing in AnalysisContext the variables referenced
Ted Kremenek [Wed, 10 Mar 2010 00:18:11 +0000 (00:18 +0000)]
When computing in AnalysisContext the variables referenced
by a block, also look at the contained blocks.

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

14 years agoEnhance basic store to also lazily symbolicate VarRegions
Ted Kremenek [Wed, 10 Mar 2010 00:18:08 +0000 (00:18 +0000)]
Enhance basic store to also lazily symbolicate VarRegions
with an 'unknown' memory space.

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

14 years agoFix file reference for derived and composite types. Now, dwarf writer uses strict...
Devang Patel [Tue, 9 Mar 2010 22:49:11 +0000 (22:49 +0000)]
Fix file reference for derived and composite types. Now, dwarf writer uses strict verifier that ignores debug info for such types if their file info is unknown.

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

14 years agoValue-initialize the written-builtin-specifiers field of DeclSpec, which
John McCall [Tue, 9 Mar 2010 22:39:49 +0000 (22:39 +0000)]
Value-initialize the written-builtin-specifiers field of DeclSpec, which
wasn't being initialized properly along the implicit-definition path.
Found by the valgrind buildbot.

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

14 years agoFix the test some more.
Fariborz Jahanian [Tue, 9 Mar 2010 22:17:52 +0000 (22:17 +0000)]
Fix the test some more.

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

14 years agoSee if this test makes it though buildbot.
Fariborz Jahanian [Tue, 9 Mar 2010 21:50:08 +0000 (21:50 +0000)]
See if this test makes it though buildbot.

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

14 years agoMore then one anonymous aggregates on one line creates chaos when MDNode uniquness...
Devang Patel [Tue, 9 Mar 2010 21:32:27 +0000 (21:32 +0000)]
More then one anonymous aggregates on one line creates chaos when MDNode uniquness is combined with RAUW operation. Right solution is to avoid using RAUW.

This fixes PR 6554.

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

14 years agoReverse the code gen. enabled part of test until I can figure out
Fariborz Jahanian [Tue, 9 Mar 2010 21:26:24 +0000 (21:26 +0000)]
Reverse the code gen. enabled part of test until I can figure out
how to check the code pattern no matter how clang is built.

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

14 years agoImprove Objective-C token-annotation test
Douglas Gregor [Tue, 9 Mar 2010 20:57:01 +0000 (20:57 +0000)]
Improve Objective-C token-annotation test

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

14 years agoCode gen test for a previous patch for
Fariborz Jahanian [Tue, 9 Mar 2010 19:15:10 +0000 (19:15 +0000)]
Code gen test for a previous patch for
radar 7709015

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

14 years agoUse getLast() instead of getBasename().
Devang Patel [Tue, 9 Mar 2010 19:14:07 +0000 (19:14 +0000)]
Use getLast() instead of getBasename().

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

14 years agoDon't error when a block pointer is passed to a
Fariborz Jahanian [Tue, 9 Mar 2010 18:34:52 +0000 (18:34 +0000)]
Don't error when a block pointer is passed to a
vararg functions/methods. Fixes radar 7725203.

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

14 years agoAdd an Objective-C test for token annotation
Douglas Gregor [Tue, 9 Mar 2010 13:06:04 +0000 (13:06 +0000)]
Add an Objective-C test for token annotation

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

14 years agoReplace copy loops with memcpy.
Benjamin Kramer [Tue, 9 Mar 2010 12:53:38 +0000 (12:53 +0000)]
Replace copy loops with memcpy.

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

14 years agoStart using DIFile. Corresponding llvm patch is r98020.
Devang Patel [Tue, 9 Mar 2010 00:44:50 +0000 (00:44 +0000)]
Start using DIFile. Corresponding llvm patch is r98020.

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

14 years agoAdd test cases for r98003 and r98006.
Ted Kremenek [Mon, 8 Mar 2010 23:38:27 +0000 (23:38 +0000)]
Add test cases for r98003 and r98006.

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

14 years agoAdd preprocessor guards to the definitions of size_t and wchar_t, and #undef NULL...
Ted Kremenek [Mon, 8 Mar 2010 23:23:45 +0000 (23:23 +0000)]
Add preprocessor guards to the definitions of size_t and wchar_t, and #undef NULL before defining it.
This addresses potential issues with system headers reported in <rdar://problem/7727159>.

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

14 years agoPlace the definition of 'va_list' within a preprocessor guard. This matches the...
Ted Kremenek [Mon, 8 Mar 2010 23:13:05 +0000 (23:13 +0000)]
Place the definition of 'va_list' within a preprocessor guard.  This matches the behavior of GCC, and avoids potential conflicts with system headers (e.g., stdio.h).  Fixes <rdar://problem/7727145>.

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

14 years agoImplement clang_isUnexposed(), a predicate function to simplify filtering out
Ted Kremenek [Mon, 8 Mar 2010 21:17:29 +0000 (21:17 +0000)]
Implement clang_isUnexposed(), a predicate function to simplify filtering out
unexposed AST elements.

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

14 years agoadd a codegen hack to work around an AST bug, allowing us to compile the
Chris Lattner [Mon, 8 Mar 2010 21:08:07 +0000 (21:08 +0000)]
add a codegen hack to work around an AST bug, allowing us to compile the
code in PR6537.  This should be reverted when the ast bug is fixed.

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

14 years agoAllocate ASTRecordLayout objects using the allocator associated with ASTContext.
Ted Kremenek [Mon, 8 Mar 2010 20:56:29 +0000 (20:56 +0000)]
Allocate ASTRecordLayout objects using the allocator associated with ASTContext.
This allows them to be allocated using a BumpPtrAllocated
in the common case.

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

14 years agoAvoid using DIDescriptor.isNull().
Devang Patel [Mon, 8 Mar 2010 20:53:17 +0000 (20:53 +0000)]
Avoid using DIDescriptor.isNull().

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

14 years agoRevert r97727 at ddunbar's request; we want to solve this some other way.
John McCall [Mon, 8 Mar 2010 20:01:09 +0000 (20:01 +0000)]
Revert r97727 at ddunbar's request;  we want to solve this some other way.

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

14 years agoRename -Wbad-literal to -Wliteral-range.
John McCall [Mon, 8 Mar 2010 19:34:43 +0000 (19:34 +0000)]
Rename -Wbad-literal to -Wliteral-range.

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

14 years agoRevert r97949.
Devang Patel [Mon, 8 Mar 2010 19:20:58 +0000 (19:20 +0000)]
Revert r97949.

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

14 years agoDon't enable static analysis support for C++ by default. Users are
Ted Kremenek [Mon, 8 Mar 2010 19:06:44 +0000 (19:06 +0000)]
Don't enable static analysis support for C++ by default.  Users are
accidentally using it without realizing that it is nowhere close
to being generally usable and are reporting crashes that we
already know about.

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

14 years agoImprove XML output for C++ classes, from Olaf Krzikalla!
Douglas Gregor [Mon, 8 Mar 2010 18:51:03 +0000 (18:51 +0000)]
Improve XML output for C++ classes, from Olaf Krzikalla!

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

14 years agoMark variable as const
Kovarththanan Rajaratnam [Mon, 8 Mar 2010 18:33:04 +0000 (18:33 +0000)]
Mark variable as const

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

14 years agoAvoid DIDescriptor.isNull() checks.
Devang Patel [Mon, 8 Mar 2010 18:26:57 +0000 (18:26 +0000)]
Avoid DIDescriptor.isNull() checks.

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

14 years agoExtend ObjCMessageExpr for class method sends with the source location
Douglas Gregor [Mon, 8 Mar 2010 16:40:19 +0000 (16:40 +0000)]
Extend ObjCMessageExpr for class method sends with the source location
of the class name.

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

14 years agoKeep track of type source information in the return type of an
Douglas Gregor [Mon, 8 Mar 2010 14:59:44 +0000 (14:59 +0000)]
Keep track of type source information in the return type of an
Objective-C method declaration, e.g., for

  - (Foo *)myMethod;

we now have TypeSourceInfo for the Foo*.

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

14 years agoRemove unused headers.
Duncan Sands [Mon, 8 Mar 2010 11:29:03 +0000 (11:29 +0000)]
Remove unused headers.

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

14 years agoRemove redundant semicolon
Douglas Gregor [Mon, 8 Mar 2010 02:49:35 +0000 (02:49 +0000)]
Remove redundant semicolon

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

14 years agoMake a note for the C++0x future, when we'll have to revisit the jump-diagnostics...
Douglas Gregor [Mon, 8 Mar 2010 02:49:08 +0000 (02:49 +0000)]
Make a note for the C++0x future, when we'll have to revisit the jump-diagnostics handling for variables without initializers

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

14 years agoIn C++98/03, an uninitialized variable that has POD class type will be
Douglas Gregor [Mon, 8 Mar 2010 02:45:10 +0000 (02:45 +0000)]
In C++98/03, an uninitialized variable that has POD class type will be
uninitialized. This seems not to be the case in C++0x, where we still
call the (trivial) default constructor for a POD class
(!). Previously, we had implemented only the C++0x rules; now we
implement both. Fixes PR6536.

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

14 years agoDowngrade errors when trying to catch a pointer or reference to
Douglas Gregor [Mon, 8 Mar 2010 01:47:36 +0000 (01:47 +0000)]
Downgrade errors when trying to catch a pointer or reference to
incomplete type to warnings; GCC (and EDG in GCC compatibility mode)
permit such handles. Fixes PR6527.

(For real this time)

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

14 years agoRevert r97925, it only contained the test updates not the actual fix.
Chandler Carruth [Mon, 8 Mar 2010 00:41:19 +0000 (00:41 +0000)]
Revert r97925, it only contained the test updates not the actual fix.

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

14 years agoDowngrade errors when trying to catch a pointer or reference to
Douglas Gregor [Sun, 7 Mar 2010 23:28:27 +0000 (23:28 +0000)]
Downgrade errors when trying to catch a pointer or reference to
incomplete type to warnings; GCC (and EDG in GCC compatibility mode)
permit such handles. Fixes PR6527.

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

14 years agoRobustify callers that rebuild typename type nodes again NULL return
Douglas Gregor [Sun, 7 Mar 2010 23:26:22 +0000 (23:26 +0000)]
Robustify callers that rebuild typename type nodes again NULL return
types. Fixes PR6463.

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

14 years agoPerform overload resolution when static_cast'ing from a
Douglas Gregor [Sun, 7 Mar 2010 23:24:59 +0000 (23:24 +0000)]
Perform overload resolution when static_cast'ing from a
pointer-to-member-to-derived to a pointer-to-member-to-base. Fixes
PR6072.

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

14 years agoReference binding via user-defined conversion can compute a binding
Douglas Gregor [Sun, 7 Mar 2010 23:17:44 +0000 (23:17 +0000)]
Reference binding via user-defined conversion can compute a binding
that is not reference-related (because it requires another implicit
conversion to which we can find). Fixes PR6483.

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

14 years agoUndefine correct macro
Kovarththanan Rajaratnam [Sun, 7 Mar 2010 19:10:13 +0000 (19:10 +0000)]
Undefine correct macro

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

14 years agoimplement support for -Wno-deprecated, PR6534. While
Chris Lattner [Sun, 7 Mar 2010 18:50:21 +0000 (18:50 +0000)]
implement support for -Wno-deprecated, PR6534.  While
I'm in there, change the altivec diagnostics to use 'double'
instead of "double" for consistency.

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

14 years agoDon't rely on implicit conversion
Kovarththanan Rajaratnam [Sun, 7 Mar 2010 11:21:46 +0000 (11:21 +0000)]
Don't rely on implicit conversion

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

14 years agoRename to addPPCallbacks since we're effectively adding a callback and maybe chaining...
Kovarththanan Rajaratnam [Sun, 7 Mar 2010 07:30:06 +0000 (07:30 +0000)]
Rename to addPPCallbacks since we're effectively adding a callback and maybe chaining it to an existing one

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

14 years agoDon't assert if PP already contains a valid PP callback. The PP can handle multiple...
Kovarththanan Rajaratnam [Sun, 7 Mar 2010 07:18:58 +0000 (07:18 +0000)]
Don't assert if PP already contains a valid PP callback. The PP can handle multiple callbacks (using PPChainedCallbacks)

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

14 years agoAdd sse4.1 packed min and max intrinsics.
Eric Christopher [Sun, 7 Mar 2010 07:00:42 +0000 (07:00 +0000)]
Add sse4.1 packed min and max intrinsics.

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

14 years agoAdd load hint instruction intrinsic.
Eric Christopher [Sun, 7 Mar 2010 06:29:09 +0000 (06:29 +0000)]
Add load hint instruction intrinsic.

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