]> granicus.if.org Git - clang/log
clang
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

14 years agoDiagnose the use of "inline" on block-scope function declarations in
Douglas Gregor [Fri, 6 Aug 2010 11:44:10 +0000 (11:44 +0000)]
Diagnose the use of "inline" on block-scope function declarations in
C++, from Andrea Nall!

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

14 years agoDon't pass -avoid-version to Darwin linker
Douglas Gregor [Fri, 6 Aug 2010 11:08:45 +0000 (11:08 +0000)]
Don't pass -avoid-version to Darwin linker

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

14 years agoIntroduce implicit conversions between AltiVec vectors and GCC
Douglas Gregor [Fri, 6 Aug 2010 10:14:59 +0000 (10:14 +0000)]
Introduce implicit conversions between AltiVec vectors and GCC
vectors, from Anton Yartsev!

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

14 years agoIntroduce a new token kind 'cxx_defaultarg_end' to mark the end of C++ default argume...
Argyrios Kyrtzidis [Fri, 6 Aug 2010 09:47:24 +0000 (09:47 +0000)]
Introduce a new token kind 'cxx_defaultarg_end' to mark the end of C++ default arguments that were part of
lexed method declarations.

This avoid interference with tokens coming after the point where the default arg tokens were 'injected', e.g. for

typedef struct Inst {
  void m(int x=0);
} *InstPtr;

when parsing '0' the next token would be '*' and things would be messed up.

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

14 years agoRemove ElseScope which is also dead code now.
Nick Lewycky [Fri, 6 Aug 2010 06:50:17 +0000 (06:50 +0000)]
Remove ElseScope which is also dead code now.

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

14 years agoRemove the DeclaredInCondition bit now that it's no longer used.
Nick Lewycky [Fri, 6 Aug 2010 05:43:55 +0000 (05:43 +0000)]
Remove the DeclaredInCondition bit now that it's no longer used.

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

14 years agoPrevent these tests from dirtying the tree with output files that aren't even
Chandler Carruth [Fri, 6 Aug 2010 05:29:57 +0000 (05:29 +0000)]
Prevent these tests from dirtying the tree with output files that aren't even
used for the test.

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

14 years agoIf all nodes are sunk, bail out early. This make the later check for checkersEvaluate...
Zhongxing Xu [Fri, 6 Aug 2010 04:20:59 +0000 (04:20 +0000)]
If all nodes are sunk, bail out early. This make the later check for checkersEvaluated really meaningful.

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

14 years agovdup_lane was missing
Nate Begeman [Fri, 6 Aug 2010 01:24:57 +0000 (01:24 +0000)]
vdup_lane was missing
<rdar://problem/8278732>

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

14 years agoAttempt to fix uninitialized value warning reported on cfe-commits.
Eli Friedman [Fri, 6 Aug 2010 01:17:25 +0000 (01:17 +0000)]
Attempt to fix uninitialized value warning reported on cfe-commits.

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

14 years agoProperly pop out of Objective-C method declarations when they are (ill-formedly)
John McCall [Fri, 6 Aug 2010 00:46:05 +0000 (00:46 +0000)]
Properly pop out of Objective-C method declarations when they are (ill-formedly)
found within contexts other than the translation unit.

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

14 years agoAdd an environment variable that makes libclang use chaining for PCH.
Sebastian Redl [Fri, 6 Aug 2010 00:35:11 +0000 (00:35 +0000)]
Add an environment variable that makes libclang use chaining for PCH.

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

14 years agoadd test case.
Zhongxing Xu [Fri, 6 Aug 2010 00:04:40 +0000 (00:04 +0000)]
add test case.

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

14 years agoWe don't want to support built-ins which aren't needed by the intrinsics. Remove...
Bruno Cardoso Lopes [Thu, 5 Aug 2010 23:47:43 +0000 (23:47 +0000)]
We don't want to support built-ins which aren't needed by the intrinsics. Remove them

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

14 years agoDon't assert on a file stream if its state is not tracked. Fix pr7831.
Zhongxing Xu [Thu, 5 Aug 2010 23:24:13 +0000 (23:24 +0000)]
Don't assert on a file stream if its state is not tracked. Fix pr7831.

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

14 years agoWhen checking if a buffer access is valid, first make sure the buffer has a valid...
Jordy Rose [Thu, 5 Aug 2010 23:11:30 +0000 (23:11 +0000)]
When checking if a buffer access is valid, first make sure the buffer has a valid Loc. Fixes PR7830.

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

14 years agoFix AVX 256-bit intrinsics headers by using the right cast type while dealing with...
Bruno Cardoso Lopes [Thu, 5 Aug 2010 23:04:58 +0000 (23:04 +0000)]
Fix AVX 256-bit intrinsics headers by using the right cast type while dealing with logical ops

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

14 years agoDon't crash when mangling empty anonymous unions. We never actually *need*
John McCall [Thu, 5 Aug 2010 22:02:13 +0000 (22:02 +0000)]
Don't crash when mangling empty anonymous unions.  We never actually *need*
these, but it's convenient to mangle them when deferring them (in the 99.99%
case where it's not an anonymous union, of course).

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

14 years agoCollect namespaces that need updating in a PCH chain. WIP
Sebastian Redl [Thu, 5 Aug 2010 21:22:19 +0000 (21:22 +0000)]
Collect namespaces that need updating in a PCH chain. WIP

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

14 years agoAdd support for block imported struct variable layout info.
Fariborz Jahanian [Thu, 5 Aug 2010 21:00:25 +0000 (21:00 +0000)]
Add support for block imported struct variable layout info.
(objc gc and blocks in NeXt runtime).

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

14 years agoIt turns out that linkers (at least, the Darwin linker) don't necessarily
John McCall [Thu, 5 Aug 2010 20:39:18 +0000 (20:39 +0000)]
It turns out that linkers (at least, the Darwin linker) don't necessarily
do the right thing with mixed-visibility symbols, so disable the visibility
optimization where that's possible, i.e. with template classes (since it's
possible that an arbitrary template might be subject to an explicit
instantiation elsewhere).  447.dealII actually does this.

I've put the code under an option that's currently not hooked up to anything.

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

14 years agofix the va_list definition for vc++64, patch by Cameron Esfahani!
Chris Lattner [Thu, 5 Aug 2010 20:04:20 +0000 (20:04 +0000)]
fix the va_list definition for vc++64, patch by Cameron Esfahani!

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

14 years agoWrite various C++-specific records to chained PCHs. Tests will come later.
Sebastian Redl [Thu, 5 Aug 2010 18:21:25 +0000 (18:21 +0000)]
Write various C++-specific records to chained PCHs. Tests will come later.

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

14 years agoArgument evaluation order is not guaranteed. Split these out to force an order.
John McCall [Thu, 5 Aug 2010 18:11:10 +0000 (18:11 +0000)]
Argument evaluation order is not guaranteed.  Split these out to force an order.

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

14 years agoFixed logic error in UnreachableCodeChecker's marking algorithm that would sometimes...
Tom Care [Thu, 5 Aug 2010 17:53:44 +0000 (17:53 +0000)]
Fixed logic error in UnreachableCodeChecker's marking algorithm that would sometimes allow for multiple sequential statements to be flagged.

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

14 years agoFix a major bug with -ftrapv and ++/--. Patch by David Keaton!
John McCall [Thu, 5 Aug 2010 17:39:44 +0000 (17:39 +0000)]
Fix a major bug with -ftrapv and ++/--.  Patch by David Keaton!

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

14 years agoAllow multiple __declspec attributes after a class-key.
John McCall [Thu, 5 Aug 2010 17:13:11 +0000 (17:13 +0000)]
Allow multiple __declspec attributes after a class-key.
Patch by Francois Pichet!

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

14 years agoFor now skip over aggregate non-byref block variables.
Fariborz Jahanian [Thu, 5 Aug 2010 16:13:18 +0000 (16:13 +0000)]
For now skip over aggregate non-byref block variables.
(objc gc specific).

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

14 years agoTrying to unbreak buildbot.
Fariborz Jahanian [Thu, 5 Aug 2010 15:52:12 +0000 (15:52 +0000)]
Trying to unbreak buildbot.

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

14 years agoRevert r110317, and add a comment why the assertion is not an invariant.
Ted Kremenek [Thu, 5 Aug 2010 15:03:30 +0000 (15:03 +0000)]
Revert r110317, and add a comment why the assertion is not an invariant.

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

14 years agoFlip the switch to use OffsetOfExpr unconditionally; feel free to revert if
Eli Friedman [Thu, 5 Aug 2010 10:15:45 +0000 (10:15 +0000)]
Flip the switch to use OffsetOfExpr unconditionally; feel free to revert if
this breaks something.

I'll wait a few days before cleaning out UnaryOperator::OffsetOf.

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

14 years agoPR7769: Fix references to anonymous structs/unions in base classes in
Eli Friedman [Thu, 5 Aug 2010 10:11:36 +0000 (10:11 +0000)]
PR7769: Fix references to anonymous structs/unions in base classes in
offsetof expressions.

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

14 years agoAdd IRGen support for non-constant OffsetOfExpr.
Eli Friedman [Thu, 5 Aug 2010 09:58:49 +0000 (09:58 +0000)]
Add IRGen support for non-constant OffsetOfExpr.

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

14 years agoStore the pending implicit instantiations in the PCH and perform them at the end...
Argyrios Kyrtzidis [Thu, 5 Aug 2010 09:48:16 +0000 (09:48 +0000)]
Store the pending implicit instantiations in the PCH and perform them at the end of the translation unit that
included the PCH, as God intended.

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

14 years agoSupport #pragma weak for PCH.
Argyrios Kyrtzidis [Thu, 5 Aug 2010 09:48:08 +0000 (09:48 +0000)]
Support #pragma weak for PCH.

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

14 years agoMake sure C++ variable definitions are actually passed to the consumer when loaded...
Argyrios Kyrtzidis [Thu, 5 Aug 2010 09:47:59 +0000 (09:47 +0000)]
Make sure C++ variable definitions are actually passed to the consumer when loaded from PCH.

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

14 years agoMake checker recognize OffsetOfExpr as a form of __builtin_offsetof.
Eli Friedman [Thu, 5 Aug 2010 09:43:11 +0000 (09:43 +0000)]
Make checker recognize OffsetOfExpr as a form of __builtin_offsetof.

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

14 years agoGive clang_codeCompleteAt() an "options" parameter, and add a new
Douglas Gregor [Thu, 5 Aug 2010 09:09:23 +0000 (09:09 +0000)]
Give clang_codeCompleteAt() an "options" parameter, and add a new
flags enumeration + default-generating function that allows
code-completion to be customized via the libclang API.

Plus, turn on spell-checking when performing code completion.

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

14 years agoTDK_InconsistentQuals is really totally different from TDK_Inconsistent.
John McCall [Thu, 5 Aug 2010 09:05:08 +0000 (09:05 +0000)]
TDK_InconsistentQuals is really totally different from TDK_Inconsistent.
Rename it to TDK_Underqualified to avoid this sort of confusion and give it
its own diagnostic.

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

14 years agoTurn the predicate into an assertion. When could the unequal case happen?
Zhongxing Xu [Thu, 5 Aug 2010 07:38:23 +0000 (07:38 +0000)]
Turn the predicate into an assertion. When could the unequal case happen?

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

14 years agoTests for #pragma GCC visibility.
Eli Friedman [Thu, 5 Aug 2010 07:00:53 +0000 (07:00 +0000)]
Tests for #pragma GCC visibility.

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

14 years agoImplement #pragma GCC visibility.
Eli Friedman [Thu, 5 Aug 2010 06:57:20 +0000 (06:57 +0000)]
Implement #pragma GCC visibility.

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

14 years agoRemove the warning for variables declared in the if-expression being used in
Nick Lewycky [Thu, 5 Aug 2010 06:27:49 +0000 (06:27 +0000)]
Remove the warning for variables declared in the if-expression being used in
the else clause. The problem is that it's overly zealous and will respond to
uses in assignments, or after assignments. We should bring this back once we
can do it right. Fixes PR7100.

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

14 years agoPermit template argument deduction to add qualifiers within ObjC object
John McCall [Thu, 5 Aug 2010 05:30:45 +0000 (05:30 +0000)]
Permit template argument deduction to add qualifiers within ObjC object
pointers like it can with normal and member pointers.

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

14 years agooperator<< on a DiagnosticBuilder should *always* output exactly one thing.
John McCall [Thu, 5 Aug 2010 04:58:04 +0000 (04:58 +0000)]
operator<< on a DiagnosticBuilder should *always* output exactly one thing.
Null template arguments are bad, but they're better than crashing with an
argument mismatch.

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