]> granicus.if.org Git - clang/log
clang
14 years agoAdd a CK_DerivedToBaseMemberPointer cast kind and use it in Sema (Still no codegen).
Anders Carlsson [Fri, 30 Oct 2009 00:46:35 +0000 (00:46 +0000)]
Add a CK_DerivedToBaseMemberPointer cast kind and use it in Sema (Still no codegen).

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

14 years agoInclude pointee type information in the diagnostic for creating bad pointers or
John McCall [Fri, 30 Oct 2009 00:37:20 +0000 (00:37 +0000)]
Include pointee type information in the diagnostic for creating bad pointers or
arrays.

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

14 years agoReport accurate source-location information when rebuilding types during
John McCall [Fri, 30 Oct 2009 00:06:24 +0000 (00:06 +0000)]
Report accurate source-location information when rebuilding types during
template instantiation.

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

14 years agoFix one more bug with __builtin_object_size.
Mike Stump [Thu, 29 Oct 2009 23:34:20 +0000 (23:34 +0000)]
Fix one more bug with __builtin_object_size.

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

14 years agoAdd yet more testcases.
Mike Stump [Thu, 29 Oct 2009 23:29:54 +0000 (23:29 +0000)]
Add yet more testcases.

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

14 years agoAdd some more testcases.
Mike Stump [Thu, 29 Oct 2009 23:22:14 +0000 (23:22 +0000)]
Add some more testcases.

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

14 years agoSilence a gcc warning where it notices that default-constructing a class
John McCall [Thu, 29 Oct 2009 23:20:43 +0000 (23:20 +0000)]
Silence a gcc warning where it notices that default-constructing a class
doesn't initialize anything.

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

14 years agoWe may need to instantiate a class template specialization as part of a derived-to...
Douglas Gregor [Thu, 29 Oct 2009 23:08:22 +0000 (23:08 +0000)]
We may need to instantiate a class template specialization as part of a derived-to-base pointer case

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

14 years agoSlightly improve source-location information during template instantiation
Douglas Gregor [Thu, 29 Oct 2009 22:21:39 +0000 (22:21 +0000)]
Slightly improve source-location information during template instantiation

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

14 years ago- Add/tweak some comments.
Steve Naroff [Thu, 29 Oct 2009 21:11:04 +0000 (21:11 +0000)]
- Add/tweak some comments.
- change ObjCCategoryImplDecl::getCategoryClass() to getCategoryDecl().

No functionality change.

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

14 years agoMove some clang-cc errors to use diagnostics, and simplify.
Daniel Dunbar [Thu, 29 Oct 2009 21:05:18 +0000 (21:05 +0000)]
Move some clang-cc errors to use diagnostics, and simplify.

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

14 years agoFix some issues Daniel pointed out.
Mike Stump [Thu, 29 Oct 2009 20:48:09 +0000 (20:48 +0000)]
Fix some issues Daniel pointed out.

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

14 years agoProperly instantiate usage of overloaded operator []. Fixes PR5345.
Sebastian Redl [Thu, 29 Oct 2009 20:17:01 +0000 (20:17 +0000)]
Properly instantiate usage of overloaded operator []. Fixes PR5345.

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

14 years agoclang_getDeclSpelling(): For category implementations, make sure we hand back the...
Steve Naroff [Thu, 29 Oct 2009 18:55:50 +0000 (18:55 +0000)]
clang_getDeclSpelling(): For category implementations, make sure we hand back the category name (not the class name). This fixes <rdar://problem/7297518>.

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

14 years agoA few TemplateArgumentLoc clean-ups. Try to remember the Expr for a declaration.
John McCall [Thu, 29 Oct 2009 18:45:58 +0000 (18:45 +0000)]
A few TemplateArgumentLoc clean-ups.  Try to remember the Expr for a declaration.
Provide an API for getting the SourceRange of a TAL and use it judiciously.

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

14 years agoYet more instantiation-location information. Fixes PR5336.
Douglas Gregor [Thu, 29 Oct 2009 17:56:10 +0000 (17:56 +0000)]
Yet more instantiation-location information. Fixes PR5336.

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

14 years agoPatch for destruction of array of objects on block exit.
Fariborz Jahanian [Thu, 29 Oct 2009 16:22:54 +0000 (16:22 +0000)]
Patch for destruction of array of objects on block exit.

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

14 years agoUpdate checker build.
Ted Kremenek [Thu, 29 Oct 2009 16:18:45 +0000 (16:18 +0000)]
Update checker build.

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

14 years agoMake sure to call CompleteConstructorCall for bases and members that are initialized...
Anders Carlsson [Thu, 29 Oct 2009 15:46:07 +0000 (15:46 +0000)]
Make sure to call CompleteConstructorCall for bases and members that are initialized implicitly in constructors so that default arguments etc are set correctly. Fixes PR5283.

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

14 years agoFix Release-Asserts build breakage
Douglas Gregor [Thu, 29 Oct 2009 15:25:40 +0000 (15:25 +0000)]
Fix Release-Asserts build breakage

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

14 years agomake clang emit undefs for padding of structs and unions instead of zeros. this enabl...
Nuno Lopes [Thu, 29 Oct 2009 11:27:06 +0000 (11:27 +0000)]
make clang emit undefs for padding of structs and unions instead of zeros. this enables constant compaction optimizations.

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

14 years agoApparently when is now.
John McCall [Thu, 29 Oct 2009 08:17:34 +0000 (08:17 +0000)]
Apparently when is now.

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

14 years agoTrack source information for template arguments and template specialization
John McCall [Thu, 29 Oct 2009 08:12:44 +0000 (08:12 +0000)]
Track source information for template arguments and template specialization
types.  Preserve it through template instantiation.  Preserve it through PCH,
although TSTs themselves aren't serializable, so that's pretty much meaningless.

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

14 years agoExtract TemplateArgument into a new header just for common template
John McCall [Thu, 29 Oct 2009 07:48:15 +0000 (07:48 +0000)]
Extract TemplateArgument into a new header just for common template
classes.  Move its implementation into a new module.

This will seem marginally more justified in a bit.

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

14 years agoAdd an assertion to ensure NullDerefChecker exists.
Zhongxing Xu [Thu, 29 Oct 2009 05:56:54 +0000 (05:56 +0000)]
Add an assertion to ensure NullDerefChecker exists.

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

14 years agoFix accidental use of CheckSVal instead of CheckLocation, and add a
Ted Kremenek [Thu, 29 Oct 2009 05:33:39 +0000 (05:33 +0000)]
Fix accidental use of CheckSVal instead of CheckLocation, and add a
small test case to show we handle dereferences of undefined values.

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

14 years agoStringSwitch-ify attribute name mapping.
Douglas Gregor [Thu, 29 Oct 2009 05:26:58 +0000 (05:26 +0000)]
StringSwitch-ify attribute name mapping.

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

14 years agomake this interpretable.
Chris Lattner [Thu, 29 Oct 2009 05:25:27 +0000 (05:25 +0000)]
make this interpretable.

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

14 years agoFix an insidious bug in RegionStore::RemoveDeadBindings() pointed out
Ted Kremenek [Thu, 29 Oct 2009 05:14:17 +0000 (05:14 +0000)]
Fix an insidious bug in RegionStore::RemoveDeadBindings() pointed out
by Zhongxing Xu.  RemoveDeadBindings() would falsely prune
SymbolicRegions from the store that wrapped derived symbols whose
liveness could only be determined after scanning the store.

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

14 years agoadd two new and very exhaustive preprocessor tests, patch by
Chris Lattner [Thu, 29 Oct 2009 04:55:36 +0000 (04:55 +0000)]
add two new and very exhaustive preprocessor tests, patch by
Ken Dyck!

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

14 years agosimplify intmax setup, patch by Ken Dyck!
Chris Lattner [Thu, 29 Oct 2009 04:54:24 +0000 (04:54 +0000)]
simplify intmax setup, patch by Ken Dyck!

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

14 years agoRemove some obsolete or unnecessary FIXMEs.
Daniel Dunbar [Thu, 29 Oct 2009 02:39:57 +0000 (02:39 +0000)]
Remove some obsolete or unnecessary FIXMEs.

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

14 years agoPR5328: Allow duplicatic -pedantic (and -pedantic-errors) options.
Daniel Dunbar [Thu, 29 Oct 2009 02:24:45 +0000 (02:24 +0000)]
PR5328: Allow duplicatic -pedantic (and -pedantic-errors) options.
 - clang-cc doesn't care about their relative order with other -W options.

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

14 years agoKill off MakeFormattedString helper function.
Daniel Dunbar [Thu, 29 Oct 2009 02:24:37 +0000 (02:24 +0000)]
Kill off MakeFormattedString helper function.

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

14 years agoMove NullDeref and UndefDeref into their own checker.
Zhongxing Xu [Thu, 29 Oct 2009 02:09:30 +0000 (02:09 +0000)]
Move NullDeref and UndefDeref into their own checker.
Add a CheckLocation() interface to Checker.
Now ImplicitNullDeref nodes are cached in NullDerefChecker.
More cleanups follow.

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

14 years agoReject -I- in driver instead of clang-cc.
Daniel Dunbar [Thu, 29 Oct 2009 01:53:44 +0000 (01:53 +0000)]
Reject -I- in driver instead of clang-cc.

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

14 years agoFormatting fixes.
Daniel Dunbar [Thu, 29 Oct 2009 01:53:18 +0000 (01:53 +0000)]
Formatting fixes.

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

14 years agomake this more interesting, test the static const array.
Chris Lattner [Thu, 29 Oct 2009 01:20:34 +0000 (01:20 +0000)]
make this more interesting, test the static const array.

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

14 years agoAdd test case for <rdar://problem/7342806>.
Ted Kremenek [Thu, 29 Oct 2009 00:49:46 +0000 (00:49 +0000)]
Add test case for <rdar://problem/7342806>.

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

14 years ago[llvm up]
Douglas Gregor [Thu, 29 Oct 2009 00:41:01 +0000 (00:41 +0000)]
[llvm up]

Switch a few ugly switch-on-string-literal constructs to use the new
llvm::StringSwitch.

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

14 years agooptimize out some ifdefs.
Chris Lattner [Thu, 29 Oct 2009 00:22:00 +0000 (00:22 +0000)]
optimize out some ifdefs.

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

14 years agoFix some Window-isms to get these tests to pass on Windows.
John Thompson [Thu, 29 Oct 2009 00:10:42 +0000 (00:10 +0000)]
Fix some Window-isms to get these tests to pass on Windows.

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

14 years agoImplement support for semantic checking and template instantiation of
Douglas Gregor [Thu, 29 Oct 2009 00:04:11 +0000 (00:04 +0000)]
Implement support for semantic checking and template instantiation of
class template partial specializations of member templates. Also,
fixes a silly little bug in the marking of "used" template parameters
in member templates. Fixes PR5236.

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

14 years agoImplement clang support for indirect branch and address of label
Chris Lattner [Wed, 28 Oct 2009 23:59:40 +0000 (23:59 +0000)]
Implement clang support for indirect branch and address of label
using the new LLVM support for this.  This is temporarily hiding
behind horrible and ugly #ifdefs until the time when the optimizer
is stable (hopefully a week or so).  Until then, lets make it "opt in" :)

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

14 years agoUnused ivars checker: also check methods in categories that are defined in the same...
Ted Kremenek [Wed, 28 Oct 2009 22:18:22 +0000 (22:18 +0000)]
Unused ivars checker: also check methods in categories that are defined in the same translation unit.  Fixes <rdar://problem/6260004>.

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

14 years agoFix <rdar://problem/7330784>. Avoid crashing on 'Class<p>' when generating meta-data...
Steve Naroff [Wed, 28 Oct 2009 22:03:49 +0000 (22:03 +0000)]
Fix <rdar://problem/7330784>. Avoid crashing on 'Class<p>' when generating meta-data for a class.

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

14 years agoRefine __builtin_object_size. Don't try and get a size for things
Mike Stump [Wed, 28 Oct 2009 21:22:24 +0000 (21:22 +0000)]
Refine __builtin_object_size.  Don't try and get a size for things
that don't have sizes.

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

14 years agoMinor cleanup.
Fariborz Jahanian [Wed, 28 Oct 2009 21:07:28 +0000 (21:07 +0000)]
Minor cleanup.

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

14 years agoCode gen for array construction - WIP
Fariborz Jahanian [Wed, 28 Oct 2009 20:55:41 +0000 (20:55 +0000)]
Code gen for array construction - WIP

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

14 years agoRemove _clang_initCXLookupHint() and _clang_getCursorWithHint(). Related to <rdar...
Steve Naroff [Wed, 28 Oct 2009 20:44:47 +0000 (20:44 +0000)]
Remove _clang_initCXLookupHint() and _clang_getCursorWithHint(). Related to <rdar://problem/7310688>.

Localize the optimization to ResolveLocationInAST(). The last valid AST location is now stored with ASTUnit. There still isn't optimal, however it's an improvement (with a much cleaner API). Having the client manage an "hint" is error prone and complex.

I wanted to land the major changes before finishing up the optimizations.

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

14 years agoRefactor a bit.
Mike Stump [Wed, 28 Oct 2009 20:44:03 +0000 (20:44 +0000)]
Refactor a bit.

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

14 years agoPull ivar scanning logic into another utility function. This refactoring will enable...
Ted Kremenek [Wed, 28 Oct 2009 20:37:47 +0000 (20:37 +0000)]
Pull ivar scanning logic into another utility function. This refactoring will enable scanning
categories as well (WIP). No functionality change yet.

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

14 years agofactor a creation of Int32Ty.
Chris Lattner [Wed, 28 Oct 2009 20:36:47 +0000 (20:36 +0000)]
factor a creation of Int32Ty.

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

14 years agoUse array's base element type in getting to its
Fariborz Jahanian [Wed, 28 Oct 2009 19:04:36 +0000 (19:04 +0000)]
Use array's base element type in getting to its
constructor. WIP.

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

14 years agoRemoved an unnecessary arguement passed to InitializeVarWithConstructor
Fariborz Jahanian [Wed, 28 Oct 2009 18:41:06 +0000 (18:41 +0000)]
Removed an unnecessary arguement passed to InitializeVarWithConstructor
which should come from the variable and wasn't correct for arrays in any case.
No change in functionality.

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

14 years agoRestored note on pointer to members with a pointer
Fariborz Jahanian [Wed, 28 Oct 2009 18:06:53 +0000 (18:06 +0000)]
Restored note on pointer to members with a pointer
to issue involved.

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

14 years agorandom tidying
Chris Lattner [Wed, 28 Oct 2009 17:39:19 +0000 (17:39 +0000)]
random tidying

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

14 years agoRemoved a Note related to pointer to member functions which
Fariborz Jahanian [Wed, 28 Oct 2009 17:25:01 +0000 (17:25 +0000)]
Removed a Note related to pointer to member functions which
does not seem to exist any longer.

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

14 years agoDiagnose use of data pointer member in a function call
Fariborz Jahanian [Wed, 28 Oct 2009 16:49:46 +0000 (16:49 +0000)]
Diagnose use of data pointer member in a function call
expression instead of crashing.

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

14 years agoMangle based on the declaration we're given, not the canonical
Douglas Gregor [Wed, 28 Oct 2009 16:31:34 +0000 (16:31 +0000)]
Mangle based on the declaration we're given, not the canonical
declaration, since attributes that affect mangling may have been added
to subsequent declarations. However, to determine the linkage of the
declaration, we need to look at the canonical declaration. Fixes PR4412.

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

14 years agoFix for PR4887, Credit to Jonathan Gray.
Edward O'Callaghan [Wed, 28 Oct 2009 15:13:08 +0000 (15:13 +0000)]
Fix for PR4887, Credit to Jonathan Gray.

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

14 years agomake CallGraph more flexible by letting it accept ASTContext instead of ASTUnit.
Zhongxing Xu [Wed, 28 Oct 2009 12:23:03 +0000 (12:23 +0000)]
make CallGraph more flexible by letting it accept ASTContext instead of ASTUnit.
Patch by Simone Pellegrini.

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

14 years agoadjust for a pending LLVM change.
Chris Lattner [Wed, 28 Oct 2009 05:12:07 +0000 (05:12 +0000)]
adjust for a pending LLVM change.

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

14 years agoAdd mangling for VTTs.
Mike Stump [Wed, 28 Oct 2009 01:51:46 +0000 (01:51 +0000)]
Add mangling for VTTs.

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

14 years agoFinish off pure virtual function handling.
Mike Stump [Wed, 28 Oct 2009 00:35:46 +0000 (00:35 +0000)]
Finish off pure virtual function handling.

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

14 years agoSlightly improve source location information during template instantiation
Douglas Gregor [Wed, 28 Oct 2009 00:29:27 +0000 (00:29 +0000)]
Slightly improve source location information during template instantiation

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

14 years agoTest
Douglas Gregor [Tue, 27 Oct 2009 23:55:05 +0000 (23:55 +0000)]
Test
explicit-instantiation-declaration-after-explicit-instantiation-definition
errors. This wraps up explicit template instantiation for now.

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

14 years agoPrep work for putting ___cxa_pure_virtual in the vtables for pure functions.
Mike Stump [Tue, 27 Oct 2009 23:46:47 +0000 (23:46 +0000)]
Prep work for putting ___cxa_pure_virtual in the vtables for pure functions.

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

14 years agoRefactor code a little.
Mike Stump [Tue, 27 Oct 2009 23:36:26 +0000 (23:36 +0000)]
Refactor code a little.

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

14 years agoImplement proper linkage for explicit instantiation declarations of
Douglas Gregor [Tue, 27 Oct 2009 23:26:40 +0000 (23:26 +0000)]
Implement proper linkage for explicit instantiation declarations of
inlined functions. For example, given

  template<typename T>
  class string {
    unsigned Len;

  public:
    unsigned size() const { return Len; }
  };

  extern template class string<char>;

we now give the instantiation of string<char>::size
available_externally linkage (if it is ever instantiated!), as
permitted by the C++0x standard.

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

14 years agoType of a conditional expression with two distinct objective-c
Fariborz Jahanian [Tue, 27 Oct 2009 23:02:38 +0000 (23:02 +0000)]
Type of a conditional expression with two distinct objective-c
class pointer is the most derived common class of the two.
This is <rdar://problem/7334235>.

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

14 years ago__builtin_object_size refinements. Ensure we handle expressions with
Mike Stump [Tue, 27 Oct 2009 22:09:17 +0000 (22:09 +0000)]
__builtin_object_size refinements.  Ensure we handle expressions with
side-effects up front, as when we switch to the llvm intrinsic call
for __builtin_object_size later, it will have two evaluations.

We also finish off the intrinsic version of the code so we can just
turn it on once llvm has the intrinsic.

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

14 years agoCMake: Respect LLVM_LIBDIR_SUFFIX for clang-specific headers under
Oscar Fuentes [Tue, 27 Oct 2009 21:15:21 +0000 (21:15 +0000)]
CMake: Respect LLVM_LIBDIR_SUFFIX for clang-specific headers under
${libdir}/clang

Patch by Ingmar Vanhassel!

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

14 years agoIntroduce FunctionDecl::isInlined() to tell whether a function should
Douglas Gregor [Tue, 27 Oct 2009 21:11:48 +0000 (21:11 +0000)]
Introduce FunctionDecl::isInlined() to tell whether a function should
be inlined.

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

14 years agoRename FunctionDecl::isInline/setInline to
Douglas Gregor [Tue, 27 Oct 2009 21:01:01 +0000 (21:01 +0000)]
Rename FunctionDecl::isInline/setInline to
FunctionDecl::isInlineSpecified/setInlineSpecified.

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

14 years agoExplicit instantiation suppresses the instantiation of non-inline
Douglas Gregor [Tue, 27 Oct 2009 20:53:28 +0000 (20:53 +0000)]
Explicit instantiation suppresses the instantiation of non-inline
function template specializations and member functions of class
template specializations.

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

14 years agoRather than excluding quite some things, and still installing
Oscar Fuentes [Tue, 27 Oct 2009 19:59:34 +0000 (19:59 +0000)]
Rather than excluding quite some things, and still installing
CMakeLists.txt, Makefiles, ... it's better to whitelist what we really
want to install.

Patch by Ingmar Vanhassel!

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

14 years agoSet OptimizeForSize LLVM function attribute with -Os.
Daniel Dunbar [Tue, 27 Oct 2009 19:48:08 +0000 (19:48 +0000)]
Set OptimizeForSize LLVM function attribute with -Os.

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

14 years agoConvert test to FileCheck.
Daniel Dunbar [Tue, 27 Oct 2009 19:48:00 +0000 (19:48 +0000)]
Convert test to FileCheck.

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

14 years agoCMake: Append LLVM_LIBDIR_SUFFIX to library destination.
Oscar Fuentes [Tue, 27 Oct 2009 19:42:21 +0000 (19:42 +0000)]
CMake: Append LLVM_LIBDIR_SUFFIX to library destination.

Based on a patch by Ingmar Vanhassel.

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

14 years agoFix crash when synthesizing property setters when the property type and ivar
Daniel Dunbar [Tue, 27 Oct 2009 19:21:30 +0000 (19:21 +0000)]
Fix crash when synthesizing property setters when the property type and ivar
type have mismatched Objective-C types.
  - <rdar://problem/7336352> [irgen] crash in synthesized property construction

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

14 years agoAn explicit instantiation definition only instantiations those class
Douglas Gregor [Tue, 27 Oct 2009 18:42:08 +0000 (18:42 +0000)]
An explicit instantiation definition only instantiations those class
members that have a definition. Also, use
CheckSpecializationInstantiationRedecl as part of this instantiation
to make sure that we diagnose the various kinds of problems that can
occur with explicit instantiations.

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

14 years agoGenerate constructor for value-initialization cases, even if the
Fariborz Jahanian [Tue, 27 Oct 2009 16:51:19 +0000 (16:51 +0000)]
Generate constructor for value-initialization cases, even if the
implementation technique doesn't call the constructor at that point.
DR302. Fixes pr5296.

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

14 years agoTest for interaction between explicit instantiations and specializations
Douglas Gregor [Tue, 27 Oct 2009 15:36:37 +0000 (15:36 +0000)]
Test for interaction between explicit instantiations and specializations

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

14 years agoTest various aspects of explicit instantiation that were already implemented.
Douglas Gregor [Tue, 27 Oct 2009 15:00:12 +0000 (15:00 +0000)]
Test various aspects of explicit instantiation that were already implemented.

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

14 years agoDisabling some MS extensions which cause this test to fail
John Thompson [Tue, 27 Oct 2009 14:58:27 +0000 (14:58 +0000)]
Disabling some MS extensions which cause this test to fail

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

14 years agoSplit AddDefaultSystemIncludePaths into C, C++ and framework specific functions.
Rafael Espindola [Tue, 27 Oct 2009 14:47:31 +0000 (14:47 +0000)]
Split AddDefaultSystemIncludePaths into C, C++ and framework specific functions.

The user visible changes are:

*) Frameworks are only searched on OS X
*) The Cygwin c++ headers are now marked as c++ aware. I am almost
sure that not marking them was a bug.

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

14 years agoAdd support for 'CXFile' (<rdar://problem/7303360>).
Steve Naroff [Tue, 27 Oct 2009 14:35:18 +0000 (14:35 +0000)]
Add support for 'CXFile' (<rdar://problem/7303360>).

- 4 new functions (clang_getCursorSourceFile, clang_getDeclSourceFile, clang_getFileName, clang_getFileTime).

- Should remove clang_getDeclSource() and clang_getCursorSource(). For now, just put 'deprecate' comment in header.

- Also changed CXX style comment to C style (to eliminate warning).

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

14 years agoAdd a PrettyStackTraceDecl in CodeGenModule::EmitGlobalDefinition.
Anders Carlsson [Tue, 27 Oct 2009 14:32:27 +0000 (14:32 +0000)]
Add a PrettyStackTraceDecl in CodeGenModule::EmitGlobalDefinition.

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

14 years agoDisabling some MS extensions which cause these tests to fail
John Thompson [Tue, 27 Oct 2009 14:31:53 +0000 (14:31 +0000)]
Disabling some MS extensions which cause these tests to fail

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

14 years agoChanges for building as a Windows DLL
John Thompson [Tue, 27 Oct 2009 13:42:56 +0000 (13:42 +0000)]
Changes for building as a Windows DLL

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

14 years agoMake test independent of darwin system headers.
Benjamin Kramer [Tue, 27 Oct 2009 12:19:13 +0000 (12:19 +0000)]
Make test independent of darwin system headers.

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

14 years agoImplement Chris's suggestions for the precendence warnings. Reformat the code a bit...
Sebastian Redl [Tue, 27 Oct 2009 12:10:02 +0000 (12:10 +0000)]
Implement Chris's suggestions for the precendence warnings. Reformat the code a bit. Test the fixits.

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

14 years agofix tests
Nuno Lopes [Tue, 27 Oct 2009 10:09:29 +0000 (10:09 +0000)]
fix tests

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

14 years agoOnly set the point of instantiation for an implicit or explicit
Douglas Gregor [Tue, 27 Oct 2009 06:26:26 +0000 (06:26 +0000)]
Only set the point of instantiation for an implicit or explicit
instantiation once we have committed to performing the
instantiation. As part of this, make our makeshift
template-instantiation location information suck slightly less.

Fixes PR5264.

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

14 years agoTypo in revision 85201.
Edward O'Callaghan [Tue, 27 Oct 2009 03:59:44 +0000 (03:59 +0000)]
Typo in revision 85201.

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

14 years agoConvert Preprocessor Clang tests to FileCheck in regards to PR5307.
Edward O'Callaghan [Tue, 27 Oct 2009 03:47:36 +0000 (03:47 +0000)]
Convert Preprocessor Clang tests to FileCheck in regards to PR5307.

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

14 years agoFix a broken test in rev. 85199.
Edward O'Callaghan [Tue, 27 Oct 2009 03:14:56 +0000 (03:14 +0000)]
Fix a broken test in rev. 85199.

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

14 years agoConvert Preprocessor Clang tests to FileCheck in regards to PR5307.
Edward O'Callaghan [Tue, 27 Oct 2009 02:36:32 +0000 (02:36 +0000)]
Convert Preprocessor Clang tests to FileCheck in regards to PR5307.

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

14 years agoAlmost missed this one... Doc update for last change.
Mike Stump [Tue, 27 Oct 2009 02:07:23 +0000 (02:07 +0000)]
Almost missed this one...  Doc update for last change.

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