]> granicus.if.org Git - clang/log
clang
14 years agoRemove rsqrtps_nr256 and sqrtps_nr256 builtins, at least until we need them
Bruno Cardoso Lopes [Wed, 11 Aug 2010 19:18:36 +0000 (19:18 +0000)]
Remove rsqrtps_nr256 and sqrtps_nr256 builtins, at least until we need them

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

14 years agoUpdate documentation regarding use of 'class' in
Fariborz Jahanian [Wed, 11 Aug 2010 18:57:26 +0000 (18:57 +0000)]
Update documentation regarding use of 'class' in
property-dot syntax.

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

14 years agoReintroduce the ASTConsumer/ASTUnit fix from r110610, it has nothing to do with the...
Sebastian Redl [Wed, 11 Aug 2010 18:52:41 +0000 (18:52 +0000)]
Reintroduce the ASTConsumer/ASTUnit fix from r110610, it has nothing to do with the breakage.

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

14 years agoFix define inserting a comma :)
Bruno Cardoso Lopes [Wed, 11 Aug 2010 18:45:43 +0000 (18:45 +0000)]
Fix define inserting a comma :)

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

14 years agoIRGen support for functions returning objc object
Fariborz Jahanian [Wed, 11 Aug 2010 17:37:35 +0000 (17:37 +0000)]
IRGen support for functions returning objc object
types. Fixes PR7865.

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

14 years agoAdd a (currently unused) "options" parameter to
Douglas Gregor [Wed, 11 Aug 2010 15:58:42 +0000 (15:58 +0000)]
Add a (currently unused) "options" parameter to
clang_reparseTranslationUnit(), along with a function to retrieve the
default recommended reparsing options for a translation unit.

Also, add the CXTranslationUnit_CacheCompletionResults flag, which is
also currently unused.

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

14 years agoRemove wpa 'example', it isn't being maintained.
Daniel Dunbar [Wed, 11 Aug 2010 15:21:41 +0000 (15:21 +0000)]
Remove wpa 'example', it isn't being maintained.

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

14 years agoRandom temporary string cleanup.
Benjamin Kramer [Wed, 11 Aug 2010 14:47:12 +0000 (14:47 +0000)]
Random temporary string cleanup.

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

14 years agoIf name lookup finds different type declarations in different scopes
Douglas Gregor [Wed, 11 Aug 2010 14:45:53 +0000 (14:45 +0000)]
If name lookup finds different type declarations in different scopes
that actually refer to the same underlying type, it is not an
ambiguity; add uniquing support based on the canonical type of type
declarations. Fixes <rdar://problem/8296180>.

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

14 years agoFix a thinko in the creation of temporary files for the precompiled preamble
Douglas Gregor [Wed, 11 Aug 2010 13:06:56 +0000 (13:06 +0000)]
Fix a thinko in the creation of temporary files for the precompiled preamble

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

14 years agoSpeculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,
Douglas Gregor [Wed, 11 Aug 2010 12:19:30 +0000 (12:19 +0000)]
Speculatively revert r110610 " Make ObjCInterfaceDecl redeclarable,
and create separate decl nodes for forward declarations and the
definition," which appears to be causing significant Objective-C
breakage.

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

14 years agoMemRegion can refer to ASTContext without external help.
Zhongxing Xu [Wed, 11 Aug 2010 06:10:55 +0000 (06:10 +0000)]
MemRegion can refer to ASTContext without external help.

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

14 years agotests: Add a missing -Xclang.
Daniel Dunbar [Wed, 11 Aug 2010 02:32:03 +0000 (02:32 +0000)]
tests: Add a missing -Xclang.

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

14 years agoARM: Recognize single precision float register names.
Daniel Dunbar [Wed, 11 Aug 2010 02:17:20 +0000 (02:17 +0000)]
ARM: Recognize single precision float register names.
 - We don't recognize double or NEON register names yet -- we don't have the
   infrastructure to generate the right clobbers for them.

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

14 years agoARM: Swap which registers we consider real / aliases to match LLVM and llvm-gcc.
Daniel Dunbar [Wed, 11 Aug 2010 02:17:11 +0000 (02:17 +0000)]
ARM: Swap which registers we consider real / aliases to match LLVM and llvm-gcc.

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

14 years agoImprove our handling of user-defined conversions when computing
Douglas Gregor [Wed, 11 Aug 2010 02:15:33 +0000 (02:15 +0000)]
Improve our handling of user-defined conversions when computing
implicit conversion sequences. In particular, model the "standard
conversion" from a class to its own type (or a base type) directly as
a standard conversion in the normal path *without* trying to determine
if there is a valid copy constructor. This appears to match the intent
of C++ [over.best.ics]p6 and more closely matches GCC and EDG.

As part of this, model non-lvalue reference initialization via
user-defined conversion in overloading the same way we handle it in
InitializationSequence, separating the "general user-defined
conversion" and "conversion to compatible class type" cases.

The churn in the overload-call-copycon.cpp test case is because the
test case was originally wrong; it assumed that we should do more
checking for copy constructors that we actually should, which affected
overload resolution.

Fixes PR7055. Bootstrapped okay.

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

14 years agoRemove 256-bit cast built-ins and make the AVX intrinsic call llvm __builtin_shufflev...
Bruno Cardoso Lopes [Wed, 11 Aug 2010 02:14:38 +0000 (02:14 +0000)]
Remove 256-bit cast built-ins and make the AVX intrinsic call llvm __builtin_shufflevector with the appropriate arguments

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

14 years agoMake this test a little less dependent on exact optimizer results.
John McCall [Wed, 11 Aug 2010 02:06:44 +0000 (02:06 +0000)]
Make this test a little less dependent on exact optimizer results.

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

14 years agoRemove 256-bit unpack built-ins and make the AVX intrinsic call llvm __builtin_shuffl...
Bruno Cardoso Lopes [Wed, 11 Aug 2010 01:43:24 +0000 (01:43 +0000)]
Remove 256-bit unpack built-ins and make the AVX intrinsic call llvm __builtin_shufflevector with the appropriate arguments

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

14 years agoRemove 256-bit shuffle built-ins and make the AVX intrinsic call llvm __builtin_shuff...
Bruno Cardoso Lopes [Wed, 11 Aug 2010 01:17:34 +0000 (01:17 +0000)]
Remove 256-bit shuffle built-ins and make the AVX intrinsic call llvm __builtin_shufflevector with the appropriate arguments

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

14 years agoFix for pr7869, inline asm mult-alt constraints.
John Thompson [Wed, 11 Aug 2010 00:58:20 +0000 (00:58 +0000)]
Fix for pr7869, inline asm mult-alt constraints.

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

14 years agoFix a bug in @finally emission in both the fragile and non-fragile EH schemes
John McCall [Wed, 11 Aug 2010 00:16:14 +0000 (00:16 +0000)]
Fix a bug in @finally emission in both the fragile and non-fragile EH schemes
where we weren't accounting for the possibility that a @finally block might
have internal cleanups and therefore might write to the cleanup destination slot.

Fixes <rdar://problem/8293901>.

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

14 years agoHave GRCoreEngine record the blocks where analysis was aborted because we visited...
Ted Kremenek [Wed, 11 Aug 2010 00:03:02 +0000 (00:03 +0000)]
Have GRCoreEngine record the blocks where analysis was aborted because we visited a block too many times along a given path.  This is to support the unreachable code analysis.

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

14 years agoAdd test case for <rdar://problem/8288645>. While this is fixed in trunk, we previou...
Ted Kremenek [Tue, 10 Aug 2010 22:30:29 +0000 (22:30 +0000)]
Add test case for <rdar://problem/8288645>.  While this is fixed in trunk, we previously were getting the following assertion failure not too long ago:

Assertion failed: (getContainingDC(DC) == CurContext && "The next DeclContext should be lexically contained in the current one.")

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

14 years agoSomething's wrong with this test on other platforms. I'll probably need to simplify...
John Thompson [Tue, 10 Aug 2010 22:04:00 +0000 (22:04 +0000)]
Something's wrong with this test on other platforms.  I'll probably need to simplify it later.  For now revert.

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

14 years agoFix test to not depend on objc.h header.
Fariborz Jahanian [Tue, 10 Aug 2010 20:59:58 +0000 (20:59 +0000)]
Fix test to not depend on objc.h header.

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

14 years agoSimplify
Devang Patel [Tue, 10 Aug 2010 20:16:57 +0000 (20:16 +0000)]
Simplify

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

14 years agoTest case for llvm r110712.
Devang Patel [Tue, 10 Aug 2010 20:01:51 +0000 (20:01 +0000)]
Test case for llvm r110712.

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

14 years agotests: Avoid unnecessary redirection.
Daniel Dunbar [Tue, 10 Aug 2010 19:33:56 +0000 (19:33 +0000)]
tests: Avoid unnecessary redirection.

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

14 years agotests: Tests which include system headers must use the driver, not -cc1.
Daniel Dunbar [Tue, 10 Aug 2010 19:32:44 +0000 (19:32 +0000)]
tests: Tests which include system headers must use the driver, not -cc1.

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

14 years agoSlightly revised handling of mult-alt constraints, to avoid an assert, until we have...
John Thompson [Tue, 10 Aug 2010 19:20:14 +0000 (19:20 +0000)]
Slightly revised handling of mult-alt constraints, to avoid an assert, until we have the full fix.

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

14 years agoWhen initializing a static local, pop the guard-abort EH cleanup after
John McCall [Tue, 10 Aug 2010 18:51:44 +0000 (18:51 +0000)]
When initializing a static local, pop the guard-abort EH cleanup after
the variable is fully initialized.

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

14 years agoan objective-c++ test for -Wstrict-selector-match
Fariborz Jahanian [Tue, 10 Aug 2010 18:32:37 +0000 (18:32 +0000)]
an objective-c++ test for -Wstrict-selector-match
(radar 8127244).

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

14 years agoDo not use DIGlobalVariable to emit debugging information for enums.
Devang Patel [Tue, 10 Aug 2010 18:27:15 +0000 (18:27 +0000)]
Do not use DIGlobalVariable to emit debugging information for enums.

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

14 years agoFix a spurious warning when message sent to qualified-id
Fariborz Jahanian [Tue, 10 Aug 2010 18:10:50 +0000 (18:10 +0000)]
Fix a spurious warning when message sent to qualified-id
type receiver (pr7861).

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

14 years agoTurn on idempotent operations checker when using --analyze.
Ted Kremenek [Tue, 10 Aug 2010 18:03:13 +0000 (18:03 +0000)]
Turn on idempotent operations checker when using --analyze.

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

14 years agoSimplify code and add comments, in code that generate debug info for constant integer...
Devang Patel [Tue, 10 Aug 2010 17:53:33 +0000 (17:53 +0000)]
Simplify code and add comments, in code that generate debug info for constant integer globals, based on Chris's feedback.

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

14 years agoDriver/FreeBSD: Infer the right arch name in the presence of -m32,-m64, for the
Daniel Dunbar [Tue, 10 Aug 2010 17:39:05 +0000 (17:39 +0000)]
Driver/FreeBSD: Infer the right arch name in the presence of -m32,-m64, for the
cases we care about.
 - This is eventually going to be unified outside the host specific code.

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

14 years agoTeach the libclang cursor visitor to walk into the type information
Douglas Gregor [Tue, 10 Aug 2010 15:02:34 +0000 (15:02 +0000)]
Teach the libclang cursor visitor to walk into the type information
provided by __builtin_types_compatible_p and __builtin_va_arg
expressions, now that Abramo has added proper type-source information
to those expressions.

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

14 years agoEliminate unnecessary uses of TemporaryBase in TreeTransform;
Douglas Gregor [Tue, 10 Aug 2010 14:27:00 +0000 (14:27 +0000)]
Eliminate unnecessary uses of TemporaryBase in TreeTransform;
transforming TypeSourceInfos already gives us proper (and better)
source-location information.

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

14 years agoFixed redundant NNS loading.
Abramo Bagnara [Tue, 10 Aug 2010 13:46:45 +0000 (13:46 +0000)]
Fixed redundant NNS loading.

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

14 years agoAdded TypeLocs to VAArgExpr node.
Abramo Bagnara [Tue, 10 Aug 2010 10:06:15 +0000 (10:06 +0000)]
Added TypeLocs to VAArgExpr node.

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

14 years agoAdded TypeLocs to TypesCompatibleExpr node.
Abramo Bagnara [Tue, 10 Aug 2010 08:50:03 +0000 (08:50 +0000)]
Added TypeLocs to TypesCompatibleExpr node.

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

14 years agoEven if a constant's evaluated value is used, emit debug info for the constant variable.
Devang Patel [Tue, 10 Aug 2010 07:24:25 +0000 (07:24 +0000)]
Even if a constant's evaluated value is used, emit debug info for the constant variable.

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

14 years agoFix redefinition of typedefs of fixable variably-modified array types; should
Eli Friedman [Tue, 10 Aug 2010 03:13:15 +0000 (03:13 +0000)]
Fix redefinition of typedefs of fixable variably-modified array types; should
fix an issue compiling <windows.h>.

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

14 years agoMake replicate intrinsics use shufflevector instead of dup builtins, also remove...
Bruno Cardoso Lopes [Tue, 10 Aug 2010 02:23:54 +0000 (02:23 +0000)]
Make replicate intrinsics use shufflevector instead of dup builtins, also remove the dup builtins

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

14 years agoUse i32 instead of i8 for AVX dot product intrinsic
Bruno Cardoso Lopes [Tue, 10 Aug 2010 01:41:40 +0000 (01:41 +0000)]
Use i32 instead of i8 for AVX dot product intrinsic

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

14 years agoThere is no need to pubish file static variable's name. Do not rely on this code...
Devang Patel [Tue, 10 Aug 2010 01:36:24 +0000 (01:36 +0000)]
There is no need to pubish file static variable's name. Do not rely on this code gen bug to check whether debug info is generated for such variables or not.

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

14 years agoRun the assembler instead of gcc on Linux.
Rafael Espindola [Tue, 10 Aug 2010 00:25:48 +0000 (00:25 +0000)]
Run the assembler instead of gcc on Linux.

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

14 years agoConsider the last argument of vblend builtin to be i32 instead of i8
Bruno Cardoso Lopes [Tue, 10 Aug 2010 00:01:23 +0000 (00:01 +0000)]
Consider the last argument of vblend builtin to be i32 instead of i8

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

14 years agoImplements gcc's -Wstrict-selector-match.
Fariborz Jahanian [Mon, 9 Aug 2010 23:27:58 +0000 (23:27 +0000)]
Implements gcc's -Wstrict-selector-match.
(radar 8127244).

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

14 years agoWhen attempting to recover from a failed unqualified name lookup, make
Douglas Gregor [Mon, 9 Aug 2010 22:38:14 +0000 (22:38 +0000)]
When attempting to recover from a failed unqualified name lookup, make
sure to clear out the LookupResult structure after looking into each class.

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

14 years agoInstead of having a specific CXTranslationUnit_* option flag for
Douglas Gregor [Mon, 9 Aug 2010 22:28:58 +0000 (22:28 +0000)]
Instead of having a specific CXTranslationUnit_* option flag for
"editing" mode, introduce a separate function
clang_defaultEditingTranslationUnitOptions() that retrieves the set of
options. No functionality change.

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

14 years ago- Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward...
Sebastian Redl [Mon, 9 Aug 2010 21:55:28 +0000 (21:55 +0000)]
- Make ObjCInterfaceDecl redeclarable, and create separate decl nodes for forward declarations and the definition.
- Eagerly create ObjCInterfaceTypes for declarations.
- The two above changes lead to a 0.5% increase in memory use and no speed regression when parsing Cocoa.h. On the other hand, now chained PCH works when there's a forward declaration in one PCH and the interface definition in another.
- Add HandleInterestingDecl to ASTConsumer. PCHReader passes the "interesting" decls it finds to this function instead of HandleTopLevelDecl. The default implementation forwards to HandleTopLevelDecl, but ASTUnit's handler for example ignores them. This fixes a potential crash when lazy loading of PCH data would cause ASTUnit's "top level" declaration collection to change while being iterated.

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

14 years agoAdded vecreturn attribute parsing.
John Thompson [Mon, 9 Aug 2010 21:53:52 +0000 (21:53 +0000)]
Added vecreturn attribute parsing.

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

14 years agoChange warning about incomplete parsing of C++ default arg to error and provide a...
Argyrios Kyrtzidis [Mon, 9 Aug 2010 21:08:13 +0000 (21:08 +0000)]
Change warning about incomplete parsing of C++ default arg to error and provide a test case; thanks Doug!

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

14 years agoFix mixed declarations and code warning.
Daniel Dunbar [Mon, 9 Aug 2010 21:06:06 +0000 (21:06 +0000)]
Fix mixed declarations and code warning.

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

14 years agoMinor libclang tweaks
Douglas Gregor [Mon, 9 Aug 2010 21:00:09 +0000 (21:00 +0000)]
Minor libclang tweaks

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

14 years agoUse precompiled preambles for in-process code completion.
Douglas Gregor [Mon, 9 Aug 2010 20:45:32 +0000 (20:45 +0000)]
Use precompiled preambles for in-process code completion.

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

14 years agoAllow EvalBinOpNN to handle expressions of the form $a+$b if $b can be reduced to...
Jordy Rose [Mon, 9 Aug 2010 20:31:57 +0000 (20:31 +0000)]
Allow EvalBinOpNN to handle expressions of the form $a+$b if $b can be reduced to a constant.

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

14 years agoWarn if class object does not implement qualified
Fariborz Jahanian [Mon, 9 Aug 2010 18:21:43 +0000 (18:21 +0000)]
Warn if class object does not implement qualified
id's protocols. Fixes radar 8154220.

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

14 years agoRemove a FIXME.
Argyrios Kyrtzidis [Mon, 9 Aug 2010 10:59:17 +0000 (10:59 +0000)]
Remove a FIXME.

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

14 years agoComplete PCH support for ObjCPropertyImplDecl.
Argyrios Kyrtzidis [Mon, 9 Aug 2010 10:54:37 +0000 (10:54 +0000)]
Complete PCH support for ObjCPropertyImplDecl.

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

14 years agoRevert the dump functions to send output to llvm::errs(), matching the LLVM conventio...
Argyrios Kyrtzidis [Mon, 9 Aug 2010 10:54:31 +0000 (10:54 +0000)]
Revert the dump functions to send output to llvm::errs(), matching the LLVM convention; suggestion by Daniel.

'-ast-print' / '-ast-dump' command line options still send output to llvm::outs().

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

14 years agoReplace a parser assertion with a warning, suggestion by Doug.
Argyrios Kyrtzidis [Mon, 9 Aug 2010 10:54:26 +0000 (10:54 +0000)]
Replace a parser assertion with a warning, suggestion by Doug.

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

14 years agoSupport ObjC implementation decls for PCH.
Argyrios Kyrtzidis [Mon, 9 Aug 2010 10:54:20 +0000 (10:54 +0000)]
Support ObjC implementation decls for PCH.

Strictly speaking, implementations don't go in headers but there's no law against it.

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

14 years agoRefactor into functions PCH reading/writing the CXXBaseOrMemberInitializers. No funct...
Argyrios Kyrtzidis [Mon, 9 Aug 2010 10:54:12 +0000 (10:54 +0000)]
Refactor into functions PCH reading/writing the CXXBaseOrMemberInitializers. No functionality change.

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

14 years agoRemove C++0x concept keyword tokens since concepts were removed from C++0x.
Sean Hunt [Sun, 8 Aug 2010 21:19:33 +0000 (21:19 +0000)]
Remove C++0x concept keyword tokens since concepts were removed from C++0x.

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

14 years agoFix a few more typos. Amusingly, GCC made the same mistake around version 3.2.
Chandler Carruth [Sun, 8 Aug 2010 08:44:32 +0000 (08:44 +0000)]
Fix a few more typos. Amusingly, GCC made the same mistake around version 3.2.

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

14 years agoFix some typos I made when adding alternate intrinsic names.
Chandler Carruth [Sun, 8 Aug 2010 08:30:05 +0000 (08:30 +0000)]
Fix some typos I made when adding alternate intrinsic names.

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

14 years agoRevert r110440, the fix for PR4897. Chris claims to have a better way.
Douglas Gregor [Sun, 8 Aug 2010 07:49:23 +0000 (07:49 +0000)]
Revert r110440, the fix for PR4897. Chris claims to have a better way.

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

14 years agoFix a crash on template delete operators.
Chandler Carruth [Sun, 8 Aug 2010 07:04:00 +0000 (07:04 +0000)]
Fix a crash on template delete operators.

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

14 years agoMake this test check a few more cases which didn't work correctly before
Eli Friedman [Sun, 8 Aug 2010 05:07:06 +0000 (05:07 +0000)]
Make this test check a few more cases which didn't work correctly before
r110526.

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

14 years agoSilence GCC warning about && and || without explicit grouping.
Chandler Carruth [Sun, 8 Aug 2010 05:02:51 +0000 (05:02 +0000)]
Silence GCC warning about && and || without explicit grouping.

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

14 years agoThread local variables aren't considered common linkage.
Eric Christopher [Sun, 8 Aug 2010 01:37:14 +0000 (01:37 +0000)]
Thread local variables aren't considered common linkage.

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

14 years agoPR7800: both virtual and non-virtual bases must be marked as used for VTTs.
Eli Friedman [Sat, 7 Aug 2010 23:11:44 +0000 (23:11 +0000)]
PR7800: both virtual and non-virtual bases must be marked as used for VTTs.

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

14 years agoMake -funroll-loops turn on loop unrolling in the optimizer instead
Eric Christopher [Sat, 7 Aug 2010 23:08:14 +0000 (23:08 +0000)]
Make -funroll-loops turn on loop unrolling in the optimizer instead
of just ignoring it.

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

14 years agoPush location through the MacroUndefined PPCallback and use it to print #undefs in...
Benjamin Kramer [Sat, 7 Aug 2010 22:27:00 +0000 (22:27 +0000)]
Push location through the MacroUndefined PPCallback and use it to print #undefs in -dD mode. (PR7818)

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

14 years agoIntegral-to-pointer conversions are not always null -> member pointer
Douglas Gregor [Sat, 7 Aug 2010 13:36:37 +0000 (13:36 +0000)]
Integral-to-pointer conversions are not always null -> member pointer
conversions. Fixes PR7443.

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

14 years agoFix an Objective-C crasher, PR7839.
Douglas Gregor [Sat, 7 Aug 2010 12:29:18 +0000 (12:29 +0000)]
Fix an Objective-C crasher, PR7839.

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

14 years agoAdd some more tests for reference binding of Objective-C objects
Douglas Gregor [Sat, 7 Aug 2010 11:56:45 +0000 (11:56 +0000)]
Add some more tests for reference binding of Objective-C objects

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

14 years agoAllow reference binding of a reference of Objective-C object type to
Douglas Gregor [Sat, 7 Aug 2010 11:51:51 +0000 (11:51 +0000)]
Allow reference binding of a reference of Objective-C object type to
an lvalue of another, compatible Objective-C object type (e.g., a
subclass). Introduce a new initialization sequence step kind to
describe this binding, along with a new cast kind. Fixes PR7741.

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

14 years agoInline a special case of EmitAggregateCopy into EmitNullInitialization
John McCall [Sat, 7 Aug 2010 08:21:30 +0000 (08:21 +0000)]
Inline a special case of EmitAggregateCopy into EmitNullInitialization
to avoid the awesome-but-wrong-in-this-case assertion in the canon EAC.
Fixes PR7834.

Also fix a subtle address-space bug in the memset path.

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

14 years agoNote that a CXXConstructExpr is zeroing when dumping it.
John McCall [Sat, 7 Aug 2010 06:38:55 +0000 (06:38 +0000)]
Note that a CXXConstructExpr is zeroing when dumping it.

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

14 years agoStore inheritance paths after CastExprs instead of inside them.
John McCall [Sat, 7 Aug 2010 06:22:56 +0000 (06:22 +0000)]
Store inheritance paths after CastExprs instead of inside them.
This takes some trickery since CastExpr has subclasses (and indeed,
is abstract).

Also, smoosh the CastKind into the bitfield from Expr.

Drops two words of storage from Expr in the common case of expressions
which don't need inheritance paths.  Avoids a separate allocation and
another word of overhead in cases needing inheritance paths.  Also has
the advantage of not leaking memory, since destructors for AST nodes are
never run.

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

14 years agoCorrect -ftrapv to trap on errors, instead of calling the
Chris Lattner [Sat, 7 Aug 2010 00:20:46 +0000 (00:20 +0000)]
Correct -ftrapv to trap on errors, instead of calling the
__overflow_handler entrypoint that David Chisnall made up.
Calling __overflow_handler is not part of the contract of
-ftrapv provided by GCC, and should never have been checked
in in the first place.

According to:
http://permalink.gmane.org/gmane.comp.compilers.clang.devel/8699

David is using this for some of arbitrary precision integer stuff
or something, which is not an appropriate thing to implement on
this.

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

14 years agoPR7837: For qualified id's, make sure the decl context is complete if not
Eli Friedman [Fri, 6 Aug 2010 23:41:47 +0000 (23:41 +0000)]
PR7837: For qualified id's, make sure the decl context is complete if not
dependent in ActOnIdExpression.  (This issue only shows up with member
operators because an operator is never a type.)

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

14 years agoRemoved IdempotentOperationChecker from default analysis and returned back to a flag...
Tom Care [Fri, 6 Aug 2010 22:23:07 +0000 (22:23 +0000)]
Removed IdempotentOperationChecker from default analysis and returned back to a flag (-analyzer-check-idempotent-operations)
- Added IdempotentOperationChecker to experimental analyses for testing purposes
- Updated test cases to explictly call the checker

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

14 years agoFix leaks of ExplicitSpecializationInfo objects by allocating them with 'new (ASTCont...
Ted Kremenek [Fri, 6 Aug 2010 21:12:58 +0000 (21:12 +0000)]
Fix leaks of ExplicitSpecializationInfo objects by allocating them with 'new (ASTContext)' instead of 'new'.

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

14 years agoFix 80 col. violations.
Ted Kremenek [Fri, 6 Aug 2010 21:12:55 +0000 (21:12 +0000)]
Fix 80 col. violations.

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

14 years agoNest variable declaration into into 'if' condition, thus restricting the scope of...
Ted Kremenek [Fri, 6 Aug 2010 21:12:53 +0000 (21:12 +0000)]
Nest variable declaration into into 'if' condition, thus restricting the scope of the variable and condensing the code.

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

14 years agoUse 'GenerateNode()' instead of 'GenerateSink()' when reporting a leak. A leak is...
Ted Kremenek [Fri, 6 Aug 2010 21:12:49 +0000 (21:12 +0000)]
Use 'GenerateNode()' instead of 'GenerateSink()' when reporting a leak.  A leak is not a hard enough bug to stop analyzing a path.

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

14 years agoInitialize variable to work around warning; unfortunately, there isn't any
Eli Friedman [Fri, 6 Aug 2010 16:37:05 +0000 (16:37 +0000)]
Initialize variable to work around warning; unfortunately, there isn't any
way to tell gcc "really, values outside the enum aren't valid".

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

14 years agoFinishing up block variable layout API by supporting
Fariborz Jahanian [Fri, 6 Aug 2010 16:28:55 +0000 (16:28 +0000)]
Finishing up block variable layout API by supporting
union type variables and their nesting inside other
aggregate types.

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

14 years agoThe pre-increment/pre-decrement grammar in C++ differs from that in C,
Douglas Gregor [Fri, 6 Aug 2010 14:50:36 +0000 (14:50 +0000)]
The pre-increment/pre-decrement grammar in C++ differs from that in C,
but we were parsing the C grammar. Handle the C++ grammar
appropriately. Fixes PR7794.

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

14 years agoRemove some incorrect assertions when deduction template arguments in
Douglas Gregor [Fri, 6 Aug 2010 14:15:26 +0000 (14:15 +0000)]
Remove some incorrect assertions when deduction template arguments in
a template-argument-list. When template template parameters are
involved, we won't already have checked the template-argument-list (it
may not be known yet!). Fixes PR7807.

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

14 years agoMake sure that we diagnose attribute((overloadable)) functions without
Douglas Gregor [Fri, 6 Aug 2010 13:50:58 +0000 (13:50 +0000)]
Make sure that we diagnose attribute((overloadable)) functions without
prototypes. Fixes PR7738.

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

14 years agoDefine _INTEGRAL_MAX_BITS for the win32 and win64 targets, from Per Lindén!
Douglas Gregor [Fri, 6 Aug 2010 12:37:52 +0000 (12:37 +0000)]
Define _INTEGRAL_MAX_BITS for the win32 and win64 targets, from Per Lindén!

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

14 years agoTemplate keyword should not be ignored building a QualifiedTemplateName.
Abramo Bagnara [Fri, 6 Aug 2010 12:11:11 +0000 (12:11 +0000)]
Template keyword should not be ignored building a QualifiedTemplateName.

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

14 years agoFix the #include search path when reading from stdin, from Jon Simons!
Douglas Gregor [Fri, 6 Aug 2010 12:06:13 +0000 (12:06 +0000)]
Fix the #include search path when reading from stdin, from Jon Simons!
Fixes PR4897.

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