]> granicus.if.org Git - clang/log
clang
12 years agoSimplify {Record,Enum}Type::classof.
Peter Collingbourne [Thu, 26 Jan 2012 03:33:46 +0000 (03:33 +0000)]
Simplify {Record,Enum}Type::classof.

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

12 years agoAdjust CLANG_BUILD_EXAMPLES to mean whether the examples are built
Peter Collingbourne [Thu, 26 Jan 2012 03:33:40 +0000 (03:33 +0000)]
Adjust CLANG_BUILD_EXAMPLES to mean whether the examples are built
by default, rather than whether they may be built at all.

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

12 years agoUse function pointers, rather than references, to pass Destroyers
Peter Collingbourne [Thu, 26 Jan 2012 03:33:36 +0000 (03:33 +0000)]
Use function pointers, rather than references, to pass Destroyers
around, in the process cleaning up the various gcc/msvc compiler
workarounds.

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

12 years agoAdd missing include of <unistd.h>
Douglas Gregor [Thu, 26 Jan 2012 03:20:14 +0000 (03:20 +0000)]
Add missing include of <unistd.h>

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

12 years agoAdd an additional testcase for a lambda with implicit void return type.
Eli Friedman [Thu, 26 Jan 2012 03:16:41 +0000 (03:16 +0000)]
Add an additional testcase for a lambda with implicit void return type.

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

12 years agoPost link to checker-260, which is checker-259 with some experimental checks enabled.
Ted Kremenek [Thu, 26 Jan 2012 03:02:34 +0000 (03:02 +0000)]
Post link to checker-260, which is checker-259 with some experimental checks enabled.

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

12 years agoRefactor to share code for handling return statements between lambda expressions...
Eli Friedman [Thu, 26 Jan 2012 03:00:14 +0000 (03:00 +0000)]
Refactor to share code for handling return statements between lambda expressions and block literals.  As it turns out, almost all the logic can be shared.

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

12 years agoIntroduce 3 new fixit options:
Argyrios Kyrtzidis [Thu, 26 Jan 2012 02:40:48 +0000 (02:40 +0000)]
Introduce 3 new fixit options:

-fixit-recompile
applies fixits and recompiles the result
-fixit-to-temporary
applies fixits to temporary files
-fix-only-warnings">,
    applies fixits for warnings only, not errors

Combining "-fixit-recompile -fixit-to-temporary" allows testing the result of fixits
without touching the original sources.

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

12 years agofix to go along with an llvm change: VMCore now returns an UndefValue
Chris Lattner [Thu, 26 Jan 2012 02:33:22 +0000 (02:33 +0000)]
fix to go along with an llvm change: VMCore now returns an UndefValue
when asking for a ConstantStruct with all undef elements.

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

12 years agoEnable several checkers under --analyze for general testing.
Ted Kremenek [Thu, 26 Jan 2012 02:27:38 +0000 (02:27 +0000)]
Enable several checkers under --analyze for general testing.

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

12 years agoTidy and remove some unused variables.
Eric Christopher [Thu, 26 Jan 2012 02:05:28 +0000 (02:05 +0000)]
Tidy and remove some unused variables.

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

12 years agoFix our handling of #pragma GCC visibility.
Rafael Espindola [Thu, 26 Jan 2012 02:02:57 +0000 (02:02 +0000)]
Fix our handling of #pragma GCC visibility.
Now the lexer just produces a token and the parser is the one responsible for
activating it.
This fixes problem like the one pr11797 where the lexer and the parser were not
in sync. This also let us be more strict on where in the file we accept
these pragmas.

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

12 years agoCollect this information together. No reason to have it split.
Eric Christopher [Thu, 26 Jan 2012 01:57:29 +0000 (01:57 +0000)]
Collect this information together. No reason to have it split.

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

12 years agoRefactor into its own function.
Eric Christopher [Thu, 26 Jan 2012 01:57:13 +0000 (01:57 +0000)]
Refactor into its own function.

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

12 years agoReintroduce r148981 with significantly improved regression test. Now it
Chandler Carruth [Thu, 26 Jan 2012 01:35:15 +0000 (01:35 +0000)]
Reintroduce r148981 with significantly improved regression test. Now it
both actually tests what it wants to, doesn't have bogus and broken
assertions in it, and is also formatted much more cleanly and
consistently. Probably still some more that can be improved here, but
its much better.

Original commit message:
----
Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
inside a 64-bit freebsd machine with the 32-bit compatibility layer
installed. The FreeBSD image always has the /usr/lib32 directory, so
test for the more concrete existence of crt1.o. Also enhance the tests
for freebsd to clarify what these trees look like and exercise the new
code.

Thanks to all the FreeBSD folks for helping me understand what caused
the failure and how we might fix it. =] That helps a lot. Also, yay
build bots.

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

12 years agoStaticAnalyzer/Checkers: Fix CMake build.
NAKAMURA Takumi [Thu, 26 Jan 2012 01:14:39 +0000 (01:14 +0000)]
StaticAnalyzer/Checkers: Fix CMake build.

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

12 years ago[analyzer] Add an AST checker that checks for a common pitfall when
Anna Zaks [Thu, 26 Jan 2012 01:05:43 +0000 (01:05 +0000)]
[analyzer] Add an AST checker that checks for a common pitfall when
using CFArrayCreate & family.

Specifically, CFArrayCreate's input should be:
'A C array of the pointer-sized values to be in the new array.'

(radar://10717339)

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

12 years agoobjc: allow block pointer matching 'id' type when
Fariborz Jahanian [Thu, 26 Jan 2012 00:45:38 +0000 (00:45 +0000)]
objc: allow block pointer matching 'id' type when
they show up as argument types of two block pointers.
// rdar://10734265

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

12 years agoSlight refactoring; catch yet another case where we were missing an lvalue-to-rvalue...
Eli Friedman [Thu, 26 Jan 2012 00:26:18 +0000 (00:26 +0000)]
Slight refactoring; catch yet another case where we were missing an lvalue-to-rvalue conversion.

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

12 years agoarc migrator: Added an option to the migrator
Fariborz Jahanian [Thu, 26 Jan 2012 00:08:04 +0000 (00:08 +0000)]
arc migrator: Added an option to the migrator
unused yet.

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

12 years agoRework flushing of diagnostics to PathDiagnosticConsumer. Now all the reports are...
Ted Kremenek [Wed, 25 Jan 2012 23:47:14 +0000 (23:47 +0000)]
Rework flushing of diagnostics to PathDiagnosticConsumer.  Now all the reports are batched up before being flushed
to the underlying consumer implementation.  This allows us to unique reports across analyses to multiple functions (which
shows up with inlining).

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

12 years agoDon't stack-allocate an IntegerLiteral which can be referred to after the current...
Eli Friedman [Wed, 25 Jan 2012 23:20:27 +0000 (23:20 +0000)]
Don't stack-allocate an IntegerLiteral which can be referred to after the current method returns.  PR11744, part 2.

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

12 years agoRevert r148981 because it fails test/Driver/freebsd.c
Argyrios Kyrtzidis [Wed, 25 Jan 2012 22:55:16 +0000 (22:55 +0000)]
Revert r148981 because it fails test/Driver/freebsd.c

Original log:

Author: chandlerc <chandlerc@91177308-0d34-0410-b5e6-96231b3b80d8>
Date:   Wed Jan 25 21:32:31 2012 +0000

    Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
    inside a 64-bit freebsd machine with the 32-bit compatibility layer
    installed. The FreeBSD image always has the /usr/lib32 directory, so
    test for the more concrete existence of crt1.o. Also enhance the tests
    for freebsd to clarify what these trees look like and exercise the new
    code.

    Thanks to all the FreeBSD folks for helping me understand what caused
    the failure and how we might fix it. =] That helps a lot. Also, yay
    build bots.

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

12 years agoAdd some ABI tweaks for i386-pc-win32 triple so that we return structs in an MSVC...
Eli Friedman [Wed, 25 Jan 2012 22:46:34 +0000 (22:46 +0000)]
Add some ABI tweaks for i386-pc-win32 triple so that we return structs in an MSVC-compatible way.  Patch by Joe Groff.

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

12 years agoImprove the error message slightly for files that aren't using the expected UTF-8...
Eli Friedman [Wed, 25 Jan 2012 22:34:12 +0000 (22:34 +0000)]
Improve the error message slightly for files that aren't using the expected UTF-8 encoding.  Patch by Seth Cantrell.

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

12 years agoFix a crash involving a multi-dimensional dependent VLA. PR11744.
Eli Friedman [Wed, 25 Jan 2012 22:19:07 +0000 (22:19 +0000)]
Fix a crash involving a multi-dimensional dependent VLA.  PR11744.

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

12 years agoPost open source analyzer build checker-259.
Ted Kremenek [Wed, 25 Jan 2012 22:18:04 +0000 (22:18 +0000)]
Post open source analyzer build checker-259.

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

12 years agoconstexpr: add support for anonymous struct and union members in literal types.
Richard Smith [Wed, 25 Jan 2012 22:15:11 +0000 (22:15 +0000)]
constexpr: add support for anonymous struct and union members in literal types.

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

12 years agoClean up comment.
Eric Christopher [Wed, 25 Jan 2012 21:47:09 +0000 (21:47 +0000)]
Clean up comment.

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

12 years agoTry to unbreak the FreeBSD toolchain's detection of 32-bit targets
Chandler Carruth [Wed, 25 Jan 2012 21:32:31 +0000 (21:32 +0000)]
Try to unbreak the FreeBSD toolchain's detection of 32-bit targets
inside a 64-bit freebsd machine with the 32-bit compatibility layer
installed. The FreeBSD image always has the /usr/lib32 directory, so
test for the more concrete existence of crt1.o. Also enhance the tests
for freebsd to clarify what these trees look like and exercise the new
code.

Thanks to all the FreeBSD folks for helping me understand what caused
the failure and how we might fix it. =] That helps a lot. Also, yay
build bots.

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

12 years agoAllow typo correction to be disabled in BuildOverloadedCallExpr variant.
Kaelyn Uhrain [Wed, 25 Jan 2012 21:11:35 +0000 (21:11 +0000)]
Allow typo correction to be disabled in BuildOverloadedCallExpr variant.

This suppresses typo correction for auto-generated call expressions such
as to 'begin' or 'end' within a C++0x for-range statement.

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

12 years agoRestore a tiny bit of functionality that I completely overlooked in the
Chandler Carruth [Wed, 25 Jan 2012 21:03:58 +0000 (21:03 +0000)]
Restore a tiny bit of functionality that I completely overlooked in the
Linux toolchain selection -- sorry folks. =] This should fix the Hexagon
toolchain.

However, I would point out that I see why my testing didn't catch this
-- we have no tests for Hexagon. ;]

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

12 years agoAvoid correcting unknown identifiers to types where types aren't allowed.
Kaelyn Uhrain [Wed, 25 Jan 2012 20:49:08 +0000 (20:49 +0000)]
Avoid correcting unknown identifiers to types where types aren't allowed.

Pass a typo correction callback object from ParseCastExpr to
Sema::ActOnIdExpression to be a bit more selective about what kinds of
corrections will be allowed for unknown identifiers.

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

12 years ago[driver] Do emit the diagnostics when CompilerInvocation::CreateFromArgs() fails.
Argyrios Kyrtzidis [Wed, 25 Jan 2012 20:00:43 +0000 (20:00 +0000)]
[driver] Do emit the diagnostics when CompilerInvocation::CreateFromArgs() fails.

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

12 years agoAdd custom callback object for typo correction in BuildRecoveryCallExpr.
Kaelyn Uhrain [Wed, 25 Jan 2012 18:37:44 +0000 (18:37 +0000)]
Add custom callback object for typo correction in BuildRecoveryCallExpr.

The new callback, in addition to limiting which keywords to include in
the pool of typo correction candidates, also filters out non-keyword
candidates that don't refer to (template) functions that accept the
number of arguments that are present for the call being recovered.

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

12 years agoWhen we're substituting into a function parameter pack and expect to
Douglas Gregor [Wed, 25 Jan 2012 16:15:54 +0000 (16:15 +0000)]
When we're substituting into a function parameter pack and expect to
get a function parameter pack (but don't due to weird substitutions),
complain. Fixes the last bit of PR11848.

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

12 years agoThe Linux pattern of adding all the search paths that exist doesn't seem
Chandler Carruth [Wed, 25 Jan 2012 11:24:24 +0000 (11:24 +0000)]
The Linux pattern of adding all the search paths that exist doesn't seem
to suit the FreeBSD folks. Take them back to something closer to the old
behavior. We test whether the /usr/lib32 directory exists (within the
SysRoot), and use it if so, otherwise use /usr/lib.

FreeBSD folks, let me know if this causes any problems, or if you have
further tweaks.

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

12 years agoRemove the 'ToolTriple' concept from the NetBSD toolchain along with my
Chandler Carruth [Wed, 25 Jan 2012 11:18:20 +0000 (11:18 +0000)]
Remove the 'ToolTriple' concept from the NetBSD toolchain along with my
gross hack to provide it from my previous patch removing HostInfo. This
was enshrining (and hiding from my searches) the concept of storing and
diff-ing the host and target triples. We don't have the host triple
reliably available, so we need to merely inspect the target system. I've
changed the logic in selecting library search paths for NetBSD to match
what I provided for FreeBSD -- we include both search paths, but put the
32-bit-on-64-bit-host path first so it trumps.

NetBSD maintainers, you may want to tweak this, or feel free to ask me
to tweak it. I've left a FIXME here about the challeng I see in fixing
this properly.

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

12 years agoDelete still more remnants of the now dead HostInfo. The janitoring will
Chandler Carruth [Wed, 25 Jan 2012 11:03:35 +0000 (11:03 +0000)]
Delete still more remnants of the now dead HostInfo. The janitoring will
continue until cleanliness improves.

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

12 years agoDelete the driver's HostInfo class. This abstraction just never really
Chandler Carruth [Wed, 25 Jan 2012 11:01:57 +0000 (11:01 +0000)]
Delete the driver's HostInfo class. This abstraction just never really
did anything. The two big pieces of functionality it tried to provide
was to cache the ToolChain objects for each target, and to figure out
the exact target based on the flag set coming in to an invocation.
However, it had a lot of flaws even with those goals:
 - Neither of these have anything to do with the host, or its info.
 - The HostInfo class was setup as a full blown class *hierarchy* with
   a separate implementation for each "host" OS. This required
   dispatching just to create the objects in the first place.
 - The hierarchy claimed to represent the host, when in fact it was
   based on the target OS.
 - Each leaf in the hierarchy was responsible for implementing the flag
   processing and caching, resulting in a *lot* of copy-paste code and
   quite a few bugs.
 - The caching was consistently done based on architecture alone, even
   though *any* aspect of the targeted triple might change the behavior
   of the configured toolchain.
 - Flag processing was already being done in the Driver proper,
   separating the flag handling even more than it already is.

Instead of this, we can simply have the dispatch logic in the Driver
which previously created a HostInfo object create the ToolChain objects.
Adding caching in the Driver layer is a tiny amount of code. Finally,
pulling the flag processing into the Driver puts it where it belongs and
consolidates it in one location.

The result is that two functions, and maybe 100 lines of new code
replace over 10 classes and 800 lines of code. Woot.

This also paves the way to introduce more detailed ToolChain objects for
various OSes without threading through a new HostInfo type as well, and
the accompanying boiler plate. That, of course, was the yak I started to
shave that began this entire refactoring escapade. Wheee!

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

12 years agoAdd some really minimalist freebsd testing trees and use them in the
Chandler Carruth [Wed, 25 Jan 2012 10:50:34 +0000 (10:50 +0000)]
Add some really minimalist freebsd testing trees and use them in the
freebsd test so that it's behavior isn't dependent on the filesystem of
the host running the tests. This should revive the build bots at least.
The tests and the trees still need a lot of love to make them as useful
and easy to maintain as linux-ld.c.

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

12 years agoAdd support for const pointer to literal-objc string as format attribute.
Jean-Daniel Dupas [Wed, 25 Jan 2012 10:35:33 +0000 (10:35 +0000)]
Add support for const pointer to literal-objc string as format attribute.

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

12 years agoSwitch the ToolChain types to all store a Driver reference rather than
Chandler Carruth [Wed, 25 Jan 2012 09:12:06 +0000 (09:12 +0000)]
Switch the ToolChain types to all store a Driver reference rather than
a HostInfo reference. Nothing about the HostInfo was used by any
toolchain except digging out the driver from it. This just makes that
a lot more direct. The change was accomplished entirely mechanically.
It's one step closer to removing the shim full of buggy copy/paste code
that is HostInfo.

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

12 years agotest/CodeGen/avx-builtins.c: Fix more for -Asserts.
NAKAMURA Takumi [Wed, 25 Jan 2012 09:11:21 +0000 (09:11 +0000)]
test/CodeGen/avx-builtins.c: Fix more for -Asserts.

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

12 years agoFixup r148926, for -Asserts.
NAKAMURA Takumi [Wed, 25 Jan 2012 08:58:21 +0000 (08:58 +0000)]
Fixup r148926, for -Asserts.

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

12 years agoRemove the TargetTriple object that I added to the Driver recently. This
Chandler Carruth [Wed, 25 Jan 2012 08:49:21 +0000 (08:49 +0000)]
Remove the TargetTriple object that I added to the Driver recently. This
helped stage the refactoring of things a bit, but really isn't the right
place for it. The driver may be responsible for compilations with many
different targets. In those cases, having a target triple in the driver
is actively misleading because for many of those compilations that is
not actually the triple being targeted.

This moves the last remaining users of the Driver's target triple to
instead use the ToolChain's target triple. The toolchain has a single,
concrete target it operates over, making this a more stable and natural
home for it.

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

12 years agoHave FreeBSD use even more of the same smarts as Linux is now using for
Chandler Carruth [Wed, 25 Jan 2012 08:10:33 +0000 (08:10 +0000)]
Have FreeBSD use even more of the same smarts as Linux is now using for
adding search paths. Add them only when they exist, and prefix the paths
with the sysroot. This will allow targeting a FreeBSD sysroot on
a non-FreeBSD host machine, and perhaps more importantly should allow
testing the FreeBSD driver's behavior similarly to the Linux tests with
a fake tree of files in the regression test suite.

I don't have FreeBSD systems handy to build up the list of files that
should be used here, but this is the basic functionality and I'm hoping
Roman or someone from the community can contribute the actual test
cases.

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

12 years agoSwitch FreeBSD to just include both '/usr/lib32' and '/usr/lib' in the
Chandler Carruth [Wed, 25 Jan 2012 08:04:15 +0000 (08:04 +0000)]
Switch FreeBSD to just include both '/usr/lib32' and '/usr/lib' in the
search paths for 32-bit targets. This avoids having to detect which is
expected for the target system, and the linker should DTRT, and take the
32-bit libraries from the first one when applicable. Thanks to Roman
Divacky for sanity checking this.

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

12 years agoSwitch the Linux C++ standard library header search logic over to use
Chandler Carruth [Wed, 25 Jan 2012 08:04:13 +0000 (08:04 +0000)]
Switch the Linux C++ standard library header search logic over to use
the GCC installation's multiarch suffix now that it is exposed.

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

12 years agoMake a major refactoring to how the GCC installation detection works.
Chandler Carruth [Wed, 25 Jan 2012 07:21:38 +0000 (07:21 +0000)]
Make a major refactoring to how the GCC installation detection works.

The fundamental shift here is to stop making *any* assumptions about the
*host* triple. Where these assumptions you ask? Why, they were in one of
the two target triples referenced of course. This was the single biggest
place where the previously named "host triple" was actually used as
such. ;] The reason we were reasoning about the host is in order to
detect the use of '-m32' or '-m64' flags to change the target. These
flags shift the default target only slightly, which typically means
a slight deviation from the host. When using these flags, the GCC
installation is under a different triple from the one actually targeted
in the compilation, and we used the host triple to find it.

Too bad that wasn't even correct. Consider an x86 Linux host which has
a PPC64 cross-compiling GCC toolchain installed. This toolchain is also
configured for multiarch compiling and can target PPC32 with eth '-m32'
flag. When targeting 'powerpc-linux-gnu' or some other PPC32 triple, we
have to look for the PPC64 variant of the triple to find the GCC
install, and that triple is neither the host nor target.

The new logic computes the multiarch's alternate triple from the target
triple, and looks under both sides. It also looks more aggressively for
the correct subdirectory of the GCC installation, and exposes the
subdirectory in a nice programmatic way. This '/32' or '/64' suffix is
something we can reuse in many other parts of the toolchain.

An important note -- while this likely fixes a large category of
cross-compile use cases, that's not my primary goal, and I've not done
testing (or added test cases) for scenarios that may now work. If
someone else wants to try more interesting PPC cross compiles, I'd love
to have reports. But my focus is on factoring away the references to the
"host" triple. The refactoring is my goal, and so I'm mostly relying on
the existing (pretty good) test coverage we have here.

Future patches will leverage this new functionality to factor out more
and more of the toolchain's triple manipulation.

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

12 years agoRe-enable test that was broken by r148919
Craig Topper [Wed, 25 Jan 2012 06:23:23 +0000 (06:23 +0000)]
Re-enable test that was broken by r148919

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

12 years agoFix -fmacro-backtrace-limit=0 to show the entire macro backtrace.
Ted Kremenek [Wed, 25 Jan 2012 06:07:15 +0000 (06:07 +0000)]
Fix -fmacro-backtrace-limit=0 to show the entire macro backtrace.

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

12 years agodisable this test for now.
Chris Lattner [Wed, 25 Jan 2012 05:38:06 +0000 (05:38 +0000)]
disable this test for now.

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

12 years agoreapply r148902:
Chris Lattner [Wed, 25 Jan 2012 05:34:41 +0000 (05:34 +0000)]
reapply r148902:

"use the new ConstantVector::getSplat method where it makes sense."

Also simplify a bunch of code to use the Builder->getInt32 instead
of doing it the hard and ugly way.  Much more progress could be made
here, but I don't plan to do it.

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

12 years agofix broken testcase.
Chris Lattner [Wed, 25 Jan 2012 05:29:46 +0000 (05:29 +0000)]
fix broken testcase.

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

12 years agoFix a crash for an edge case of the GNU ?: extension.
Eli Friedman [Wed, 25 Jan 2012 05:04:17 +0000 (05:04 +0000)]
Fix a crash for an edge case of the GNU ?: extension.

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

12 years agoFix r148920 to what I actually meant to commit.
Eli Friedman [Wed, 25 Jan 2012 04:35:06 +0000 (04:35 +0000)]
Fix r148920 to what I actually meant to commit.

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

12 years agoAdd missing check for placeholders.
Eli Friedman [Wed, 25 Jan 2012 04:29:24 +0000 (04:29 +0000)]
Add missing check for placeholders.

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

12 years agoRepresent 256-bit unaligned loads natively and remove the builtins. Similar change...
Craig Topper [Wed, 25 Jan 2012 04:26:17 +0000 (04:26 +0000)]
Represent 256-bit unaligned loads natively and remove the builtins. Similar change was made for 128-bit versions a while back.

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

12 years agoIn TreeTransform<Derived>::TransformBlockExpr, call ActOnBlockError for errors,
Argyrios Kyrtzidis [Wed, 25 Jan 2012 03:53:04 +0000 (03:53 +0000)]
In TreeTransform<Derived>::TransformBlockExpr, call ActOnBlockError for errors,
patch by Dmitri Gribenko.

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

12 years agoRevert 148902 which was part of 148901 which was reverted in r148906.
Argyrios Kyrtzidis [Wed, 25 Jan 2012 02:58:12 +0000 (02:58 +0000)]
Revert 148902 which was part of 148901 which was reverted in r148906.

Original log:
 use the new ConstantVector::getSplat method where it makes sense.

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

12 years agoFix PR11848: decree that an alias template contains an unexpanded parameter pack
Richard Smith [Wed, 25 Jan 2012 02:14:59 +0000 (02:14 +0000)]
Fix PR11848: decree that an alias template contains an unexpanded parameter pack
iff its substitution contains an unexpanded parameter pack. This has the effect
that we now reject declarations such as this (which we used to crash when
expanding):

  template<typename T> using Int = int;
  template<typename ...Ts> void f(Int<Ts> ...ints);

The standard is inconsistent on how this case should be treated.

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

12 years agoRefactor the record decl forward declaration code a bit.
Eric Christopher [Wed, 25 Jan 2012 02:06:59 +0000 (02:06 +0000)]
Refactor the record decl forward declaration code a bit.

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

12 years agoTypo.
Eric Christopher [Wed, 25 Jan 2012 02:06:52 +0000 (02:06 +0000)]
Typo.

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

12 years agouse the new ConstantVector::getSplat method where it makes sense.
Chris Lattner [Wed, 25 Jan 2012 02:06:10 +0000 (02:06 +0000)]
use the new ConstantVector::getSplat method where it makes sense.

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

12 years agoWith a little more work in the tentative parse determining whether a statement
Nick Lewycky [Wed, 25 Jan 2012 01:19:14 +0000 (01:19 +0000)]
With a little more work in the tentative parse determining whether a statement
is a declaration-stmt or an expression, we can discern a subset of cases where
the user erred in omitting the typename keyword before a dependent type name.
Fixes PR11358!

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

12 years agoIntroduce a generation number for selector lookups in the global
Douglas Gregor [Wed, 25 Jan 2012 01:14:32 +0000 (01:14 +0000)]
Introduce a generation number for selector lookups in the global
method pool, so that we don't perform the same lookups into the same
PCH/module file repeatedly.

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

12 years agoOnly try to import a definition if there is an definition to import.
Douglas Gregor [Wed, 25 Jan 2012 01:13:20 +0000 (01:13 +0000)]
Only try to import a definition if there is an definition to import.

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

12 years agoMake sure we correctly treat __is_convertible_to as an unevaluated context. PR11833.
Eli Friedman [Wed, 25 Jan 2012 01:05:57 +0000 (01:05 +0000)]
Make sure we correctly treat __is_convertible_to as an unevaluated context.  PR11833.

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

12 years agoFix test on cygwin (where va_list expands to a different type)
Jean-Daniel Dupas [Wed, 25 Jan 2012 01:02:26 +0000 (01:02 +0000)]
Fix test on cygwin (where va_list expands to a different type)

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

12 years agoWhenever Sema attempts to look in the global method pool, try to load
Douglas Gregor [Wed, 25 Jan 2012 00:59:09 +0000 (00:59 +0000)]
Whenever Sema attempts to look in the global method pool, try to load
additional data from the external Sema source. This properly copes
with modules that are imported after we have already searched in the
global method pool for a given selector. For PCH, it's a slight
pessimization to be fixed soon.

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

12 years agoAdd "multiple format attributes" support on block.
Jean-Daniel Dupas [Wed, 25 Jan 2012 00:55:11 +0000 (00:55 +0000)]
Add "multiple format attributes" support on block.

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

12 years agoRework the external Sema source's ReadMethodPool() so that it doesn't
Douglas Gregor [Wed, 25 Jan 2012 00:49:42 +0000 (00:49 +0000)]
Rework the external Sema source's ReadMethodPool() so that it doesn't
return pre-built lists. Instead, it feeds the methods it deserializes
to Sema so that Sema can unique them, which keeps the chains shorter.

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

12 years agoReduce peak memory usage of the static analyzer on sqlite3 (when using inlining)...
Ted Kremenek [Wed, 25 Jan 2012 00:35:05 +0000 (00:35 +0000)]
Reduce peak memory usage of the static analyzer on sqlite3 (when using inlining) by 30%.

This is accomplished by periodically reclaiming nodes in the graph.  This was an optimization
done before the CFG was linearized, but the CFG linearization destroyed that optimization since each
freshly created node couldn't be reclaimed and we only looked at a window of nodes created between
each ProcessStmt.  This optimization can be reclaimed my merely expanding the window to N number of nodes.

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

12 years agoarc migrator: Provide infrastructure to add options
Fariborz Jahanian [Wed, 25 Jan 2012 00:20:29 +0000 (00:20 +0000)]
arc migrator: Provide infrastructure to add options
specific to migrator. Use its first option to
warn migrating from GC to arc when
NSAllocateCollectable/NSReallocateCollectable is used.
// rdar://10532541

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

12 years agoFactor out the addition of a method into the global method pool, and
Douglas Gregor [Wed, 25 Jan 2012 00:19:56 +0000 (00:19 +0000)]
Factor out the addition of a method into the global method pool, and
teach it to always add the new method at the *end* of the list rather
than as the second element in the list.

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

12 years agoFix NSLog format string checking for %@.
Ted Kremenek [Wed, 25 Jan 2012 00:04:09 +0000 (00:04 +0000)]
Fix NSLog format string checking for %@.

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

12 years agoSwitch PerformImplicitConversion over to use DefaultLvalueConversion for lvalue-to...
Eli Friedman [Tue, 24 Jan 2012 22:51:26 +0000 (22:51 +0000)]
Switch PerformImplicitConversion over to use DefaultLvalueConversion for lvalue-to-rvalue conversion.

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

12 years agoReplace a hack to handle NSLog/NSLogv in sema by declaring them as Library Builtins.
Jean-Daniel Dupas [Tue, 24 Jan 2012 22:32:46 +0000 (22:32 +0000)]
Replace a hack to handle NSLog/NSLogv in sema by declaring them as Library Builtins.

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

12 years agoRemove trailing slash in front of header name of ObjC builtins.
Jean-Daniel Dupas [Tue, 24 Jan 2012 22:29:27 +0000 (22:29 +0000)]
Remove trailing slash in front of header name of ObjC builtins.

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

12 years ago[analyzer] Add the HTML file to the SATest diagnostic diff.
Anna Zaks [Tue, 24 Jan 2012 21:57:35 +0000 (21:57 +0000)]
[analyzer] Add the HTML file to the SATest diagnostic diff.
(Uses the functionality which has been in CmpRuns long before.)

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

12 years ago[analyzer] Testing: make diagnostic diffs more informative (add
Anna Zaks [Tue, 24 Jan 2012 21:57:32 +0000 (21:57 +0000)]
[analyzer] Testing: make diagnostic diffs more informative (add
diagnostic message).

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

12 years ago[libclang] In clang::getCursorKindForDecl() don't return "UnexposedDecl"
Argyrios Kyrtzidis [Tue, 24 Jan 2012 21:39:26 +0000 (21:39 +0000)]
[libclang] In clang::getCursorKindForDecl() don't return "UnexposedDecl"
for forward references of classes and protocols, this breaks libclang API usage.

rdar://10747438.

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

12 years agoTeach scanf/printf checking about '%Ld' and friends (a GNU extension). Fixes PR...
Ted Kremenek [Tue, 24 Jan 2012 21:29:54 +0000 (21:29 +0000)]
Teach scanf/printf checking about '%Ld' and friends (a GNU extension).  Fixes PR 9466.

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

12 years agoForce triple on these tests to pacify the windows tester.
Nick Lewycky [Tue, 24 Jan 2012 21:28:47 +0000 (21:28 +0000)]
Force triple on these tests to pacify the windows tester.

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

12 years agoAdd a new warning, -Wover-aligned, which detects attempts to use the default
Nick Lewycky [Tue, 24 Jan 2012 21:15:41 +0000 (21:15 +0000)]
Add a new warning, -Wover-aligned, which detects attempts to use the default
allocator to construct an object which declares more alignment than the default
allocator actually provides. Fixes PR9527!

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

12 years agoFix one of the (larger) FIXMEs where we were misusing the Driver's idea
Chandler Carruth [Tue, 24 Jan 2012 20:08:17 +0000 (20:08 +0000)]
Fix one of the (larger) FIXMEs where we were misusing the Driver's idea
of the target triple to stand in for the "host" triple.

Thanks to a great conversation with Richard Smith, I'm now much more
confident in how this is proceeding. In all of the places where we
currently reason about the "host" architecture or triple, what we really
want to reason about in the detected GCC installation architecture or
triple, and the ways in which that differs from the target. When we find
a GCC installation with a different triple from our target *but capable
of targeting our target* through an option such as '-m64', we want to
detect *that* case and change the paths within the GCC installation (and
libstdc++ installation) to reflect this difference.

This patch makes one function do this correctly. Subsequent commits will
hoist the logic used here into the GCCInstallation utility, and then
reuse it through the rest of the toolchains to fix the remaining places
where this is currently happening.

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

12 years agoSmall code cleanup/simplification in Sema::ClassifyName.
Kaelyn Uhrain [Tue, 24 Jan 2012 19:45:35 +0000 (19:45 +0000)]
Small code cleanup/simplification in Sema::ClassifyName.

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

12 years ago[libclang] When calling clang_getCursorReferenced on a class or protocol
Argyrios Kyrtzidis [Tue, 24 Jan 2012 19:40:15 +0000 (19:40 +0000)]
[libclang] When calling clang_getCursorReferenced on a class or protocol
forward reference, do give an interface or protocol cursor back, don't give
an 'UnexposedDecl' one.

rdar://10743193

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

12 years agoobjc: Issue a generic diagnostic assigning to
Fariborz Jahanian [Tue, 24 Jan 2012 19:40:13 +0000 (19:40 +0000)]
objc: Issue a generic diagnostic assigning to
an objc object in any abi mode.

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

12 years ago[analyzer] Add more C taint sources/sinks.
Anna Zaks [Tue, 24 Jan 2012 19:32:25 +0000 (19:32 +0000)]
[analyzer] Add more C taint sources/sinks.

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

12 years agoAddress one part of the FIXME I introduced my switching the triple
Chandler Carruth [Tue, 24 Jan 2012 19:28:29 +0000 (19:28 +0000)]
Address one part of the FIXME I introduced my switching the triple
inside of GCCInstallation to be a proper llvm::Triple. This is still
a touch ugly because we have to use it as a string in so many places,
but I think on the whole the more structured representation is better.

Comments of course welcome if this tradeoff isn't working for folks.

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

12 years agoThe following patch adds __attribute__((no_address_safety_analysis)) which will allow...
Kostya Serebryany [Tue, 24 Jan 2012 19:25:38 +0000 (19:25 +0000)]
The following patch adds __attribute__((no_address_safety_analysis)) which will allow to disable
address safety analysis (such as e.g. AddressSanitizer or SAFECode) for a specific function.

When building with AddressSanitizer, add AddressSafety function attribute to every generated function
except for those that have __attribute__((no_address_safety_analysis)).

With this patch we will be able to
1. disable AddressSanitizer for a particular function
2. disable AddressSanitizer-hostile optimizations (such as some cases of load widening) when AddressSanitizer is on.

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

12 years agoAt least within these classes, consistently spell 'GCC' as 'GCC'.
Chandler Carruth [Tue, 24 Jan 2012 19:21:42 +0000 (19:21 +0000)]
At least within these classes, consistently spell 'GCC' as 'GCC'.
I can't read Java-style 'Gcc' acronyms. ;]

No functionality changed.

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

12 years agoStart hoisting the logic for computing the target triple into its own
Chandler Carruth [Tue, 24 Jan 2012 19:17:46 +0000 (19:17 +0000)]
Start hoisting the logic for computing the target triple into its own
function. The logic for this, and I want to emphasize that this is the
logic for computing the *target* triple, is currently scattered
throughout various different HostInfo classes ToolChain factoring
functions. Best part, it is largely *duplicated* there. The goal is to
hoist all of that up to here where we can deal with it once, and in
a consistent manner.

Unfortunately, this uncovers more fun problems: the ToolChains assume
that the *actual* target triple is the one passed into them by these
factory functions, while the *host* triple is the one in the driver.
This already was a lie, and a damn lie, when the '-target' flag was
specified. It only really worked when the difference stemmed from '-m32'
and '-m64' flags. I'll have to fix that (and remove all the FIXMEs I've
introduced here to document the problem) before I can finish hoisting
the target-calculation logic.

It's bugs all the way down today it seems...

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

12 years agoPromote the extension warning for attempts to catch a reference or
Douglas Gregor [Tue, 24 Jan 2012 19:01:26 +0000 (19:01 +0000)]
Promote the extension warning for attempts to catch a reference or
pointer to incomplete type from an ExtWarn to an error. We put the
ExtWarn in place as part of a workaround for Boost (PR6527), but it
(1) doesn't actually match a GCC extension and (2) has been fixed for
two years in Boost, and (3) causes us to emit code that fails badly at
run time, so it's a bad idea to keep it. Fixes PR11803.

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

12 years agoWhen importing a RecordDecl as a DeclContext, make sure that we pull
Douglas Gregor [Tue, 24 Jan 2012 18:36:04 +0000 (18:36 +0000)]
When importing a RecordDecl as a DeclContext, make sure that we pull
in the definition as well.

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

12 years agoobjc: issue error if assigning objects in fragile-abi too.
Fariborz Jahanian [Tue, 24 Jan 2012 18:05:45 +0000 (18:05 +0000)]
objc: issue error if assigning objects in fragile-abi too.
// rdar://10731065

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

12 years agoTeach the AST importer about redeclaration chains for Objective-C
Douglas Gregor [Tue, 24 Jan 2012 17:42:07 +0000 (17:42 +0000)]
Teach the AST importer about redeclaration chains for Objective-C
classes and protocols, implementing lazy-import semantics for both.

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

12 years agoOnly mark an IdentifierInfo as having changed since deserialization
Douglas Gregor [Tue, 24 Jan 2012 15:24:38 +0000 (15:24 +0000)]
Only mark an IdentifierInfo as having changed since deserialization
when it actually has changed (and not, e.g., when we've simply attached a
deserialized macro definition). Good for ~1.5% reduction in module
file size, mostly in the identifier table.

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