]> granicus.if.org Git - clang/log
clang
15 years agoReorganize the parsing of decl groups / function definitions so that
John McCall [Tue, 3 Nov 2009 19:26:08 +0000 (19:26 +0000)]
Reorganize the parsing of decl groups / function definitions so that
declarators are parsed primarily within a single function (at least for
these cases).  Remove some excess diagnostics arising during parse failures.

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

15 years agoRefine codegen for covariant thunks that return references.
Mike Stump [Tue, 3 Nov 2009 19:03:17 +0000 (19:03 +0000)]
Refine codegen for covariant thunks that return references.

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

15 years agoMerge NullDerefChecker.[h,cpp] and UndefDerefChecker.[h,cpp]. They are essentially...
Ted Kremenek [Tue, 3 Nov 2009 18:41:06 +0000 (18:41 +0000)]
Merge NullDerefChecker.[h,cpp] and UndefDerefChecker.[h,cpp].  They are essentially two parts of the same check.

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

15 years agoFix tests to not depend on /dev/null existing.
Daniel Dunbar [Tue, 3 Nov 2009 17:56:18 +0000 (17:56 +0000)]
Fix tests to not depend on /dev/null existing.

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

15 years agoRefine return value adjustments for thunks.
Mike Stump [Tue, 3 Nov 2009 16:59:27 +0000 (16:59 +0000)]
Refine return value adjustments for thunks.

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

15 years agoUse ParseUnqualifiedId when parsing id-expressions. This eliminates
Douglas Gregor [Tue, 3 Nov 2009 16:56:39 +0000 (16:56 +0000)]
Use ParseUnqualifiedId when parsing id-expressions. This eliminates
yet another copy of the unqualified-id parsing code.

Also, use UnqualifiedId to simplify the Action interface for building
id-expressions. ActOnIdentifierExpr, ActOnCXXOperatorFunctionIdExpr,
ActOnCXXConversionFunctionExpr, and ActOnTemplateIdExpr have all been
removed in favor of the new ActOnIdExpression action.

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

15 years agoFix documentation.
Mike Stump [Tue, 3 Nov 2009 16:11:57 +0000 (16:11 +0000)]
Fix documentation.

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

15 years agoUpdate CMakeLists.
Benjamin Kramer [Tue, 3 Nov 2009 13:37:33 +0000 (13:37 +0000)]
Update CMakeLists.

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

15 years agoPull VLA size checker into its own files.
Zhongxing Xu [Tue, 3 Nov 2009 12:13:38 +0000 (12:13 +0000)]
Pull VLA size checker into its own files.
Split it to two checkers, one for undefined size,
the other for zero size, so that we don't need to query the size
when emitting the bug report.

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

15 years agoAdd link to FatELF project.
Daniel Dunbar [Tue, 3 Nov 2009 08:18:34 +0000 (08:18 +0000)]
Add link to FatELF project.

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

15 years agoImplement: <rdar://problem/6250216> Warn against using -[NSAutoreleasePool release...
Ted Kremenek [Tue, 3 Nov 2009 08:03:59 +0000 (08:03 +0000)]
Implement: <rdar://problem/6250216> Warn against using -[NSAutoreleasePool release] in GC mode

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

15 years agoMove 'static inline' functions GetNullarySelector() and GetUnarySelector() from CFRef...
Ted Kremenek [Tue, 3 Nov 2009 08:00:42 +0000 (08:00 +0000)]
Move 'static inline' functions GetNullarySelector() and GetUnarySelector() from CFRefCount.cpp to ASTContext.h.  These functions are likely to be generally useful.

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

15 years agoXFAIL Driver/hello.c on Windows.
Daniel Dunbar [Tue, 3 Nov 2009 07:49:31 +0000 (07:49 +0000)]
XFAIL Driver/hello.c on Windows.

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

15 years agoPull AttrNonNullChecker into its own files.
Zhongxing Xu [Tue, 3 Nov 2009 07:35:33 +0000 (07:35 +0000)]
Pull AttrNonNullChecker into its own files.

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

15 years agoAdd target_triple to Clang site configuration.
Daniel Dunbar [Tue, 3 Nov 2009 07:25:53 +0000 (07:25 +0000)]
Add target_triple to Clang site configuration.

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

15 years agoSwitch XFAIL format to match LLVM.
Daniel Dunbar [Tue, 3 Nov 2009 07:25:45 +0000 (07:25 +0000)]
Switch XFAIL format to match LLVM.

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

15 years agoUpdate CMake file.
Zhongxing Xu [Tue, 3 Nov 2009 07:14:39 +0000 (07:14 +0000)]
Update CMake file.

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

15 years agoRename NSErrorCheck to NSErrorChecker.
Ted Kremenek [Tue, 3 Nov 2009 06:59:59 +0000 (06:59 +0000)]
Rename NSErrorCheck to NSErrorChecker.

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

15 years agoUpdate CMake file.
Ted Kremenek [Tue, 3 Nov 2009 06:46:41 +0000 (06:46 +0000)]
Update CMake file.

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

15 years agoPull UndefinedArgChecker into its own files.
Zhongxing Xu [Tue, 3 Nov 2009 06:46:03 +0000 (06:46 +0000)]
Pull UndefinedArgChecker into its own files.

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

15 years agoFix buffer overflow in PrintMacroDefinition() by inverting the check to see if the...
Ted Kremenek [Tue, 3 Nov 2009 06:18:05 +0000 (06:18 +0000)]
Fix buffer overflow in PrintMacroDefinition() by inverting the check to see if the target buffer needs to be resized.  Fixes <rdar://problem/7255377>.

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

15 years agoPull BadCallChecker into its own files.
Zhongxing Xu [Tue, 3 Nov 2009 05:48:04 +0000 (05:48 +0000)]
Pull BadCallChecker into its own files.

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

15 years agoretain/release checker: CGBitmapContextCreateWithData() returns an owned object.
Ted Kremenek [Tue, 3 Nov 2009 05:39:12 +0000 (05:39 +0000)]
retain/release checker: CGBitmapContextCreateWithData() returns an owned object.

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

15 years agoretain/release checker: Add special handling of CGBitmapContextCreateWithData().
Ted Kremenek [Tue, 3 Nov 2009 05:34:07 +0000 (05:34 +0000)]
retain/release checker: Add special handling of CGBitmapContextCreateWithData().

Fixes: <rdar://problem/7358899>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85864 91177308-0d34-0410-b5e6-96231b3b80d8

15 years agopr5371 likely has nothing to do with this.
Chris Lattner [Tue, 3 Nov 2009 05:11:39 +0000 (05:11 +0000)]
pr5371 likely has nothing to do with this.

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

15 years agoRefine codegen for non-virtual this adjustments for thunks.
Mike Stump [Tue, 3 Nov 2009 03:16:46 +0000 (03:16 +0000)]
Refine codegen for non-virtual this adjustments for thunks.

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

15 years agoSwitch ParseStructDeclaration to a callback-based API. This will make
John McCall [Tue, 3 Nov 2009 02:38:08 +0000 (02:38 +0000)]
Switch ParseStructDeclaration to a callback-based API.  This will make
it easier to track within Sema whether the parser is parsing a declaration.

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

15 years agoFixed for running on Windows.
John Thompson [Tue, 3 Nov 2009 02:36:47 +0000 (02:36 +0000)]
Fixed for running on Windows.

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

15 years agoAdd virtual adjustments for this for thunks.
Mike Stump [Tue, 3 Nov 2009 02:12:59 +0000 (02:12 +0000)]
Add virtual adjustments for this for thunks.

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

15 years agoIntroduce a new class, UnqualifiedId, that provides a parsed
Douglas Gregor [Tue, 3 Nov 2009 01:35:08 +0000 (01:35 +0000)]
Introduce a new class, UnqualifiedId, that provides a parsed
representation of a C++ unqualified-id, along with a single parsing
function (Parser::ParseUnqualifiedId) that will parse all of the
various forms of unqualified-id in C++.

Replace the representation of the declarator name in Declarator with
the new UnqualifiedId class, simplifying declarator-id parsing
considerably and providing more source-location information to
Sema. In the future, I hope to migrate all of the other
unqualified-id-parsing code over to this single representation, then
begin to merge actions that are currently only different because we
didn't have a unqualified notion of the name in the parser.

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

15 years agoAssortment of property attributes declared in continuation
Fariborz Jahanian [Tue, 3 Nov 2009 00:01:38 +0000 (00:01 +0000)]
Assortment of property attributes declared in continuation
class must match those of same property declared
in its primary class. (Fixes radar 7352425)

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

15 years agoAdd basic codegen for thunks that return values.
Mike Stump [Mon, 2 Nov 2009 23:47:45 +0000 (23:47 +0000)]
Add basic codegen for thunks that return values.

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

15 years agoRefine codegen for thunks.
Mike Stump [Mon, 2 Nov 2009 23:22:01 +0000 (23:22 +0000)]
Refine codegen for thunks.

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

15 years agoRemove GRExprEngine::CheckerVisitLocation(). It was only called in one place, so...
Ted Kremenek [Mon, 2 Nov 2009 23:19:29 +0000 (23:19 +0000)]
Remove GRExprEngine::CheckerVisitLocation().  It was only called in one place, so we inlined it in to GRExprEngine::EvalLocation().

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

15 years agoProperty declared in continuation class can only be used to
Fariborz Jahanian [Mon, 2 Nov 2009 22:45:15 +0000 (22:45 +0000)]
Property declared in continuation class can only be used to
change a readonly property declared in the class (and its inherited protocols)
to writable property. (Fixes radar 7350645).

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

15 years agoAdded __has_include and __has_include_next.
John Thompson [Mon, 2 Nov 2009 22:28:12 +0000 (22:28 +0000)]
Added __has_include and __has_include_next.

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

15 years agoHopefully make gcc-4.0 happy with respect to the following warning:
Ted Kremenek [Mon, 2 Nov 2009 22:24:53 +0000 (22:24 +0000)]
Hopefully make gcc-4.0 happy with respect to the following warning:

warning: 'class clang::StackFrameContext' has virtual functions but non-virtual destructor

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

15 years agoSort export list.
Daniel Dunbar [Mon, 2 Nov 2009 22:23:08 +0000 (22:23 +0000)]
Sort export list.

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

15 years agoRemove unused header.
Daniel Dunbar [Mon, 2 Nov 2009 22:11:26 +0000 (22:11 +0000)]
Remove unused header.

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

15 years agoclean up namespace.
Chris Lattner [Mon, 2 Nov 2009 21:48:09 +0000 (21:48 +0000)]
clean up namespace.

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

15 years agoAdd note to FIXME about PR5371.
Edward O'Callaghan [Mon, 2 Nov 2009 21:25:11 +0000 (21:25 +0000)]
Add note to FIXME about PR5371.

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

15 years agoAdd "virtual" keywords for clarity.
Ted Kremenek [Mon, 2 Nov 2009 18:54:58 +0000 (18:54 +0000)]
Add "virtual" keywords for clarity.

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

15 years agoDiagnose implementation of a property declared in a category
Fariborz Jahanian [Mon, 2 Nov 2009 18:45:36 +0000 (18:45 +0000)]
Diagnose implementation of a property declared in a category
in its class implementation instead of crashing. Fixes radar 7350345.

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

15 years agoWhen determining whether a reference to a static data member is an
Douglas Gregor [Sun, 1 Nov 2009 20:32:48 +0000 (20:32 +0000)]
When determining whether a reference to a static data member is an
integral constant expression, make sure to find where the initializer
was provided---inside or outside the class definition---since that can
affect whether we have an integral constant expression (and, we need
to see the initializer itself).

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

15 years agoWithin a template, qualified name lookup can refer to a non-dependent type
Douglas Gregor [Sun, 1 Nov 2009 17:08:18 +0000 (17:08 +0000)]
Within a template, qualified name lookup can refer to a non-dependent type
that is not known to be a base class at template definition time due
to some dependent base class. Treat qualified name lookup that refers
to a non-static data member or function as implicit class member
access when the "this" type would be dependent.

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

15 years agoAdd missing colons for FileCheck.
Benjamin Kramer [Sat, 31 Oct 2009 20:42:26 +0000 (20:42 +0000)]
Add missing colons for FileCheck.

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

15 years agoFix -pthread on dragonfly. Patch by Sascha Wildner.
Mike Stump [Sat, 31 Oct 2009 20:11:46 +0000 (20:11 +0000)]
Fix -pthread on dragonfly.  Patch by Sascha Wildner.

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

15 years agoRefine vcall/vbase ordering with vtable construction.
Mike Stump [Sat, 31 Oct 2009 20:06:59 +0000 (20:06 +0000)]
Refine vcall/vbase ordering with vtable construction.

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

15 years agoImplement "incremental" template instantiation for non-type template
Douglas Gregor [Sat, 31 Oct 2009 17:21:17 +0000 (17:21 +0000)]
Implement "incremental" template instantiation for non-type template
parameters and template type parameters, which occurs when
substituting into the declarations of member templates inside class
templates. This eliminates errors about our inability to "reduce
non-type template parameter depth", fixing PR5311.

Also fixes a bug when instantiating a template type parameter
declaration in a member template, where we weren't properly reducing
the template parameter's depth.

LLVM's StringSwitch header now parses.

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

15 years agoFix the type of __builtin_expect, from Ed Schouten!
Douglas Gregor [Sat, 31 Oct 2009 16:04:14 +0000 (16:04 +0000)]
Fix the type of __builtin_expect, from Ed Schouten!

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

15 years agoAdd two missing CINDEX_LINKAGE uses, in libCIndex, from Kovarththanan
Douglas Gregor [Sat, 31 Oct 2009 15:48:08 +0000 (15:48 +0000)]
Add two missing CINDEX_LINKAGE uses, in libCIndex, from Kovarththanan
Rajaratnam!

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

15 years agoUpdate CMake file.
Benjamin Kramer [Sat, 31 Oct 2009 12:15:23 +0000 (12:15 +0000)]
Update CMake file.

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

15 years agoMove CheckDivZero into its own files.
Zhongxing Xu [Sat, 31 Oct 2009 10:02:37 +0000 (10:02 +0000)]
Move CheckDivZero into its own files.

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

15 years agoMove UndefDerefChecker into its own file.
Zhongxing Xu [Sat, 31 Oct 2009 08:44:33 +0000 (08:44 +0000)]
Move UndefDerefChecker into its own file.

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

15 years agoAdd header comments.
Zhongxing Xu [Sat, 31 Oct 2009 04:12:21 +0000 (04:12 +0000)]
Add header comments.

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

15 years agofix 80-col.
Zhongxing Xu [Sat, 31 Oct 2009 03:36:08 +0000 (03:36 +0000)]
fix 80-col.

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

15 years agoFix a crazy canonical-types bug because canonicalizing a
Douglas Gregor [Fri, 30 Oct 2009 22:56:57 +0000 (22:56 +0000)]
Fix a crazy canonical-types bug because canonicalizing a
dependently-sized array type with a given expression might end up
returning a non-canonical type; see through that non-canonical type to
the underlying canonical type. Yes, I have a test case; no, I can't
reduce it to the point where it's worth checking in :(

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

15 years agoWhen looking for a copy-assignment operator to determine the cv-qualifiers on its...
Douglas Gregor [Fri, 30 Oct 2009 22:48:49 +0000 (22:48 +0000)]
When looking for a copy-assignment operator to determine the cv-qualifiers on its argument type, ignore assignment operator templates

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

15 years agoWhen a friend is declared in a dependent context, don't even try to
Douglas Gregor [Fri, 30 Oct 2009 22:42:42 +0000 (22:42 +0000)]
When a friend is declared in a dependent context, don't even try to
match it up with a declaration in the outer scope.

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

15 years agoImproved fix for PR3844, which recovers better for class template
Douglas Gregor [Fri, 30 Oct 2009 22:09:44 +0000 (22:09 +0000)]
Improved fix for PR3844, which recovers better for class template
partial specializations and explicit instantiations of non-templates.

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

15 years agoTighten computation of ExprVal using ?: expression. No functionality change.
Ted Kremenek [Fri, 30 Oct 2009 22:01:29 +0000 (22:01 +0000)]
Tighten computation of ExprVal using ?: expression.  No functionality change.

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

15 years agoImprove diagnostics when parsing something like
Douglas Gregor [Fri, 30 Oct 2009 21:46:58 +0000 (21:46 +0000)]
Improve diagnostics when parsing something like

  template<> struct foo<int> { ... };

where "foo" does not refer to a template. Fixes PR3844.

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

15 years agoInstantiate class template friends better; fixes PR5332.
Douglas Gregor [Fri, 30 Oct 2009 21:07:27 +0000 (21:07 +0000)]
Instantiate class template friends better; fixes PR5332.

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

15 years agoRemove clang-cc code for handling -mmacosx-version-min and
Daniel Dunbar [Fri, 30 Oct 2009 18:12:31 +0000 (18:12 +0000)]
Remove clang-cc code for handling -mmacosx-version-min and
-miphoneos-version-min.

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

15 years agoChange the driver to do the Darwin triple mangling itself instead of forwarding
Daniel Dunbar [Fri, 30 Oct 2009 18:12:20 +0000 (18:12 +0000)]
Change the driver to do the Darwin triple mangling itself instead of forwarding
-mmacosx-version-min and -miphoneos-version-min to clang-cc.

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

15 years agoFinally suppress a compiler warning from gcc on release-asserts. Also fixes
John McCall [Fri, 30 Oct 2009 17:53:18 +0000 (17:53 +0000)]
Finally suppress a compiler warning from gcc on release-asserts.  Also fixes
a crash on <vector> in same, which bears additional investigation.

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

15 years agoMake checkers run in deterministic order.
Ted Kremenek [Fri, 30 Oct 2009 17:47:32 +0000 (17:47 +0000)]
Make checkers run in deterministic order.

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

15 years agoMove NullDerefChecker.h instead a 'Checkers' subdirectory.
Ted Kremenek [Fri, 30 Oct 2009 17:28:40 +0000 (17:28 +0000)]
Move NullDerefChecker.h instead a 'Checkers' subdirectory.

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

15 years agoMove all logic for the null dereference checker from GRExprEngineInternalChecks.cpp...
Ted Kremenek [Fri, 30 Oct 2009 17:24:47 +0000 (17:24 +0000)]
Move all logic for the null dereference checker from GRExprEngineInternalChecks.cpp to a separate .cpp file.

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

15 years agoInclude macros in code-completion results
Douglas Gregor [Fri, 30 Oct 2009 16:50:04 +0000 (16:50 +0000)]
Include macros in code-completion results

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

15 years agoDoug says this is medium done.
Benjamin Kramer [Fri, 30 Oct 2009 14:54:38 +0000 (14:54 +0000)]
Doug says this is medium done.

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

15 years agocxx_status: fix some missing/wrong cells.
Benjamin Kramer [Fri, 30 Oct 2009 14:41:58 +0000 (14:41 +0000)]
cxx_status: fix some missing/wrong cells.

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

15 years agoRe-arranged some internal functions for coming __has_include changes.
John Thompson [Fri, 30 Oct 2009 13:49:06 +0000 (13:49 +0000)]
Re-arranged some internal functions for coming __has_include changes.

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

15 years agoAdd C++ include paths for Exherbo. Patch by Daniel Mierswa!
Benjamin Kramer [Fri, 30 Oct 2009 12:57:13 +0000 (12:57 +0000)]
Add C++ include paths for Exherbo. Patch by Daniel Mierswa!

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

15 years agoFix PR5316: make assignment expressions can be visited as lvalue. Then we
Zhongxing Xu [Fri, 30 Oct 2009 07:19:39 +0000 (07:19 +0000)]
Fix PR5316: make assignment expressions can be visited as lvalue. Then we
can get the correct base lvalue.
Revert r85578.

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

15 years agoHandle loading of field values from LazyCompoundVals in GRExprEngine::VisitMemberExpr().
Ted Kremenek [Fri, 30 Oct 2009 05:48:30 +0000 (05:48 +0000)]
Handle loading of field values from LazyCompoundVals in GRExprEngine::VisitMemberExpr().
This fixes the crash reported in PR 5316.

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

15 years agowarn about returning the address of a label.
Chris Lattner [Fri, 30 Oct 2009 04:01:58 +0000 (04:01 +0000)]
warn about returning the address of a label.

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

15 years agoGet throws limping along, still a bunch of FIXMEs. Too bad we don't support catching...
Anders Carlsson [Fri, 30 Oct 2009 02:27:02 +0000 (02:27 +0000)]
Get throws limping along, still a bunch of FIXMEs. Too bad we don't support catching anything yet :)

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

15 years agoFix thinko, mangleCXXRtti should obviously take a QualType!
Anders Carlsson [Fri, 30 Oct 2009 01:52:02 +0000 (01:52 +0000)]
Fix thinko, mangleCXXRtti should obviously take a QualType!

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

15 years agoAdd CGException.cpp, to be used for exception related code generation.
Anders Carlsson [Fri, 30 Oct 2009 01:42:31 +0000 (01:42 +0000)]
Add CGException.cpp, to be used for exception related code generation.

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

15 years agomangleCXXRtti obviously needs to take a type, what was I thinking...
Anders Carlsson [Fri, 30 Oct 2009 01:26:12 +0000 (01:26 +0000)]
mangleCXXRtti obviously needs to take a type, what was I thinking...

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

15 years agoThis patch computes composite type of two objective-c expressions
Fariborz Jahanian [Fri, 30 Oct 2009 01:13:23 +0000 (01:13 +0000)]
This patch computes composite type of two objective-c expressions
used in a conditional expression by finding the most-derived common
super class of the two and qualifies the resulting type by the
intersection of the protocl qualifier list of the two objective-c
pointer types. ( this is continuation of radar 7334235).

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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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

15 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