]> granicus.if.org Git - clang/log
clang
12 years agoTeach Clang about PIE compilations. This is the first step of PR12380.
Chandler Carruth [Sun, 8 Apr 2012 16:40:35 +0000 (16:40 +0000)]
Teach Clang about PIE compilations. This is the first step of PR12380.

First, this patch cleans up the parsing of the PIC and PIE family of
options in the driver. The existing logic failed to claim arguments all
over the place resulting in kludges that marked the options as unused.
Instead actually walk all of the arguments and claim them properly.

We now treat -f{,no-}{pic,PIC,pie,PIE} as a single set, accepting the
last one on the commandline. Previously there were lots of ordering bugs
that could creep in due to the nature of the parsing. Let me know if
folks would like weird things such as "-fPIE -fno-pic" to turn on PIE,
but disable full PIC. This doesn't make any sense to me, but we could in
theory support it.

Options that seem to have intentional "trump" status (-static, -mkernel,
etc) continue to do so and are commented as such.

Next, a -pie-level flag is threaded into the frontend, rigged to
a language option, and handled preprocessor, setting up the appropriate
defines. We'll now have the correct defines when compiling with -fpie.

The one place outside of the preprocessor that was inspecting the PIC
level (as opposed to the relocation model, which is set and handled
separately, yay!) is in the GNU ObjC runtime. I changed it to exactly
preserve existing behavior. If folks want to change its behavior in the
face of PIE, they can do that in a separate patch.

Essentially the only functionality changed here is the preprocessor
defines and bug-fixes to the argument management.

Tests have been updated and extended to test all of this a bit more
thoroughly.

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

12 years agoRephrase the preprocessor test to directly use CC1 and not bother
Chandler Carruth [Sun, 8 Apr 2012 16:40:31 +0000 (16:40 +0000)]
Rephrase the preprocessor test to directly use CC1 and not bother
testing any of the strange driver behavior. We already have some tiny
tests for the driver behavior, and I'm going to expand them greatly in
the next commit.

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

12 years agoFileCheck-ize this test.
Chandler Carruth [Sun, 8 Apr 2012 16:40:30 +0000 (16:40 +0000)]
FileCheck-ize this test.

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

12 years agoDon't forget to evaluate the subexpression in a null pointer cast. If we're
Richard Smith [Sun, 8 Apr 2012 08:02:07 +0000 (08:02 +0000)]
Don't forget to evaluate the subexpression in a null pointer cast. If we're
converting from std::nullptr_t, the subexpression might have side-effects.

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

12 years agoext_reserved_user_defined_literal must not default to Error in MicrosoftMode. Hence...
Francois Pichet [Sat, 7 Apr 2012 23:09:23 +0000 (23:09 +0000)]
ext_reserved_user_defined_literal must not default to Error in MicrosoftMode. Hence create ext_ms_reserved_user_defined_literal that doesn't default to Error; otherwise MSVC headers won't parse.

Fixes PR12383.

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

12 years agoMIPS: Pass -mabi option to the assmbler when compile MIPS targets.
Simon Atanasyan [Sat, 7 Apr 2012 22:31:29 +0000 (22:31 +0000)]
MIPS: Pass -mabi option to the assmbler when compile MIPS targets.

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

12 years agoMIPS: Move code calculates CPU and ABI names to the separate function to reuse this...
Simon Atanasyan [Sat, 7 Apr 2012 22:09:23 +0000 (22:09 +0000)]
MIPS: Move code calculates CPU and ABI names to the separate function to reuse this function later.

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

12 years ago[Cygwin] Work around to flush stdout in a thread, or stdout in threads won't be flush...
NAKAMURA Takumi [Sat, 7 Apr 2012 06:59:28 +0000 (06:59 +0000)]
[Cygwin] Work around to flush stdout in a thread, or stdout in threads won't be flushed at exit.

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

12 years agoFix several problems with protected access control:
John McCall [Sat, 7 Apr 2012 03:04:20 +0000 (03:04 +0000)]
Fix several problems with protected access control:
  - The [class.protected] restriction is non-trivial for any instance
    member, even if the access lacks an object (for example, if it's
    a pointer-to-member constant).  In this case, it is equivalent to
    requiring the naming class to equal the context class.
  - The [class.protected] restriction applies to accesses to constructors
    and destructors.  A protected constructor or destructor can only be
    used to create or destroy a base subobject, as a direct result.
  - Several places were dropping or misapplying object information.

The standard could really be much clearer about what the object type is
supposed to be in some of these accesses.  Usually it's easy enough to
find a reasonable answer, but still, the standard makes a very confident
statement about accesses to instance members only being possible in
either pointer-to-member literals or member access expressions, which
just completely ignores concepts like constructor and destructor
calls, using declarations, unevaluated field references, etc.

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

12 years agotest/lit.cfg: Please pass %INCLUDE% to clang.exe on Win32. MS-compatible clang may...
NAKAMURA Takumi [Sat, 7 Apr 2012 01:02:53 +0000 (01:02 +0000)]
test/lit.cfg: Please pass %INCLUDE% to clang.exe on Win32. MS-compatible clang may refer to %INCLUDE%. It fixes r154188.

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

12 years ago[driver] In general, the driver claims redundant args and uses the last arg.
Chad Rosier [Sat, 7 Apr 2012 00:01:31 +0000 (00:01 +0000)]
[driver] In general, the driver claims redundant args and uses the last arg.
However, the '-x' option has special handling and wasn't following this
paradigm.  Fix it to do so by claiming the arg as we parse the '-x' option.
rdar://11203340

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

12 years agoRemove "parse error" in favor of more descriptive diagnostics.
David Blaikie [Fri, 6 Apr 2012 23:33:59 +0000 (23:33 +0000)]
Remove "parse error" in favor of more descriptive diagnostics.

In a few cases clang emitted a rather content-free diagnostic: 'parse error'.
This change replaces two actual cases (template parameter parsing and K&R
parameter declaration parsing) with more specific diagnostics and removes a
third dead case of this in the BalancedDelimiterTracker (the ctor already
checked the invariant necessary to ensure that the diag::parse_error was never
actually used).

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

12 years agomore testing of objc's dictionary literal translation.
Fariborz Jahanian [Fri, 6 Apr 2012 22:51:48 +0000 (22:51 +0000)]
more testing of objc's dictionary literal translation.

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

12 years agoImplement support for null non-type template arguments for non-type
Douglas Gregor [Fri, 6 Apr 2012 22:40:38 +0000 (22:40 +0000)]
Implement support for null non-type template arguments for non-type
template parameters of pointer, pointer-to-member, or nullptr_t
type in C++11. Fixes PR9700 / <rdar://problem/11193097>.

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

12 years agomodern objective-c translation: support for
Fariborz Jahanian [Fri, 6 Apr 2012 22:29:36 +0000 (22:29 +0000)]
modern objective-c translation: support for
dictionary literals. This concludes // rdar://10803676

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

12 years agoRework ExprEngine::evalLoad and clients (e.g. VisitBinaryOperator) so that when we...
Ted Kremenek [Fri, 6 Apr 2012 22:10:18 +0000 (22:10 +0000)]
Rework ExprEngine::evalLoad and clients (e.g. VisitBinaryOperator) so that when we generate a new ExplodedNode
we use the same Expr* as the one being currently visited.  This is preparation for transitioning to having
ProgramPoints refer to CFGStmts.

This required a bit of trickery.  We wish to keep the old Expr* bindings in the Environment intact,
as plenty of logic relies on it and there is no reason to change it, but we sometimes want the Stmt* for
the ProgramPoint to be different than the Expr* being used for bindings.  This requires adding an extra
argument for some functions (e.g., evalLocation).  This looks a bit strange for some clients, but
it will look a lot cleaner when were start using CFGStmt* in the appropriate places.

As some fallout, the diagnostics arrows are a bit difference, since some of the node locations have changed.
I have audited these, and they look reasonable.

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

12 years agoSourceManager: Vectorize ComputeLineNumbers for SSE2.
Benjamin Kramer [Fri, 6 Apr 2012 20:49:55 +0000 (20:49 +0000)]
SourceManager: Vectorize ComputeLineNumbers for SSE2.

This method is very hot, it is called when emitting diagnostics, in -E mode
and for many #pragma handlers. It scans through the whole source file to
count newlines, records and caches them in a vector.

The speedup from vectorization isn't very large, as we fall back to bytewise
scanning when we hit a newline. There might be a way to avoid leaving the sse
loop but everything I tried didn't work out because a call to push_back
clobbers xmm registers.

About 2% speedup on average on "clang -E > /dev/null" of all .cpp files in
clang's lib/Sema.

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

12 years agoMIPS: Provide a correct path to the dynamic linker when build for MIPS 64-bit targets.
Simon Atanasyan [Fri, 6 Apr 2012 20:14:27 +0000 (20:14 +0000)]
MIPS: Provide a correct path to the dynamic linker when build for MIPS 64-bit targets.

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

12 years agoThread safety analysis: downgraded requirement that mutex expressions refer to a...
DeLesley Hutchins [Fri, 6 Apr 2012 20:02:30 +0000 (20:02 +0000)]
Thread safety analysis: downgraded requirement that mutex expressions refer to a lockable type from error to warning.

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

12 years agomodern objective-c translator: translate array literal
Fariborz Jahanian [Fri, 6 Apr 2012 19:47:36 +0000 (19:47 +0000)]
modern objective-c translator: translate array literal
expressions. // rdar://10803676

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

12 years agoMIPS: Pass -EB/-EL argument to the assembler according to selected endian when compil...
Simon Atanasyan [Fri, 6 Apr 2012 19:15:24 +0000 (19:15 +0000)]
MIPS: Pass -EB/-EL argument to the assembler according to selected endian when compile for MIPS targets.

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

12 years ago[analyzer] Check that the arguments to NSOrderedSet creation methods are valid ObjC...
Jordy Rose [Fri, 6 Apr 2012 19:06:01 +0000 (19:06 +0000)]
[analyzer] Check that the arguments to NSOrderedSet creation methods are valid ObjC objects.

Patch by Sean McBride!

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

12 years agoTest for r154189/PR12481
Matt Beaumont-Gay [Fri, 6 Apr 2012 18:47:27 +0000 (18:47 +0000)]
Test for r154189/PR12481

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

12 years agoUse atexit when __cxa_atexit isn't available instead of adding a
John McCall [Fri, 6 Apr 2012 18:21:06 +0000 (18:21 +0000)]
Use atexit when __cxa_atexit isn't available instead of adding a
global destructor entry.  For some reason this isn't enabled for
apple-kexts;  it'd be good to have documentation for that.

Based on a patch by Nakamura Takumi!

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

12 years agoRename GenerateCXXGlobalDtorFunc to GenerateCXXGlobalDtorsFunc.
John McCall [Fri, 6 Apr 2012 18:21:03 +0000 (18:21 +0000)]
Rename GenerateCXXGlobalDtorFunc to GenerateCXXGlobalDtorsFunc.

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

12 years agoFix a Sema invariant bug that I recently introduced involving
John McCall [Fri, 6 Apr 2012 18:20:53 +0000 (18:20 +0000)]
Fix a Sema invariant bug that I recently introduced involving
the template instantiation of statement-expressions.

I think it was jyasskin who had a crashing testcase in this area;
hopefully this fixes it and he can find his testcase and check it in.

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

12 years agoClear environment variables that might affect Clang before running tests.
Jordy Rose [Fri, 6 Apr 2012 18:14:01 +0000 (18:14 +0000)]
Clear environment variables that might affect Clang before running tests.

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

12 years agoAdded a new attribute, objc_root_class, which informs the compiler when a root class...
Patrick Beard [Fri, 6 Apr 2012 18:12:22 +0000 (18:12 +0000)]
Added a new attribute, objc_root_class, which informs the compiler when a root class is intentionally declared.
The warning this inhibits, -Wobjc-root-class, is opt-in for now. However, all clang unit tests that would trigger
the warning have been updated to use -Wno-objc-root-class. <rdar://problem/7446698>

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

12 years agoMIPS: Move tests check float ABI macros definitions to the more appropriate place.
Simon Atanasyan [Fri, 6 Apr 2012 17:51:49 +0000 (17:51 +0000)]
MIPS: Move tests check float ABI macros definitions to the more appropriate place.

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

12 years agoFix using Clang as a cross compiler installed on a host machine and not
Chandler Carruth [Fri, 6 Apr 2012 16:32:06 +0000 (16:32 +0000)]
Fix using Clang as a cross compiler installed on a host machine and not
inside of a sysroot targeting a system+sysroot which is "similar" or
"compatible" with the host system. This shows up when trying to build
system images on largely compatible hardware as-if fully cross compiled.

The problem is that previously we *perfectly* mimiced GCC here, and it
turns out GCC has a bug that no one has really stumbled across. GCC will
try to look in thy system prefix ('/usr/local' f.ex.) into which it is
instaled to find libraries installed along side GCC that should be
preferred to the base system libraries ('/usr' f.ex.). This seems not
unreasonable, but it has a very unfortunate consequence when combined
with a '--sysroot' which does *not* contain the GCC installation we're
using to complete the toolchain. That results in some of the host
system's library directories being searched during the link.

Now, it so happens that most folks doing stuff like this use
'--with-sysroot' and '--disable-multilib' when configuring GCC. Even
better, they're usually not cross-compiling to a target that is similar
to the host. As a result, searching the host for libraries doesn't
really matter -- most of the time weird directories get appended that
don't exist (no arm triple lib directory, etc). Even if you're
cross-compiling from 32-bit to 64-bit x86 or vice-versa, disabling
multilib makes it less likely that you'll actually find viable libraries
on the host. But that's just luck. We shouldn't rely on this, and this
patch disables looking in the system prefix containing the GCC
installation if that system prefix is *outside* of the sysroot. For
empty sysroots, this has no effect. Similarly, when using the GCC
*inside* of the sysroot, we still track wherever it is installed within
the sysroot and look there for libraries. But now we can use a cross
compiler GCC installation outside the system root, and only look for the
crtbegin.o in the GCC installation, and look for all the other libraries
inside the system root.

This should fix PR12478, allowing Clang to be used when building
a ChromiumOS image without polluting the image with libraries from the
host system.

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

12 years agozext ivar offsets if required (GNU runtimes).
David Chisnall [Fri, 6 Apr 2012 15:39:12 +0000 (15:39 +0000)]
zext ivar offsets if required (GNU runtimes).

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

12 years agoFixed scoping error for late parsed attributes in nested classes.
DeLesley Hutchins [Fri, 6 Apr 2012 15:10:17 +0000 (15:10 +0000)]
Fixed scoping error for late parsed attributes in nested classes.

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

12 years agoMIPS: Add tests for predefined macros for MIPS targets.
Simon Atanasyan [Fri, 6 Apr 2012 08:37:24 +0000 (08:37 +0000)]
MIPS: Add tests for predefined macros for MIPS targets.

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

12 years agoFix diagnostic text for r154163.
David Blaikie [Fri, 6 Apr 2012 06:28:32 +0000 (06:28 +0000)]
Fix diagnostic text for r154163.

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

12 years agoRestrict fixit for missing 'class' in template template parameters.
David Blaikie [Fri, 6 Apr 2012 05:26:43 +0000 (05:26 +0000)]
Restrict fixit for missing 'class' in template template parameters.

Based on Doug's feedback to r153887 this omits the FixIt if the following token
isn't syntactically valid for the context. (not a comma, '...', identifier,
'>', or '>>')

There's a bunch of work to handle the '>>' case, but it makes for a much more
pleasant diagnostic in this case.

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

12 years ago[analyzer]Fix false positive: pointer might escape through CG*WithData.
Anna Zaks [Fri, 6 Apr 2012 01:00:47 +0000 (01:00 +0000)]
[analyzer]Fix false positive: pointer might escape through CG*WithData.

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

12 years agoPoint the caret at the error for the 'expected namespace name' diagnostic in
Richard Smith [Thu, 5 Apr 2012 23:13:23 +0000 (23:13 +0000)]
Point the caret at the error for the 'expected namespace name' diagnostic in
a namespace alias declaration.

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

12 years agoImplement C90 pedantic warning for duplicate declaration specifiers which are duplica...
Eli Friedman [Thu, 5 Apr 2012 22:47:34 +0000 (22:47 +0000)]
Implement C90 pedantic warning for duplicate declaration specifiers which are duplicated via a typedef.  Patch by Tim Northover.

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

12 years agoProperly implement the C rules for composite types for qualified pointers in conditio...
Eli Friedman [Thu, 5 Apr 2012 22:30:04 +0000 (22:30 +0000)]
Properly implement the C rules for composite types for qualified pointers in conditionals.  Patch by Tim Northover.

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

12 years agoobjective-c: Don't warn when a category does not implement a method
Fariborz Jahanian [Thu, 5 Apr 2012 22:14:12 +0000 (22:14 +0000)]
objective-c: Don't warn when a category does not implement a method
declared in its adopted protocol when another category declares it
because that category will implement it. // rdar://11186449

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

12 years agoEnhance testing a bit to make sure that we're omitting the
Eric Christopher [Thu, 5 Apr 2012 22:03:35 +0000 (22:03 +0000)]
Enhance testing a bit to make sure that we're omitting the
getter and setter when they're synthesized with the default
names.

rdar://11179756

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

12 years agoOnly emit the getter and setter names if they're not the default
Eric Christopher [Thu, 5 Apr 2012 22:03:32 +0000 (22:03 +0000)]
Only emit the getter and setter names if they're not the default
synthesized ones. Reasonable debug info size reduction for objc.

rdar://11179756

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

12 years agoMake the variant of __builtin_shufflevector that takes the shuffle indexes as a vecto...
Eli Friedman [Thu, 5 Apr 2012 21:48:40 +0000 (21:48 +0000)]
Make the variant of __builtin_shufflevector that takes the shuffle indexes as a vector actually usable. Patch by David Neto.  PR12465.

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

12 years agoRequire that all static analyzer issues have a category. As part of this change,
Ted Kremenek [Thu, 5 Apr 2012 20:43:28 +0000 (20:43 +0000)]
Require that all static analyzer issues have a category.  As part of this change,
consolidate some commonly used category strings into global references (more of this can be done, I just did a few).

Fixes <rdar://problem/11191537>.

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

12 years agoMove some MIPS target macro definitions from class Mips32TargetInfoBase
Simon Atanasyan [Thu, 5 Apr 2012 19:28:31 +0000 (19:28 +0000)]
Move some MIPS target macro definitions from class Mips32TargetInfoBase
to the base class MipsTargetInfoBase. These macros are applicable for both
32/64-bits targets.

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

12 years agoTemporary workaround for bug#12457: turn the 'constexpr function never produces
Richard Smith [Thu, 5 Apr 2012 18:57:10 +0000 (18:57 +0000)]
Temporary workaround for bug#12457: turn the 'constexpr function never produces
a constant expression' error into a DefaultError ExtWarn, so that it can be
disabled and is suppressed in system headers. libstdc++4.7 contains some such
functions which we currently can't evaluate as constant expressions.

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

12 years ago[Lex] Add support for 'user specified system frameworks' (see test case).
Daniel Dunbar [Thu, 5 Apr 2012 17:10:06 +0000 (17:10 +0000)]
[Lex] Add support for 'user specified system frameworks' (see test case).
 - Developers of system frameworks need a way for their framework to be treated as a "system framework" during development. Otherwise, they are unable to properly test how their framework behaves when installed because of the semantic changes (in warning behavior) applied to system frameworks.

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

12 years ago[Lex] HeaderSearch: Introduce a FrameworkCacheEntry structure to hold the FrameworkMa...
Daniel Dunbar [Thu, 5 Apr 2012 17:09:40 +0000 (17:09 +0000)]
[Lex] HeaderSearch: Introduce a FrameworkCacheEntry structure to hold the FrameworkMap items.
 - No functionality change.

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

12 years agoSimplify.
Daniel Dunbar [Thu, 5 Apr 2012 17:09:11 +0000 (17:09 +0000)]
Simplify.

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

12 years agoImprove & simplify diagnostic for missing 'class' in template template parameter.
David Blaikie [Thu, 5 Apr 2012 16:56:02 +0000 (16:56 +0000)]
Improve & simplify diagnostic for missing 'class' in template template parameter.

Change suggested by Sebastian Redl on review feedback from r153887.

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

12 years agoHandle symbolicating a reference in an initializer expression that we don't understand.
Ted Kremenek [Thu, 5 Apr 2012 05:56:31 +0000 (05:56 +0000)]
Handle symbolicating a reference in an initializer expression that we don't understand.

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

12 years agoTeach ObjCContainersChecker that the array passed to CFArrayGetValueAtIndex might...
Ted Kremenek [Thu, 5 Apr 2012 05:18:05 +0000 (05:18 +0000)]
Teach ObjCContainersChecker that the array passed to CFArrayGetValueAtIndex might not be a symbolic value.

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

12 years agoDo not crash in the callgraph construction when encountering deleted function definit...
Ted Kremenek [Thu, 5 Apr 2012 04:03:23 +0000 (04:03 +0000)]
Do not crash in the callgraph construction when encountering deleted function definitions.  Fixes <rdar://problem/11178609>.

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

12 years ago[analyzer] Move stats calculation out of AnalysisConsumer destructor.
Anna Zaks [Thu, 5 Apr 2012 02:10:21 +0000 (02:10 +0000)]
[analyzer] Move stats calculation out of AnalysisConsumer destructor.
The ASTConsumer does not get deleted with clang --analyze (for
performance reasons), we still want the diagnostics to work.

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

12 years ago[analyzer] Change warding in a path diagnostic:
Anna Zaks [Thu, 5 Apr 2012 02:10:19 +0000 (02:10 +0000)]
[analyzer] Change warding in a path diagnostic:
"No method actually called because receiver is nil" ->
"No method is called because receiver is nil"

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

12 years ago[analyzer] Add a coverage calculation to FunctionSummaries.
Anna Zaks [Thu, 5 Apr 2012 02:10:17 +0000 (02:10 +0000)]
[analyzer] Add a coverage calculation to FunctionSummaries.

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

12 years ago[analyzer] Remove redundant if statement (pointed out by Ted).
Anna Zaks [Thu, 5 Apr 2012 02:10:14 +0000 (02:10 +0000)]
[analyzer] Remove redundant if statement (pointed out by Ted).

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

12 years agoImprove diagnostics for invalid use of non-static members / this:
Richard Smith [Thu, 5 Apr 2012 01:13:04 +0000 (01:13 +0000)]
Improve diagnostics for invalid use of non-static members / this:

* s/nonstatic/non-static/ in the diagnostics, since the latter form outvoted
  the former by 28-2 in our diagnostics.
* Fix the "use of member in static member function" diagnostic to correctly
  detect this situation inside a block or lambda.
* Produce a more specific "invalid use of non-static member" diagnostic for
  the case where a nested class member refers to a member of a
  lexically-surrounding class.

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

12 years agoAdd triples to these tests to keep them working on Windows,
Richard Smith [Thu, 5 Apr 2012 00:54:51 +0000 (00:54 +0000)]
Add triples to these tests to keep them working on Windows,
where wchar_t is only 16 bits wide.

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

12 years agoRelNote improvements made to -Wliteral-conversion by r141955.
David Blaikie [Thu, 5 Apr 2012 00:47:38 +0000 (00:47 +0000)]
RelNote improvements made to -Wliteral-conversion by r141955.

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

12 years agoFix assertions and wrong output from StmtPrinter's string literal printing.
Richard Smith [Thu, 5 Apr 2012 00:17:44 +0000 (00:17 +0000)]
Fix assertions and wrong output from StmtPrinter's string literal printing.
String literals (including unicode ones) can contain non-Unicode codepoints
if they were written using \x or similar. Write those out using \x, but be
careful that the following character can't be misinterpreted as part of the
\x escape sequence. Convert UTF-16 surrogate pairs back to codepoints before
rendering them.

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

12 years agoEnable warn_impcast_literal_float_to_integer by default.
David Blaikie [Thu, 5 Apr 2012 00:16:44 +0000 (00:16 +0000)]
Enable warn_impcast_literal_float_to_integer by default.

This diagnostic seems to be production ready, it's just an oversight that it
wasn't turned on by default.

The test changes are a bit of a mixed bag. Some tests that seemed like they
clearly didn't need to use this behavior have been modified not to use it.
Others that I couldn't be sure about, I added the necessary expected-warnings
to.

It's possible the diagnostic message could be improved to make it clearer that
this warning can be suppressed by using a value that won't lose precision when
converted to the target type (but can still be a floating point literal, such
as "bool b = 1.0;").

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

12 years agoclang/test/Tooling/clang-check.cpp: Mark it as XFAIL also on cygwin.
NAKAMURA Takumi [Wed, 4 Apr 2012 23:23:19 +0000 (23:23 +0000)]
clang/test/Tooling/clang-check.cpp: Mark it as XFAIL also on cygwin.

It seems clang-check doesn't like gcc driver on cygming. Investigating.

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

12 years agoAllow a conversion from the empty initializer list {} to an
Douglas Gregor [Wed, 4 Apr 2012 23:09:20 +0000 (23:09 +0000)]
Allow a conversion from the empty initializer list {} to an
std::initializer_list<T> so long as <T> is known. This conversion has
identity rank.

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

12 years agoHonor -fno-pic, -fno-PIC, -fno-pie, -fno-PIE.
Nico Weber [Wed, 4 Apr 2012 23:00:14 +0000 (23:00 +0000)]
Honor -fno-pic, -fno-PIC, -fno-pie, -fno-PIE.

Review at http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20120402/055759.html

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

12 years ago[driver] When using the -mfpmath= option, add an error message when trying to
Chad Rosier [Wed, 4 Apr 2012 22:13:40 +0000 (22:13 +0000)]
[driver] When using the -mfpmath= option, add an error message when trying to
enable neonfp on a CPU that doesn't support NEON.
rdar://11108618

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

12 years agoHardcode a triple to prevent the test failing on targets which don't support __thread.
Richard Smith [Wed, 4 Apr 2012 21:54:03 +0000 (21:54 +0000)]
Hardcode a triple to prevent the test failing on targets which don't support __thread.

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

12 years agoTest commit to check commit access.
Simon Atanasyan [Wed, 4 Apr 2012 21:22:57 +0000 (21:22 +0000)]
Test commit to check commit access.

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

12 years agoImplement C++11 [temp.arg.nontype]'s permission to use the address of an object
Richard Smith [Wed, 4 Apr 2012 21:11:30 +0000 (21:11 +0000)]
Implement C++11 [temp.arg.nontype]'s permission to use the address of an object
or function with internal linkage as a non-type template argument.

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

12 years agoFix an oversight: don't run ARC optimization cleanup at -O0.
Dan Gohman [Wed, 4 Apr 2012 21:04:56 +0000 (21:04 +0000)]
Fix an oversight: don't run ARC optimization cleanup at -O0.

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

12 years agoWhitespace.
Chad Rosier [Wed, 4 Apr 2012 20:56:36 +0000 (20:56 +0000)]
Whitespace.

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

12 years ago[driver] Add a static helper function for handling -mfpu= to remove some code
Chad Rosier [Wed, 4 Apr 2012 20:51:35 +0000 (20:51 +0000)]
[driver] Add a static helper function for handling -mfpu= to remove some code
duplication.  No functional change intended.

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

12 years agoReduce variable scope.
David Blaikie [Wed, 4 Apr 2012 20:43:14 +0000 (20:43 +0000)]
Reduce variable scope.

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

12 years ago[driver] Create a new -mfpmath= option, which is used to control whether clang
Chad Rosier [Wed, 4 Apr 2012 20:39:32 +0000 (20:39 +0000)]
[driver] Create a new -mfpmath= option, which is used to control whether clang
uses Neon instructions for single-precision FP.

-mfpmath=neon is analogous to passing llc -mattr=+neonfp.
-mfpmath=[vfp|vfp2|vfp3|vfp4] is analogous to passing llc -mattr=-neonfp.

rdar://11108618

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

12 years agoobjc-arc: provide a warning when 'receiver' of a message is 'weak'
Fariborz Jahanian [Wed, 4 Apr 2012 20:05:25 +0000 (20:05 +0000)]
objc-arc: provide a warning when 'receiver' of a message is 'weak'
in arc mode and opted-in with -Wreceiver-is-weak flag.
// rdar://10225276

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

12 years agoLook through chains of 'x = y = z' when employing silencing heuristics in the DeadSto...
Ted Kremenek [Wed, 4 Apr 2012 19:58:03 +0000 (19:58 +0000)]
Look through chains of 'x = y = z' when employing silencing heuristics in the DeadStoresChecker.

Fixes <rdar://problem/11185138>.

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

12 years agomodern objc translator. Add more
Fariborz Jahanian [Wed, 4 Apr 2012 18:50:28 +0000 (18:50 +0000)]
modern objc translator. Add more
rewriter specific option to cc1 with -rewrite-objc.
// rdar://11143173

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

12 years agoRemove unused argument.
Fariborz Jahanian [Wed, 4 Apr 2012 18:28:00 +0000 (18:28 +0000)]
Remove unused argument.

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

12 years agoInclude the "issue context" (e.g. function or method) where a static analyzer issue...
Ted Kremenek [Wed, 4 Apr 2012 18:11:35 +0000 (18:11 +0000)]
Include the "issue context" (e.g. function or method) where a static analyzer issue occurred in the plist output.

Fixes <rdar://problem/11004527>

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

12 years agoMove the computation of the lambda mangling information (mangling
Douglas Gregor [Wed, 4 Apr 2012 17:40:10 +0000 (17:40 +0000)]
Move the computation of the lambda mangling information (mangling
number + context) to the point where we initially start defining the
lambda, so that the linkage won't change when that information is made
available. Fixes the assertion in <rdar://problem/11182962>.

Plus, actually mangle the context of lambdas properly.

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

12 years agoobjective-c modern translation. Remove commenting out
Fariborz Jahanian [Wed, 4 Apr 2012 17:16:15 +0000 (17:16 +0000)]
objective-c modern translation. Remove commenting out
of extern "C". // rdar://11169733

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

12 years agoSimplify test a bit now that it's not actually running cc1plus.
Bob Wilson [Wed, 4 Apr 2012 14:43:40 +0000 (14:43 +0000)]
Simplify test a bit now that it's not actually running cc1plus.

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

12 years agoclang/test/Tooling/clang-check.cpp: Mark it as XFAIL mingw,msvc for now.
NAKAMURA Takumi [Wed, 4 Apr 2012 14:35:23 +0000 (14:35 +0000)]
clang/test/Tooling/clang-check.cpp: Mark it as XFAIL mingw,msvc for now.

It seems JSON parser doesn't like path separator '\' on Win32 hosts.

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

12 years agoTooling.cpp: Reorder inclusions according to the conding standards.
NAKAMURA Takumi [Wed, 4 Apr 2012 13:59:41 +0000 (13:59 +0000)]
Tooling.cpp: Reorder inclusions according to the conding standards.

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

12 years agoTooling.cpp: Don't refer to $ENV{PWD}. Use llvm::sys::fs instead.
NAKAMURA Takumi [Wed, 4 Apr 2012 13:59:36 +0000 (13:59 +0000)]
Tooling.cpp: Don't refer to $ENV{PWD}. Use llvm::sys::fs instead.

$ENV{PWD} is not expected to be set on all hosts.

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

12 years agoDon't crash (assert failure) when generating blocks for C++ types with a non-const...
David Chisnall [Wed, 4 Apr 2012 13:07:13 +0000 (13:07 +0000)]
Don't crash (assert failure) when generating blocks for C++ types with a non-const copy constructor.

This was caused by the code deciding the number of fields in the byref structure using a different test to the part of the code creating the GEPs into said structure.

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

12 years agoUpdated release notes for tooling.
Manuel Klimek [Wed, 4 Apr 2012 12:53:16 +0000 (12:53 +0000)]
Updated release notes for tooling.

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

12 years agoclangFrontend depends on clangEdit.
Benjamin Kramer [Wed, 4 Apr 2012 12:25:11 +0000 (12:25 +0000)]
clangFrontend depends on clangEdit.

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

12 years agoAdd the dependency on clang-check to clang-test, so clang-check
Manuel Klimek [Wed, 4 Apr 2012 12:18:22 +0000 (12:18 +0000)]
Add the dependency on clang-check to clang-test, so clang-check
can be integration tested.

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

12 years agoAdds a tooling library.
Manuel Klimek [Wed, 4 Apr 2012 12:07:46 +0000 (12:07 +0000)]
Adds a tooling library.

Provides an API to run clang tools (FrontendActions) as standalone tools,
or repeatedly in-memory in a process. This is useful for unit-testing,
map-reduce style applications, source transformation daemons or command line
tools.

The ability to run over multiple translation units with different command
line arguments enables building up refactoring tools that need to apply
transformations across translation unit boundaries.

See tools/clang-check/ClangCheck.cpp for an example.

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

12 years agoDon't actually execute gcc during testing.
Benjamin Kramer [Wed, 4 Apr 2012 09:05:21 +0000 (09:05 +0000)]
Don't actually execute gcc during testing.

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

12 years agoAdd a testcase for svn r153854.
Bob Wilson [Wed, 4 Apr 2012 07:06:30 +0000 (07:06 +0000)]
Add a testcase for svn r153854.

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

12 years agoFix diagnostic typos: "non-template arguments" vs "non-type template arguments".
Richard Smith [Wed, 4 Apr 2012 06:47:16 +0000 (06:47 +0000)]
Fix diagnostic typos: "non-template arguments" vs "non-type template arguments".
No test updates: we don't appear to have any test coverage for these diagnostics!

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

12 years agoFor PR11916: Add support for g++'s __int128 keyword. Unlike __int128_t, this is
Richard Smith [Wed, 4 Apr 2012 06:24:32 +0000 (06:24 +0000)]
For PR11916: Add support for g++'s __int128 keyword. Unlike __int128_t, this is
a type specifier and can be combined with unsigned. This allows libstdc++4.7 to
be used with clang in c++98 mode.

Several other changes are still required for libstdc++4.7 to work with clang in
c++11 mode.

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

12 years agoWhen performing template argument deduction for an initializer list,
Douglas Gregor [Wed, 4 Apr 2012 05:10:53 +0000 (05:10 +0000)]
When performing template argument deduction for an initializer list,
be sure to perform the argument type adjustments in
[temp.deduct.call]p2, e.g., array decay.

And, when performing these deductions in the context of 'auto', make
sure that we're deducing the P' in std::initializer_list<P'> rather
than the whole initializer list.

Together, this makes code like

  for( auto s : {"Deferred", "New", "Open", "Review"}) { }

work properly.

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

12 years agoDependent-sequence initialization of a single element can be direct
Douglas Gregor [Wed, 4 Apr 2012 04:06:51 +0000 (04:06 +0000)]
Dependent-sequence initialization of a single element can be direct
list-initialization. Loosen an over-eager assertion to fix PR12453.

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

12 years ago[preprocessor] In Preprocessor::CachingLex() check whether there were more tokens
Argyrios Kyrtzidis [Wed, 4 Apr 2012 02:57:01 +0000 (02:57 +0000)]
[preprocessor] In Preprocessor::CachingLex() check whether there were more tokens
cached during the non-cached lex, otherwise we are going to drop them.

Fixes a bogus "_Pragma takes a parenthesized string literal" error when
expanding consecutive _Pragmas in a macro argument.

Part of rdar://11168596

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

12 years agoWhen computing the conversion sequence in overload resolution
John McCall [Wed, 4 Apr 2012 02:40:27 +0000 (02:40 +0000)]
When computing the conversion sequence in overload resolution
for converting an empty list to a scalar, be sure to initialize
the source and destination types so that comparison of conversion
sequences will work in case there are multiple viable candidates.

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

12 years agoIf something already instantiated is reinstantiated as an explicit definition,
Nick Lewycky [Wed, 4 Apr 2012 02:38:36 +0000 (02:38 +0000)]
If something already instantiated is reinstantiated as an explicit definition,
keep the latter.

No test. This was noticed when poking around something else with GDB. I'm not
able to figure out a testcase that would break due to this bug. Sorry.

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

12 years agoErrorUnsupported on array cookies in the MS C++ ABI code;
John McCall [Wed, 4 Apr 2012 01:33:45 +0000 (01:33 +0000)]
ErrorUnsupported on array cookies in the MS C++ ABI code;
patch by Timur Iskhodzhanov.

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