]> granicus.if.org Git - clang/log
clang
15 years agoMove NSConcreteStackBlock into CGM.
Mike Stump [Fri, 13 Feb 2009 19:29:27 +0000 (19:29 +0000)]
Move NSConcreteStackBlock into CGM.

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

15 years agoSema/AST support for attribute used. Patch by Anders Johnson (with small tweaks ...
Daniel Dunbar [Fri, 13 Feb 2009 19:23:53 +0000 (19:23 +0000)]
Sema/AST support for attribute used. Patch by Anders Johnson (with small tweaks & test case)!

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

15 years agoAdd some boilerplate to the PTH file to prepare for the caching of stats for director...
Ted Kremenek [Fri, 13 Feb 2009 19:13:46 +0000 (19:13 +0000)]
Add some boilerplate to the PTH file to prepare for the caching of stats for directories (and negative stats too).

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

15 years agoEliminate an unused variable
Douglas Gregor [Fri, 13 Feb 2009 19:13:32 +0000 (19:13 +0000)]
Eliminate an unused variable

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

15 years agoReflow to 80col.
Mike Stump [Fri, 13 Feb 2009 19:12:34 +0000 (19:12 +0000)]
Reflow to 80col.

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

15 years agoRemove DeclGroupOwningRef, since we intend for declarations to be owned
Douglas Gregor [Fri, 13 Feb 2009 19:06:18 +0000 (19:06 +0000)]
Remove DeclGroupOwningRef, since we intend for declarations to be owned
by DeclContexts (always) rather than by statements.

DeclContext currently goes out of its way to avoid destroying any
Decls that might be owned by a DeclGroupOwningRef. However, in an
error-recovery situation, a failure in a declaration statement can
cause all of the decls in a DeclGroupOwningRef to be destroyed after
they've already be added into the DeclContext. Hence, DeclContext is
left with already-destroyed declarations, and bad things happen. This
problem was causing failures that showed up as assertions on x86 Linux
in test/Parser/objc-forcollection-neg-2.m.

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

15 years agoMove GlobalUniqueCount up into CGM.
Mike Stump [Fri, 13 Feb 2009 18:36:05 +0000 (18:36 +0000)]
Move GlobalUniqueCount up into CGM.

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

15 years agoFix capitalization in a diagnostic
Douglas Gregor [Fri, 13 Feb 2009 18:20:19 +0000 (18:20 +0000)]
Fix capitalization in a diagnostic

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

15 years agoAdd new files to Xcode project
Anders Carlsson [Fri, 13 Feb 2009 18:09:59 +0000 (18:09 +0000)]
Add new files to Xcode project

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

15 years agoFixed a 64bit code gen bug of a cateogory
Fariborz Jahanian [Fri, 13 Feb 2009 17:52:22 +0000 (17:52 +0000)]
Fixed a 64bit code gen bug of a cateogory
implementation with no category declaration!

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

15 years agox86_64 ABI: Support va_arg passed in mixed registers.
Daniel Dunbar [Fri, 13 Feb 2009 17:46:31 +0000 (17:46 +0000)]
x86_64 ABI: Support va_arg passed in mixed registers.
 - Now at 1274 passes on gcc compat suite vs 1262.

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

15 years agoccc: Suffix for PCH files is appended, not replaced. (Test case)
Daniel Dunbar [Fri, 13 Feb 2009 17:42:52 +0000 (17:42 +0000)]
ccc: Suffix for PCH files is appended, not replaced. (Test case)

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

15 years agoccc: Suffix for PCH files is appended, not replaced.
Daniel Dunbar [Fri, 13 Feb 2009 17:42:34 +0000 (17:42 +0000)]
ccc: Suffix for PCH files is appended, not replaced.

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

15 years agoCondense NSConcreteGlobalBlock handling.
Mike Stump [Fri, 13 Feb 2009 17:23:42 +0000 (17:23 +0000)]
Condense NSConcreteGlobalBlock handling.

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

15 years agoCalculate size correctly.
Mike Stump [Fri, 13 Feb 2009 17:03:17 +0000 (17:03 +0000)]
Calculate size correctly.

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

15 years agoSize should be unsigned.
Mike Stump [Fri, 13 Feb 2009 16:55:51 +0000 (16:55 +0000)]
Size should be unsigned.

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

15 years agoCondense all the blocks code into CGBlocks.cpp.
Mike Stump [Fri, 13 Feb 2009 16:19:19 +0000 (16:19 +0000)]
Condense all the blocks code into CGBlocks.cpp.

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

15 years agoFixup types, the runtime uses int, not int32.
Mike Stump [Fri, 13 Feb 2009 16:01:35 +0000 (16:01 +0000)]
Fixup types, the runtime uses int, not int32.

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

15 years agoFix cmake builds.
Mike Stump [Fri, 13 Feb 2009 15:42:50 +0000 (15:42 +0000)]
Fix cmake builds.

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

15 years agoFixup spacing a tad.
Mike Stump [Fri, 13 Feb 2009 15:32:32 +0000 (15:32 +0000)]
Fixup spacing a tad.

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

15 years agoMove GenericBlockLiteralType into CGM.
Mike Stump [Fri, 13 Feb 2009 15:25:34 +0000 (15:25 +0000)]
Move GenericBlockLiteralType into CGM.

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

15 years agoMove BlockDescriptorType into CGM.
Mike Stump [Fri, 13 Feb 2009 15:16:56 +0000 (15:16 +0000)]
Move BlockDescriptorType into CGM.

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

15 years ago80col.
Mike Stump [Fri, 13 Feb 2009 14:24:50 +0000 (14:24 +0000)]
80col.

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

15 years agoStart warning about unknown attributes.
Anders Carlsson [Fri, 13 Feb 2009 08:22:04 +0000 (08:22 +0000)]
Start warning about unknown attributes.

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

15 years agoAdd a new Ignored attribute type, and use it for may_alias.
Anders Carlsson [Fri, 13 Feb 2009 08:16:43 +0000 (08:16 +0000)]
Add a new Ignored attribute type, and use it for may_alias.

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

15 years agoAdd CodeGen support for the nodebug attribute.
Anders Carlsson [Fri, 13 Feb 2009 08:11:52 +0000 (08:11 +0000)]
Add CodeGen support for the nodebug attribute.

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

15 years agoAdd sema support for the nodebug attribute.
Anders Carlsson [Fri, 13 Feb 2009 06:46:13 +0000 (06:46 +0000)]
Add sema support for the nodebug attribute.

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

15 years agoInitial implementation of arbitrary fixed-width integer types.
Eli Friedman [Fri, 13 Feb 2009 02:31:07 +0000 (02:31 +0000)]
Initial implementation of arbitrary fixed-width integer types.
Currently only used for 128-bit integers.

Note that we can't use the fixed-width integer types for other integer
modes without other changes because glibc headers redefines (u)int*_t
and friends using the mode attribute.  For example, this means that uint64_t
has to be compatible with unsigned __attribute((mode(DI))), and
uint64_t is currently defined to long long.  And I have a feeling we'll
run into issues if we try to define uint64_t as something which isn't
either long or long long.

This doesn't get the alignment right in most cases, including
the 128-bit integer case; I'll file a PR shortly.  The gist of the issue
is that the targets don't really expose the information necessary to
figure out the alignment outside of the target description, so there's a
non-trivial amount of work involved in getting it working right.  That
said, the alignment used is conservative, so the only issue with the
current implementation is ABI compatibility.

This makes it trivial to add some sort of "bitwidth" attribute to make
arbitrary-width integers; I'll do that in a followup.

We could also use this for stuff like the following for compatibility
with gcc, but I have a feeling it would be a better idea for clang to be
consistent between C and C++ modes rather than follow gcc's example for
C mode.
struct {unsigned long long x : 33;} x;
unsigned long long a(void) {return x.x+1;}

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

15 years agoGRExprEngine:
Ted Kremenek [Fri, 13 Feb 2009 01:45:31 +0000 (01:45 +0000)]
GRExprEngine:
- Add 'EvalBind', which will be used by 'EvalStore' to pull much of the value binding logic out of GRTransferFuncs.
- Rename many cases of 'St' to 'state'.

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

15 years agoAdd mangling for variadic functions and conversion functions
Douglas Gregor [Fri, 13 Feb 2009 01:28:03 +0000 (01:28 +0000)]
Add mangling for variadic functions and conversion functions

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

15 years agoFix gcc warning: gcc correctly notes that const-qualifying the return
Eli Friedman [Fri, 13 Feb 2009 01:02:29 +0000 (01:02 +0000)]
Fix gcc warning: gcc correctly notes that const-qualifying the return
type doesn't do anything.

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

15 years agoAdd documentation for overloaded functions in C
Douglas Gregor [Fri, 13 Feb 2009 00:57:04 +0000 (00:57 +0000)]
Add documentation for overloaded functions in C

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

15 years agoAnalysisConsumer: Explicitly destroy the PathDiagnosticClient at the end of HandleTra...
Ted Kremenek [Fri, 13 Feb 2009 00:51:30 +0000 (00:51 +0000)]
AnalysisConsumer: Explicitly destroy the PathDiagnosticClient at the end of HandleTranslationUnit to ensure that the client's destructor is called even with --disable-free.

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

15 years agomake "floating macro bubble" output of -emit-html much prettier:
Chris Lattner [Fri, 13 Feb 2009 00:51:30 +0000 (00:51 +0000)]
make "floating macro bubble" output of -emit-html much prettier:
only insert spaces between tokens if the code had them or if they
are actually required to avoid pasting.  This reuses the same
logic as -E mode.

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

15 years agoccc: Test case for transparent PTH support.
Daniel Dunbar [Fri, 13 Feb 2009 00:49:50 +0000 (00:49 +0000)]
ccc: Test case for transparent PTH support.

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

15 years agoccc: Stop patching output file name when using transparent PTH support.
Daniel Dunbar [Fri, 13 Feb 2009 00:49:01 +0000 (00:49 +0000)]
ccc: Stop patching output file name when using transparent PTH support.
<rdar://problem/6515236> [ccc] generate expected output files when used with PCH

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

15 years agofactor token concatenation avoidance logic out of
Chris Lattner [Fri, 13 Feb 2009 00:46:04 +0000 (00:46 +0000)]
factor token concatenation avoidance logic out of
PrintPreprocessedOutput into its own file.  No functionality change.

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

15 years agoThis test now passes.
Ted Kremenek [Fri, 13 Feb 2009 00:39:34 +0000 (00:39 +0000)]
This test now passes.

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

15 years agoAlways pass -disable-free to clang when compiling.
Daniel Dunbar [Fri, 13 Feb 2009 00:29:22 +0000 (00:29 +0000)]
Always pass -disable-free to clang when compiling.

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

15 years agoTighten checking of the "overloadable" attribute. If any function by a
Douglas Gregor [Fri, 13 Feb 2009 00:26:38 +0000 (00:26 +0000)]
Tighten checking of the "overloadable" attribute. If any function by a
given name in a given scope is marked as "overloadable", every
function declaration and definition with that same name and in that
same scope needs to have the "overloadable" attribute. Essentially,
the "overloadable" attribute is not part of attribute merging, so it
must be specified even for redeclarations. This keeps users from
trying to be too sneaky for their own good:

  double sin(double) __attribute__((overloadable)); // too sneaky
  #include <math.h>

Previously, this would have made "sin" overloadable, and therefore
given it a mangled name. Now, we get an error inside math.h when we
see a (re)declaration of "sin" that doesn't have the "overloadable"
attribute.

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

15 years agoAdd basic support for C++ name mangling according to the Itanium C++
Douglas Gregor [Fri, 13 Feb 2009 00:10:09 +0000 (00:10 +0000)]
Add basic support for C++ name mangling according to the Itanium C++
ABI to the CodeGen library. Since C++ code-generation is so
incomplete, we can't exercise much of this mangling code. However, a
few smoke tests show that it's doing the same thing as GCC. When C++
codegen matures, we'll extend the ABI tester to verify name-mangling
as well, and complete the implementation here.

At this point, the major client of name mangling is in the uses of the
new "overloadable" attribute in C, which allows overloading. Any
"overloadable" function in C (or in an extern "C" block in C++) will
be mangled the same way that the corresponding C++ function would be
mangled.

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

15 years agoHonor attribute section on static block var decls.
Daniel Dunbar [Thu, 12 Feb 2009 23:32:54 +0000 (23:32 +0000)]
Honor attribute section on static block var decls.

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

15 years agoFix limits.h for linux, as glibc does a #include_next unless
Mike Stump [Thu, 12 Feb 2009 23:06:31 +0000 (23:06 +0000)]
Fix limits.h for linux, as glibc does a #include_next unless
_GCC_LIMITS_H_ is defined, when __GNUC__ is defined.

Also, we need to stay away from possible conflicts with header guards.
We should use CLANG_ to prefix all header guards.

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

15 years agoFix assertion when input is an empty string.
Daniel Dunbar [Thu, 12 Feb 2009 19:31:53 +0000 (19:31 +0000)]
Fix assertion when input is an empty string.

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

15 years agoAdd missing test for the "overloadable" attribute
Douglas Gregor [Thu, 12 Feb 2009 19:25:19 +0000 (19:25 +0000)]
Add missing test for the "overloadable" attribute

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

15 years agoFix <rdar://problem/6499801> clang does not detect objc type mismatch in conditional...
Steve Naroff [Thu, 12 Feb 2009 19:05:07 +0000 (19:05 +0000)]
Fix <rdar://problem/6499801> clang does not detect objc type mismatch in conditional expr

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

15 years agoFix a bug with designated initializers where we were stepping out of a
Douglas Gregor [Thu, 12 Feb 2009 19:00:39 +0000 (19:00 +0000)]
Fix a bug with designated initializers where we were stepping out of a
union subobject initialization before checking whether the next
initiailizer was actually a designated initializer. This led to
spurious "excess elements in union initializer" errors. Thanks to
rdivacky for reporting the bug!

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

15 years agoFix a bug whereby, an ivar used to synthesize a property belongs
Fariborz Jahanian [Thu, 12 Feb 2009 18:51:23 +0000 (18:51 +0000)]
Fix a bug whereby, an ivar used to synthesize a property belongs
to a base class (nonfragile abi ir gen bug).

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

15 years agoInitial codegen for block literals. This is a work in progress. I've
Mike Stump [Thu, 12 Feb 2009 18:29:15 +0000 (18:29 +0000)]
Initial codegen for block literals.  This is a work in progress.  I've
tried to put FIXMEs on the most important things to fix up.  Lots left
to do including more codegen, more documentation and cleaning code and
style cleanups.

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

15 years agoSema::ActOnObjCAtThrowStmt(): return from recently added errors. Thanks Chris!
Steve Naroff [Thu, 12 Feb 2009 18:09:32 +0000 (18:09 +0000)]
Sema::ActOnObjCAtThrowStmt(): return from recently added errors. Thanks Chris!

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

15 years agoAdd a very basic implemenation of global blocks. This needs to be cleaned up.
Anders Carlsson [Thu, 12 Feb 2009 17:55:02 +0000 (17:55 +0000)]
Add a very basic implemenation of global blocks. This needs to be cleaned up.

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

15 years agoMake nonfragile-abi the default for darwin's 64bit
Fariborz Jahanian [Thu, 12 Feb 2009 17:54:33 +0000 (17:54 +0000)]
Make nonfragile-abi the default for darwin's 64bit
abi for objective-c programs.

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

15 years agoSeveral cleanups:
Steve Naroff [Thu, 12 Feb 2009 17:52:19 +0000 (17:52 +0000)]
Several cleanups:
- rename isObjCIdType/isObjCClassType -> isObjCIdStructType/isObjCClassStructType. The previous name didn't do what you would expect.
- add back isObjCIdType/isObjCClassType to do what you would expect. Not currently used, however many of the isObjCIdStructType/isObjCClassStructType clients could be converted over time.
- move static Sema function areComparableObjCInterfaces to ASTContext (renamed to areComparableObjCPointerTypes, since it now operates on pointer types).

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

15 years agoSupport __attribute__(section(<name>))
Daniel Dunbar [Thu, 12 Feb 2009 17:28:23 +0000 (17:28 +0000)]
Support __attribute__(section(<name>))

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

15 years agoTurn warning into error. Minor incompatibility with GCC (for scalar types, GCC only...
Steve Naroff [Thu, 12 Feb 2009 15:54:59 +0000 (15:54 +0000)]
Turn warning into error. Minor incompatibility with GCC (for scalar types, GCC only produces a warning).

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

15 years agoFix va_arg bug noticed by Eli, __builtin_va_arg is not an l-value
Daniel Dunbar [Thu, 12 Feb 2009 09:21:08 +0000 (09:21 +0000)]
Fix va_arg bug noticed by Eli, __builtin_va_arg is not an l-value
designating an object.

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

15 years agox86_64: Initial varargs support.
Daniel Dunbar [Thu, 12 Feb 2009 09:04:14 +0000 (09:04 +0000)]
x86_64: Initial varargs support.
 - Doesn't yet handle case where values are passed in mixed (general
   purpose & floating point) registers; otherwise largely
   functional. Code still needs some cleaning.

Fixes:
MultiSource/Applications/lua/lua
MultiSource/Applications/siod/siod
MultiSource/Applications/sqlite3/sqlite3
SingleSource/Regression/C/PR640
SingleSource/UnitTests/2003-07-09-SignedArgs
SingleSource/UnitTests/2007-03-02-VaCopy

gcc compat test suite results (Darwin x86-32 & -64):
--
# of expected passes 1262
# of unexpected failures 56
# of unresolved testcases 34
# of unsupported tests 2

Compare to: http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20090209/012050.html

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

15 years agoTest case for emitting va_arg as l-value; apparently I only *thought* I had committed...
Daniel Dunbar [Thu, 12 Feb 2009 08:41:10 +0000 (08:41 +0000)]
Test case for emitting va_arg as l-value; apparently I only *thought* I had committed this.

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

15 years agoUpdate checker build.
Ted Kremenek [Thu, 12 Feb 2009 07:09:27 +0000 (07:09 +0000)]
Update checker build.

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

15 years agoRe-enable PTH stat caching. All tests pass now.
Ted Kremenek [Thu, 12 Feb 2009 03:45:39 +0000 (03:45 +0000)]
Re-enable PTH stat caching.  All tests pass now.

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

15 years agoFix bad reading of bytes in ReadUnalignedLE64() (copy-paste error).
Ted Kremenek [Thu, 12 Feb 2009 03:39:55 +0000 (03:39 +0000)]
Fix bad reading of bytes in ReadUnalignedLE64() (copy-paste error).

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

15 years agoTemporarily disable PTH stat caching as it appears to be failing on some machines.
Ted Kremenek [Thu, 12 Feb 2009 03:36:54 +0000 (03:36 +0000)]
Temporarily disable PTH stat caching as it appears to be failing on some machines.

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

15 years agoPTH: Cache stat information for files in the PTH file. Hook up FileManager
Ted Kremenek [Thu, 12 Feb 2009 03:26:59 +0000 (03:26 +0000)]
PTH: Cache stat information for files in the PTH file.  Hook up FileManager
 to use this stat information in the PTH file using a 'StatSysCallCache' object.

Performance impact (Cocoa.h, PTH):
- number of stat calls reduces from 1230 to 425
- fsyntax-only: time improves by 4.2%

We can reduce the number of stat calls to almost zero by caching negative stat
calls and directory stat calls in the PTH file as well.

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

15 years agoFileManager:
Ted Kremenek [Thu, 12 Feb 2009 03:17:57 +0000 (03:17 +0000)]
FileManager:
- set the 'StatSysCallCache' object using a setter method instead of
  FileManager's constructor. This allows the cache to be installed after the
  FileManager object is created.
- Add 'file mode' to FileEntry (useful for stat caching)

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

15 years agoAdd tags; this is documented to work, just need the wiring to enable it.
Mike Stump [Thu, 12 Feb 2009 02:25:47 +0000 (02:25 +0000)]
Add tags; this is documented to work, just need the wiring to enable it.

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

15 years agofor now, disable all debug info generation at -O1 and above. This mirrors
Chris Lattner [Thu, 12 Feb 2009 01:50:58 +0000 (01:50 +0000)]
for now, disable all debug info generation at -O1 and above.  This mirrors
similar logic in llvm-gcc and will hopefully be fixed soon.

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

15 years agosearch and replaceo?
Chris Lattner [Thu, 12 Feb 2009 01:37:35 +0000 (01:37 +0000)]
search and replaceo?

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

15 years agoAdd test for overloading with _Complex in C
Douglas Gregor [Thu, 12 Feb 2009 00:57:03 +0000 (00:57 +0000)]
Add test for overloading with _Complex in C

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

15 years agoAdd support for generating block call expressions.
Anders Carlsson [Thu, 12 Feb 2009 00:39:25 +0000 (00:39 +0000)]
Add support for generating block call expressions.

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

15 years agoAdd lightweight shim "clang::StatSysCallCache" that caches 'stat' system calls
Ted Kremenek [Thu, 12 Feb 2009 00:39:05 +0000 (00:39 +0000)]
Add lightweight shim "clang::StatSysCallCache" that caches 'stat' system calls
for use by FileManager. FileManager now takes a StatSysCallCache* in its
constructor (which defaults to NULL). This will be used for evaluating whether
or not caching 'stat' system calls in PTH is a performance win. This shim adds
no observable performance impact in the case where the 'StatSysCallCache*' is
null.

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

15 years agoExpand the definition of a complex promotion to include complex ->
Douglas Gregor [Thu, 12 Feb 2009 00:26:06 +0000 (00:26 +0000)]
Expand the definition of a complex promotion to include complex ->
complex conversions where the conversion between the real types is an
integral promotion. This is how G++ handles complex promotions for its
complex integer extension.

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

15 years agoIntroduce _Complex conversions into the function overloading
Douglas Gregor [Thu, 12 Feb 2009 00:15:05 +0000 (00:15 +0000)]
Introduce _Complex conversions into the function overloading
system. Since C99 doesn't have overloading and C++ doesn't have
_Complex, there is no specification for    this. Here's what I think
makes sense.

Complex conversions come in several flavors:

  - Complex promotions:  a complex -> complex   conversion where the
    underlying real-type conversion is a floating-point promotion. GCC
    seems to call this a promotion, EDG does something else. This is
    given "promotion" rank for determining the best viable function.
  - Complex conversions: a complex -> complex conversion that is
    not a complex promotion. This is given "conversion" rank for
    determining the best viable   function.
  - Complex-real conversions: a real -> complex or complex -> real
    conversion. This is given "conversion" rank for determining the
    best viable function.

These rules are the same for C99 (when using the "overloadable"
attribute) and C++. However, there is one difference in the handling
of floating-point promotions: in C99, float -> long double and double
-> long double are considered promotions (so we give them "promotion"
rank), while C++ considers these conversions ("conversion" rank).

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

15 years agoLast @encode'ing fix for objc2's nonfragile abi.
Fariborz Jahanian [Wed, 11 Feb 2009 23:59:18 +0000 (23:59 +0000)]
Last @encode'ing fix for objc2's nonfragile abi.
All relevant dejagnu enocding tests pass in this mode.

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

15 years agoPTH: Have meta data be at the beginning of the PTH file, not the end.
Ted Kremenek [Wed, 11 Feb 2009 23:34:32 +0000 (23:34 +0000)]
PTH: Have meta data be at the beginning of the PTH file, not the end.

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

15 years agoFix comment.
Mike Stump [Wed, 11 Feb 2009 23:03:27 +0000 (23:03 +0000)]
Fix comment.

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

15 years agoInitial implementation of function overloading in C.
Douglas Gregor [Wed, 11 Feb 2009 23:02:49 +0000 (23:02 +0000)]
Initial implementation of function overloading in C.

This commit adds a new attribute, "overloadable", that enables C++
function overloading in C. The attribute can only be added to function
declarations, e.g.,

  int *f(int) __attribute__((overloadable));

If the "overloadable" attribute exists on a function with a given
name, *all* functions with that name (and in that scope) must have the
"overloadable" attribute. Sets of overloaded functions with the
"overloadable" attribute then follow the normal C++ rules for
overloaded functions, e.g., overloads must have different
parameter-type-lists from each other.

When calling an overloaded function in C, we follow the same
overloading rules as C++, with three extensions to the set of standard
conversions:

  - A value of a given struct or union type T can be converted to the
    type T. This is just the identity conversion. (In C++, this would
    go through a copy constructor).
  - A value of pointer type T* can be converted to a value of type U*
    if T and U are compatible types. This conversion has Conversion
    rank (it's considered a pointer conversion in C).
  - A value of type T can be converted to a value of type U if T and U
    are compatible (and are not both pointer types). This conversion
    has Conversion rank (it's considered to be a new kind of
    conversion unique to C, a "compatible" conversion).

Known defects (and, therefore, next steps):
  1) The standard-conversion handling does not understand conversions
  involving _Complex or vector extensions, so it is likely to get
  these wrong. We need to add these conversions.
  2) All overloadable functions with the same name will have the same
  linkage name, which means we'll get a collision in the linker (if
  not sooner). We'll need to mangle the names of these functions.

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

15 years agoPatch to fix encoding in 64bit abi. With this patch
Fariborz Jahanian [Wed, 11 Feb 2009 22:31:45 +0000 (22:31 +0000)]
Patch to fix encoding in 64bit abi. With this patch
all but one dejagnu encoding tests for darwin
pass in nonfragile abi mode.

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

15 years agoUse EmitVAListRef instead of EmitLValue directly to handle array decay
Daniel Dunbar [Wed, 11 Feb 2009 22:25:55 +0000 (22:25 +0000)]
Use EmitVAListRef instead of EmitLValue directly to handle array decay
case on x86_64.

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

15 years agoRemove some non-ascii characters. Thanks Gabor.
Steve Naroff [Wed, 11 Feb 2009 22:01:48 +0000 (22:01 +0000)]
Remove some non-ascii characters. Thanks Gabor.

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

15 years agoPTH: Replace string identifier to persistent ID lookup with a hashtable. This is
Ted Kremenek [Wed, 11 Feb 2009 21:29:16 +0000 (21:29 +0000)]
PTH: Replace string identifier to persistent ID lookup with a hashtable. This is
actually *slightly* slower than the binary search. Since this is algorithmically
better, further performance tuning should be able to make this faster.

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

15 years agoSupport IRgen of va_arg of structure as l-value.
Daniel Dunbar [Wed, 11 Feb 2009 20:59:32 +0000 (20:59 +0000)]
Support IRgen of va_arg of structure as l-value.

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

15 years agoir-gen for objc's @selector expression in nonfragile abi mode.
Fariborz Jahanian [Wed, 11 Feb 2009 20:51:17 +0000 (20:51 +0000)]
ir-gen for objc's @selector expression in nonfragile abi mode.

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

15 years agoAppease the language lawyers
Douglas Gregor [Wed, 11 Feb 2009 20:46:19 +0000 (20:46 +0000)]
Appease the language lawyers

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

15 years agoFix <rdar://problem/6505139> [clang on growl]: need to allow unnamed selectors as...
Steve Naroff [Wed, 11 Feb 2009 20:43:13 +0000 (20:43 +0000)]
Fix <rdar://problem/6505139> [clang on growl]: need to allow unnamed selectors as the first argument

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

15 years agoFix <rdar://problem/6243503> [sema] @throw; accepted outside catch block.
Steve Naroff [Wed, 11 Feb 2009 20:05:44 +0000 (20:05 +0000)]
Fix <rdar://problem/6243503> [sema] @throw; accepted outside catch block.

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

15 years agoFinished semantic analysis of non-type template arguments, to check
Douglas Gregor [Wed, 11 Feb 2009 19:52:55 +0000 (19:52 +0000)]
Finished semantic analysis of non-type template arguments, to check
for non-external names whose address becomes the template
argument. This completes C++ [temp.arg.nontype]p1.

Note that our interpretation of C++ [temp.arg.nontype]p1b3 differs
from EDG's interpretation (we're stricter, and GCC agrees with
us). They're opening a core issue about the matter.

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

15 years agoAvoid bogus warning.
Mike Stump [Wed, 11 Feb 2009 18:58:46 +0000 (18:58 +0000)]
Avoid bogus warning.

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

15 years agoReverted r64307. Moved hasSameType and hasSameUnqualifiedType from
Douglas Gregor [Wed, 11 Feb 2009 18:22:40 +0000 (18:22 +0000)]
Reverted r64307. Moved hasSameType and hasSameUnqualifiedType from
Sema to ASTContext.

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

15 years agoAllow the use of default template arguments when forming a class
Douglas Gregor [Wed, 11 Feb 2009 18:16:40 +0000 (18:16 +0000)]
Allow the use of default template arguments when forming a class
template specialization (e.g., std::vector<int> would now be
well-formed, since it relies on a default argument for the Allocator
template parameter).

This is much less interesting than one might expect, since (1) we're
not actually using the default arguments for anything important, such
as naming an actual Decl, and (2) we'll often need to instantiate the
default arguments to check their well-formedness. The real fun will
come later.

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

15 years agoFix <rdar://problem/6206858> [sema] type check @throw statements.
Steve Naroff [Wed, 11 Feb 2009 17:45:08 +0000 (17:45 +0000)]
Fix <rdar://problem/6206858> [sema] type check @throw statements.

Added a FIXME to handle 'rethrow' check.

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

15 years agoRename Sema::hasSameType to QualType::isSameAs
Douglas Gregor [Wed, 11 Feb 2009 16:47:37 +0000 (16:47 +0000)]
Rename Sema::hasSameType to QualType::isSameAs
Rename Sema::hasSameUnqualifiedType to QualType::isSameIgnoringQalifiers

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

15 years agoSilence a warning about an unused variable in -Asserts builds
Douglas Gregor [Wed, 11 Feb 2009 16:17:49 +0000 (16:17 +0000)]
Silence a warning about an unused variable in -Asserts builds

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

15 years agoImplement semantic checking for template arguments that correspond to
Douglas Gregor [Wed, 11 Feb 2009 16:16:59 +0000 (16:16 +0000)]
Implement semantic checking for template arguments that correspond to
pointer-to-member-data non-type template parameters. Also, get
consistent about what it means to returned a bool from
CheckTemplateArgument.

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

15 years agoPTH: Don't emit the PTH offset of the IdentifierInfo string data as that data is
Ted Kremenek [Wed, 11 Feb 2009 16:06:55 +0000 (16:06 +0000)]
PTH: Don't emit the PTH offset of the IdentifierInfo string data as that data is
referenced by other tables.

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

15 years agoUpdate checker build.
Ted Kremenek [Wed, 11 Feb 2009 07:50:23 +0000 (07:50 +0000)]
Update checker build.

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

15 years agoFix rdar://6518463, increment of a bool is always true, due to
Chris Lattner [Wed, 11 Feb 2009 07:40:06 +0000 (07:40 +0000)]
Fix rdar://6518463, increment of a bool is always true, due to
subtle and non-obvious promotion rules.  We already handle +=
and +1 correctly.

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

15 years agofinish off codegen support for sub of pointer to functions,
Chris Lattner [Wed, 11 Feb 2009 07:21:43 +0000 (07:21 +0000)]
finish off codegen support for sub of pointer to functions,
finishing off rdar://6520707

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

15 years agoPer PR 3187, disable the missing -dealloc check for classes that subclass SenTestCase.
Ted Kremenek [Wed, 11 Feb 2009 07:10:07 +0000 (07:10 +0000)]
Per PR 3187, disable the missing -dealloc check for classes that subclass SenTestCase.

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

15 years agoAdd pmmintrin.h header.
Anders Carlsson [Wed, 11 Feb 2009 06:39:50 +0000 (06:39 +0000)]
Add pmmintrin.h header.

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

15 years agoFix some mistakes I made when I tried to decipher the Intel documentation of the...
Anders Carlsson [Wed, 11 Feb 2009 06:29:32 +0000 (06:29 +0000)]
Fix some mistakes I made when I tried to decipher the Intel documentation of the MXCSR register

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