]> granicus.if.org Git - clang/log
clang
11 years agoUpdate test for change in r185735.
Nick Lewycky [Sat, 6 Jul 2013 00:30:27 +0000 (00:30 +0000)]
Update test for change in r185735.

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

11 years agoRemove referece type onproperty of abstract
Fariborz Jahanian [Fri, 5 Jul 2013 23:50:55 +0000 (23:50 +0000)]
Remove referece type onproperty of abstract
class type. // rdar://14261999

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

11 years ago[comment parsing]: Removes an unsafe API whose
Fariborz Jahanian [Fri, 5 Jul 2013 23:20:55 +0000 (23:20 +0000)]
[comment parsing]: Removes an unsafe API whose
use can cause crash. No test is available. It is uncovered
by code browsing.  // rdar://14348205

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

11 years agoUse llvm::sys::fs::createUniqueFile.
Rafael Espindola [Fri, 5 Jul 2013 21:13:58 +0000 (21:13 +0000)]
Use llvm::sys::fs::createUniqueFile.

Include a test that clang now produces output files with permissions matching
the umask.

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

11 years ago[libclang] Add the new function to libclang.exports
Argyrios Kyrtzidis [Fri, 5 Jul 2013 20:51:44 +0000 (20:51 +0000)]
[libclang] Add the new function to libclang.exports

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

11 years ago[objc migrator]: More knobs to do migration to
Fariborz Jahanian [Fri, 5 Jul 2013 20:46:03 +0000 (20:46 +0000)]
[objc migrator]: More knobs to do migration to
use of objc's properties.

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

11 years ago[libclang] Introduce clang_Cursor_isObjCOptional, which returns whether the declarati...
Argyrios Kyrtzidis [Fri, 5 Jul 2013 20:44:37 +0000 (20:44 +0000)]
[libclang] Introduce clang_Cursor_isObjCOptional, which returns whether the declaration was affected by "@optional"

rdar://14348525.

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

11 years agoDon't use mangleCXXRTTIName in TBAA for C code.
Eli Friedman [Fri, 5 Jul 2013 20:27:40 +0000 (20:27 +0000)]
Don't use mangleCXXRTTIName in TBAA for C code.

This changes the TBAA code so it doesn't use mangleCXXRTTIName in C,
because it doesn't really make sense there.  Also, as sort of a
defense-in-depth change, fix the mangler so it handles C RecordDecls
correctly.

No tests because I don't know the TBAA code well enough to write a test,
and I don't know how else to trigger mangling a local struct in C.

Fixes a crash with r185450 reported by Joerg Sonnenberger.

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

11 years agoUse llvm::sys::fs::createTemporaryFile.
Rafael Espindola [Fri, 5 Jul 2013 20:00:06 +0000 (20:00 +0000)]
Use llvm::sys::fs::createTemporaryFile.

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

11 years agoUse SmallVectorImpl& for function arguments instead of SmallVector.
Craig Topper [Fri, 5 Jul 2013 19:34:19 +0000 (19:34 +0000)]
Use SmallVectorImpl& for function arguments instead of SmallVector.

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

11 years agoFix regression from r185450.
Eli Friedman [Fri, 5 Jul 2013 18:41:30 +0000 (18:41 +0000)]
Fix regression from r185450.

As it turns out, the NoFunction bit for local class mangling needed to be
propagated into more places. r185450 turned what used to be an incorrect
mangling into an assertion.

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

11 years agoObjective-C: diagnose when synthesizing an ivar of
Fariborz Jahanian [Fri, 5 Jul 2013 17:18:11 +0000 (17:18 +0000)]
Objective-C: diagnose when synthesizing an ivar of
abstract class type. // rdar://14261999

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

11 years agoAdd a test case for r185707/PR16547.
Benjamin Kramer [Fri, 5 Jul 2013 15:51:00 +0000 (15:51 +0000)]
Add a test case for r185707/PR16547.

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

11 years agoFix PR16547.
Rafael Espindola [Fri, 5 Jul 2013 15:05:40 +0000 (15:05 +0000)]
Fix PR16547.

We should not be asking unique_file to prepend the system temporary directory
when creating the html report. Unfortunately I don't think we can test this
with the current infrastructure since unique_file ignores MakeAbsolute if the
directory is already absolute and the paths provided by lit are.

I will take a quick look at making this api a bit less error prone.

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

11 years agoWe don't need to check for windows' error codes in here.
Rafael Espindola [Fri, 5 Jul 2013 14:15:24 +0000 (14:15 +0000)]
We don't need to check for windows' error codes in here.

The operator== calls equivalent which calls default_error_condition which
handles windows to posix conversion.

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

11 years agoFix formatting for allocation of new pointer variables.
Daniel Jasper [Fri, 5 Jul 2013 13:30:40 +0000 (13:30 +0000)]
Fix formatting for allocation of new pointer variables.

Before:
T **t = new T * ;
T **q = new T * ();

After:
T **t = new T *;
T **q = new T *();

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

11 years agoImprove detection for preventing certain kind of formatting patterns.
Daniel Jasper [Fri, 5 Jul 2013 09:14:35 +0000 (09:14 +0000)]
Improve detection for preventing certain kind of formatting patterns.

This is a better implementation of r183097. The main purpose is to
prevent certain constructs to be formatted "like a block of text".

Before:
aaaaaaaaaaaaa<
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>* aaaa = new aaaaaaaaaaaaa<
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>(bbbbbbbbbbbbbbbbbbbbbbbb);
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[
    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb] = (*cccccccccccccccc)[
    dddddddddddddddddddddddddddddddddddddddddddddddddddddddd];

After:
aaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaa,
              aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
              aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>* aaaa =
    new aaaaaaaaaaaaa<aaaaaaaaaaaaaaaaaaaaa,
                      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                      aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa>(
        bbbbbbbbbbbbbbbbbbbbbbbb);
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa[
    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb] =
    (*cccccccccccccccc)[
        dddddddddddddddddddddddddddddddddddddddddddddddddddddddd];

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

11 years agoDon't break after a "(" following a binary operator.
Daniel Jasper [Fri, 5 Jul 2013 07:58:34 +0000 (07:58 +0000)]
Don't break after a "(" following a binary operator.

Additionally, allow breaking after c-style casts, but with a high
penalty.

Before:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *foo = (
    aaaaaaaaaaaaaaaaa *)bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;
After:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa *foo = (aaaaaaaaaaaaaaaaa *)
    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb;

This fixes llvm.org/PR16049.

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

11 years agoSema: Call IgnoreParens fewer times in CheckAddressOfOperand
David Majnemer [Fri, 5 Jul 2013 06:23:33 +0000 (06:23 +0000)]
Sema: Call IgnoreParens fewer times in CheckAddressOfOperand

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

11 years agoUse typedef for Densemap contraining SmallVector passed to a function to avoid repeat...
Craig Topper [Fri, 5 Jul 2013 04:43:31 +0000 (04:43 +0000)]
Use typedef for Densemap contraining SmallVector passed to a function to avoid repeating SmallVector size.

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

11 years agoAdd typedefs for Densemaps containing SmallVectors to avoid repeating the SmallVector...
Craig Topper [Fri, 5 Jul 2013 04:33:53 +0000 (04:33 +0000)]
Add typedefs for Densemaps containing SmallVectors to avoid repeating the SmallVector size when creating iterators for the DenseMap.

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

11 years agoUse the new --crash option in commands that are expected to crash.
Rafael Espindola [Fri, 5 Jul 2013 02:53:30 +0000 (02:53 +0000)]
Use the new --crash option in commands that are expected to crash.

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

11 years agoAdd some more documentation on how to navigate from a LambdaExpr::Capture
James Dennett [Thu, 4 Jul 2013 22:15:44 +0000 (22:15 +0000)]
Add some more documentation on how to navigate from a LambdaExpr::Capture
to the associated FieldDecl.

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

11 years agoMinor documentation cleanup
James Dennett [Thu, 4 Jul 2013 22:14:20 +0000 (22:14 +0000)]
Minor documentation cleanup

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

11 years agoAdd test for r185584.
Roman Divacky [Thu, 4 Jul 2013 21:29:24 +0000 (21:29 +0000)]
Add test for r185584.

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

11 years agoRequire a shell for this test.
Rafael Espindola [Thu, 4 Jul 2013 16:23:44 +0000 (16:23 +0000)]
Require a shell for this test.

Some versions of python will expand the glob used in the test, others wont,
causing the test to fail when run with LIT_USE_INTERNAL_SHELL=1.

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

11 years agoAdd 'not' to commands that are expected to fail.
Rafael Espindola [Thu, 4 Jul 2013 16:16:58 +0000 (16:16 +0000)]
Add 'not' to commands that are expected to fail.

This is at least good documentation, but also opens the possibility of
using pipefail.

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

11 years agoLooks like {{.*}} doesn't match the empty string. Fix test.
Rafael Espindola [Thu, 4 Jul 2013 15:29:20 +0000 (15:29 +0000)]
Looks like {{.*}} doesn't match the empty string. Fix test.

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

11 years agoRelax pattern to accept a signext on ppc64.
Rafael Espindola [Thu, 4 Jul 2013 15:25:05 +0000 (15:25 +0000)]
Relax pattern to accept a signext on ppc64.

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

11 years agoReplace 'grep foo | count 0' with 'not grep foo'.
Rafael Espindola [Thu, 4 Jul 2013 15:22:16 +0000 (15:22 +0000)]
Replace 'grep foo | count 0' with 'not grep foo'.

This avoids depending on pipefail not being used.

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

11 years agoRemove test for the old debug format which was XFAILed since 2009.
Rafael Espindola [Thu, 4 Jul 2013 15:14:31 +0000 (15:14 +0000)]
Remove test for the old debug format which was XFAILed since 2009.

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

11 years agoConvert test to FileCheck.
Rafael Espindola [Thu, 4 Jul 2013 15:08:20 +0000 (15:08 +0000)]
Convert test to FileCheck.

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

11 years agoAdd missing expected-warning.
Rafael Espindola [Thu, 4 Jul 2013 15:04:25 +0000 (15:04 +0000)]
Add missing expected-warning.

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

11 years agoRemove more unused uses of -verify.
Rafael Espindola [Thu, 4 Jul 2013 14:58:42 +0000 (14:58 +0000)]
Remove more unused uses of -verify.

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

11 years agoRemove unused -verify.
Rafael Espindola [Thu, 4 Jul 2013 14:51:11 +0000 (14:51 +0000)]
Remove unused -verify.

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

11 years agoFixed typo: NoneComment -> NonComment, no other changes.
Alexander Kornienko [Thu, 4 Jul 2013 14:47:51 +0000 (14:47 +0000)]
Fixed typo: NoneComment -> NonComment, no other changes.

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

11 years agoclang -cc1 has no -fno-unit-at-a-time or -funit-at-a-time. Fix test.
Rafael Espindola [Thu, 4 Jul 2013 14:42:44 +0000 (14:42 +0000)]
clang -cc1 has no -fno-unit-at-a-time or -funit-at-a-time. Fix test.

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

11 years agoUse a clang -cc1 option instead of -m32 and remove tcl quotes.
Rafael Espindola [Thu, 4 Jul 2013 14:36:22 +0000 (14:36 +0000)]
Use a clang -cc1 option instead of -m32 and remove tcl quotes.

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

11 years agoRemove tcl quotes.
Rafael Espindola [Thu, 4 Jul 2013 14:30:41 +0000 (14:30 +0000)]
Remove tcl quotes.

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

11 years agoConvert test to FileCheck.
Rafael Espindola [Thu, 4 Jul 2013 14:28:33 +0000 (14:28 +0000)]
Convert test to FileCheck.

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

11 years agoReplace void with int to make this a valid C++ file.
Rafael Espindola [Thu, 4 Jul 2013 14:25:25 +0000 (14:25 +0000)]
Replace void with int to make this a valid C++ file.

The test was passing because clang would still print the ast before exiting
with an error. Since that didn't seem to be the intent of the test, I change
the test instead of adding 'not' to the command line.

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

11 years agoRemove old test.
Rafael Espindola [Thu, 4 Jul 2013 14:20:52 +0000 (14:20 +0000)]
Remove old test.

It was trivially passing because of the tcl quotes and we have better datalayout
tests.

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

11 years agoRemove old test.
Rafael Espindola [Thu, 4 Jul 2013 14:18:32 +0000 (14:18 +0000)]
Remove old test.

It was not clear what was being tested and the test was trivially passing
by getting grep confused with tcl quotes.

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

11 years agoClang has no nested function support. Delete this test.
Rafael Espindola [Thu, 4 Jul 2013 14:13:53 +0000 (14:13 +0000)]
Clang has no nested function support. Delete this test.

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

11 years agoUse SmallVectorImpl::const_iterator instead of SmallVector to avoid specifying the...
Craig Topper [Thu, 4 Jul 2013 13:11:33 +0000 (13:11 +0000)]
Use SmallVectorImpl::const_iterator instead of SmallVector to avoid specifying the vector size.

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

11 years agoAdded AlwaysBreakBeforeMultilineStrings option.
Alexander Kornienko [Thu, 4 Jul 2013 12:02:44 +0000 (12:02 +0000)]
Added AlwaysBreakBeforeMultilineStrings option.

Summary:
Always breaking before multiline strings can help format complex
expressions containing multiline strings more consistently, and avoid consuming
too much horizontal space.

Reviewers: djasper

Reviewed By: djasper

CC: cfe-commits, klimek
Differential Revision: http://llvm-reviews.chandlerc.com/D1097

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

11 years agoAdd test for PR4997. This has been fixed for a while.
Richard Smith [Thu, 4 Jul 2013 04:10:46 +0000 (04:10 +0000)]
Add test for PR4997. This has been fixed for a while.

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

11 years agoTestcase for PR14130, which was probably fixed by r183859.
Richard Smith [Thu, 4 Jul 2013 04:04:20 +0000 (04:04 +0000)]
Testcase for PR14130, which was probably fixed by r183859.

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

11 years agoAdd a space between closing template '>' to unbreak build.
Craig Topper [Thu, 4 Jul 2013 03:15:42 +0000 (03:15 +0000)]
Add a space between closing template '>' to unbreak build.

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

11 years agoUse SmallVectorImpl instead of SmallVector for iterators and references to avoid...
Craig Topper [Thu, 4 Jul 2013 03:08:24 +0000 (03:08 +0000)]
Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.

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

11 years ago[analyzer] Suppress reports reported in std::list
Anna Zaks [Thu, 4 Jul 2013 02:38:10 +0000 (02:38 +0000)]
[analyzer] Suppress reports reported in std::list

The motivation is to suppresses false use-after-free reports that occur when calling
std::list::pop_front() or std::list::pop_back() twice. The analyzer does not
reason about the internal invariants of the list implementation, so just do not report
any of warnings in std::list.

Fixes radar://14317928.

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

11 years ago[analyzer] Make sure that inlined defensive checks work on div by zero.
Anna Zaks [Thu, 4 Jul 2013 02:38:06 +0000 (02:38 +0000)]
[analyzer] Make sure that inlined defensive checks work on div by zero.

This suppresses a false positive in std::hash_map.
Fixes  radar://14255587.

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

11 years agoPart of PR15673: If a function template has a default argument in which
Richard Smith [Thu, 4 Jul 2013 01:01:24 +0000 (01:01 +0000)]
Part of PR15673: If a function template has a default argument in which
substitution failed, report that as a substitution failure rather than
pretending that there was no default argument.

The test cases in PR15673 have exposed some pre-existing poor diagnostics here.

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

11 years agoImprove -Wlogical-not-parentheses to catch when the not is applied to an enum.
Richard Trieu [Thu, 4 Jul 2013 00:50:18 +0000 (00:50 +0000)]
Improve -Wlogical-not-parentheses to catch when the not is applied to an enum.

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

11 years ago[ObjectiveC migrator] relax the rules for setter/getter
Fariborz Jahanian [Thu, 4 Jul 2013 00:24:32 +0000 (00:24 +0000)]
[ObjectiveC migrator] relax the rules for setter/getter
types when deciding on validity of a property
inclusion. // rdar://14345082

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

11 years agoPR16480: Reimplement token-caching for constructor initializer lists. This
Richard Smith [Thu, 4 Jul 2013 00:13:48 +0000 (00:13 +0000)]
PR16480: Reimplement token-caching for constructor initializer lists. This
previously didn't work if a mem-initializer-id had a template argument which
contained parentheses or braces.

We now implement a simple rule: just look for a ') {' or '} {' that is not
nested. The '{' is assumed to start the function-body. There are still two
cases which we misparse, where the ') {' comes from a compound literal or
from a lambda. The former case is not valid C++, and the latter will probably
not be valid C++ once DR1607 is resolved, so these seem to be of low value,
and we do not regress on them with this change. EDG and g++ also misparse
both of these cases.

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

11 years agoMinor refactoring of my last patch.
Fariborz Jahanian [Wed, 3 Jul 2013 23:44:11 +0000 (23:44 +0000)]
Minor refactoring of my last patch.

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

11 years ago[ObjectiveC Migration]: Provide knobs for
Fariborz Jahanian [Wed, 3 Jul 2013 23:05:00 +0000 (23:05 +0000)]
[ObjectiveC Migration]: Provide knobs for
migrating setter/getter methods to an eventual
property declaraiton. This is wip.
// rdar://14345082

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

11 years agoCheck LongDoubleFormat instead of just Width as this is PowerPC specific.
Roman Divacky [Wed, 3 Jul 2013 21:08:41 +0000 (21:08 +0000)]
Check LongDoubleFormat instead of just Width as this is PowerPC specific.

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

11 years ago[PowerPC] FreeBSD does not require f128 in its data layout string.
Bill Schmidt [Wed, 3 Jul 2013 21:03:06 +0000 (21:03 +0000)]
[PowerPC] FreeBSD does not require f128 in its data layout string.

Long double is 64 bits on FreeBSD PPC, so the f128 entry is superfluous.

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

11 years ago"bool" should be a context-sensitive keyword in Altivec mode.
Bill Schmidt [Wed, 3 Jul 2013 20:54:09 +0000 (20:54 +0000)]
"bool" should be a context-sensitive keyword in Altivec mode.

PR16456 reported that Clang implements a hybrid between AltiVec's
"Keyword and Predefine Method" and its "Context Sensitive Keyword
Method," where "bool" is always a keyword, but "vector" and "pixel"
are context-sensitive keywords.  This isn't permitted by the AltiVec
spec.  For consistency with gcc, this patch implements the Context
Sensitive Keyword Method for bool, and stops treating true and false
as keywords in Altivec mode.

The patch removes KEYALTIVEC as a trigger for defining these keywords
in include/clang/Basic/TokenKinds.def, and adds logic for "vector
bool" that mirrors the existing logic for "vector pixel."  The test
case is taken from the bug report.

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

11 years agoAdd support for TF/TC modes available on eg. PowerPC64.
Roman Divacky [Wed, 3 Jul 2013 20:48:06 +0000 (20:48 +0000)]
Add support for TF/TC modes available on eg. PowerPC64.

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

11 years agoUpdate testing cases to check dwarf-2 for Darwin.
Manman Ren [Wed, 3 Jul 2013 20:45:07 +0000 (20:45 +0000)]
Update testing cases to check dwarf-2 for Darwin.

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

11 years agoRevert r185557 as it was a bit (a lot) premature.
Chad Rosier [Wed, 3 Jul 2013 20:37:50 +0000 (20:37 +0000)]
Revert r185557 as it was a bit (a lot) premature.

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

11 years agoDont define __LONG_DOUBLE_128__ unless LongDoubleWidth is really 128bits width.
Roman Divacky [Wed, 3 Jul 2013 19:45:54 +0000 (19:45 +0000)]
Dont define __LONG_DOUBLE_128__ unless LongDoubleWidth is really 128bits width.
It's not the case on ie. FreeBSD.

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

11 years agoAdd target hook CodeGen queries when generating builtin pow*.
Eli Bendersky [Wed, 3 Jul 2013 19:19:12 +0000 (19:19 +0000)]
Add target hook CodeGen queries when generating builtin pow*.

Without fmath-errno, Clang currently generates calls to @llvm.pow.* intrinsics
when it sees pow*(). This may not be suitable for all targets (for
example le32/PNaCl), so the attached patch adds a target hook that CodeGen
queries. The target can state its preference for having or not having the
intrinsic generated. Non-PNaCl behavior remains unchanged;
PNaCl-specific test added.

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

11 years agoEnable -ffreestanding for this test, to avoid #include_next'ing the system's
Richard Smith [Wed, 3 Jul 2013 18:35:53 +0000 (18:35 +0000)]
Enable -ffreestanding for this test, to avoid #include_next'ing the system's
<stdint.h> (which might not exist or might not work).

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

11 years agoProvide test case for commit r185544.
Bill Schmidt [Wed, 3 Jul 2013 18:21:12 +0000 (18:21 +0000)]
Provide test case for commit r185544.

Verify that assembling an empty file does not auto-include altivec.h.

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

11 years agoAdd file suffix for assembler-with-cpp.
Eli Friedman [Wed, 3 Jul 2013 18:06:11 +0000 (18:06 +0000)]
Add file suffix for assembler-with-cpp.

Fixes crash when trying to recover from a crash on an assembler-with-cpp
file.  (Not sure how to write a testcase.)

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

11 years agoChris has agree to take part ownership of the driver.
Chad Rosier [Wed, 3 Jul 2013 17:25:50 +0000 (17:25 +0000)]
Chris has agree to take part ownership of the driver.

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

11 years ago[scan-build] Log compiler invocation to stderr, not stdout.
Jordan Rose [Wed, 3 Jul 2013 16:42:02 +0000 (16:42 +0000)]
[scan-build] Log compiler invocation to stderr, not stdout.

This is important for preprocessing steps, which may output to stdout.

Also, change ENV accesses using barewords to use string keys instead.

PR16414

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

11 years agoWith CLANG_ENABLE_STATIC_ANALYZER=0, link clang properly and skip clang-check.
Jordan Rose [Wed, 3 Jul 2013 16:20:29 +0000 (16:20 +0000)]
With CLANG_ENABLE_STATIC_ANALYZER=0, link clang properly and skip clang-check.

Previously, the CMake build still tried to link clang against the static
analyzer libraries, even if CLANG_ENABLE_STATIC_ANALYZER was off.
Furthermore, clang-check depends on the analyzer, so it should be disabled
(in both CMake and configure builds).

In theory, clang-check could be made to conditionally include analyzer
support (like clang itself), but for now this at least gets a CMake ALL_BUILD
working.

Patch by Stephen Kelly, modified by me.

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

11 years agoFix PR16454: Don't #include altivec.h when preprocessing assembly.
Bill Schmidt [Wed, 3 Jul 2013 15:36:02 +0000 (15:36 +0000)]
Fix PR16454: Don't #include altivec.h when preprocessing assembly.

When the -maltivec flag is present, altivec.h is auto-included for the
compilation.  This is not appropriate when the job action is to
preprocess a file containing assembly code.  So don't do that.

I was unable to convert the test in the bug report into a regression
test.  The original symptom was exposed with:

  % touch x.S
  % ./bin/clang -target powerpc64-unknown-linux-gnu -maltivec -S -o - x.S

I tried this test (and numerous variants) on a PPC64 system:

----------------------------------------------------------------------------
// RUN: touch %t
// RUN: %clang -maltivec -S %t -o - | FileCheck %s

// Verify that assembling an empty file does not auto-include altivec.h.

// CHECK-NOT: static vector
----------------------------------------------------------------------------

However, this test passes for some reason even on a clang built
without the fix.  I'd be happy to add a test case but at this point
I'm not able to figure one out, and I don't want to hold up the patch
unnecessarily.  Please let me know if you have ideas.

Thanks,
Bill

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

11 years agoTest case for PR7887 - failed with asm("")
Serge Pavlov [Wed, 3 Jul 2013 15:32:48 +0000 (15:32 +0000)]
Test case for PR7887 - failed with asm("")

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

11 years agoWe don't need to know the OpenSUSE version, so don't parse it.
Rafael Espindola [Wed, 3 Jul 2013 14:14:00 +0000 (14:14 +0000)]
We don't need to know the OpenSUSE version, so don't parse it.

Patch by Johannes Obermayr.

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

11 years agoPrevent error message when formatting an empty file.
Daniel Jasper [Wed, 3 Jul 2013 12:22:18 +0000 (12:22 +0000)]
Prevent error message when formatting an empty file.

This fixes llvm.org/PR16514.

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

11 years agoDon't insert confusing line breaks in comparisons.
Daniel Jasper [Wed, 3 Jul 2013 10:34:47 +0000 (10:34 +0000)]
Don't insert confusing line breaks in comparisons.

In general, clang-format breaks after an operator if the LHS spans
multiple lines. Otherwise, this can lead to confusing effects and
effectively hide the operator precendence, e.g. in

if (aaaaaaaaaaaaaa ==
        bbbbbbbbbbbbbb && c) { ...

This patch removes this rule for comparisons, if the LHS is not a binary
expression itself as many users were wondering why clang-format inserts
an unnecessary linebreak.

Before:
if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) >
    5) { ...

After:
if (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(
        aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) > 5) { ...

In the long run, we might:
- Want to do this for other binary expressions as well.
- Do this only if the RHS is short or even only if it is a literal.

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

11 years ago[analyzer] Improve handling of noreturn destructors
Pavel Labath [Wed, 3 Jul 2013 08:23:49 +0000 (08:23 +0000)]
[analyzer] Improve handling of noreturn destructors

Summary:
The analyzer incorrectly handled noreturn destructors which were hidden inside
function calls. This happened because NoReturnFunctionChecker only listened for
PostStmt events, which are not executed for destructor calls. I've changed it to
listen to PostCall events, which should catch both cases.

Reviewers: jordan_rose

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1056

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

11 years agoFixed test options.
Serge Pavlov [Wed, 3 Jul 2013 01:43:57 +0000 (01:43 +0000)]
Fixed test options.

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

11 years agoAllow typo correction to try removing nested name specifiers.
Kaelyn Uhrain [Tue, 2 Jul 2013 23:47:44 +0000 (23:47 +0000)]
Allow typo correction to try removing nested name specifiers.

The removal is tried by retrying the failed lookup of a correction
candidate with either the MemberContext or SS (CXXScopeSpecifier) or
both set to NULL if they weren't already. If the candidate identifier
is then looked up successfully, make a note in the candidate that the
SourceRange should include any existing nested name specifier even if
the candidate isn't adding a different one (i.e. the candidate has a
NULL NestedNameSpecifier).

Also tweak the diagnostic messages to differentiate between a suggestion
that just replaces the identifer but leaves the existing nested name
specifier intact and one that replaces the entire qualified identifier,
in cases where the suggested replacement is unqualified.

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

11 years agoLook for corrections in enclosing namespaces that require a global NestedNameSpecifier.
Kaelyn Uhrain [Tue, 2 Jul 2013 23:47:35 +0000 (23:47 +0000)]
Look for corrections in enclosing namespaces that require a global NestedNameSpecifier.

CorrectTypo will now see and consider those corrections that are effectively
shadowed by other declarations in a closer context when resolved via an
unqualified lookup. This involves adding any parent namespaces to the set of
namespaces as fully-qualified name specifiers, and also adding potential
corrections that passed name lookup but were rejected by the given
CorrectionCandidateCallback into the set of failed corrections that should be
tried with the set of namespace specifiers.

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

11 years agoDebug Info: set default to gdwarf-2 for Darwin.
Manman Ren [Tue, 2 Jul 2013 23:15:25 +0000 (23:15 +0000)]
Debug Info: set default to gdwarf-2 for Darwin.

Darwin systems currently do not support dwarf version 3 or above. When we are
ready, we can bump the default to gdwarf-4 for Darwin.

For other systems, the default is dwarf version 3, if everything goes smoothly,
we can bump the version to 4.

rdar://13591116

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

11 years agoRedirect the output of a test to a temporary file to prevent messing up
Richard Trieu [Tue, 2 Jul 2013 20:49:10 +0000 (20:49 +0000)]
Redirect the output of a test to a temporary file to prevent messing up
the test environment.

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

11 years agoDocumentation: Update docs for C++ lambdas to more accurately reflect
James Dennett [Tue, 2 Jul 2013 20:28:47 +0000 (20:28 +0000)]
Documentation: Update docs for C++ lambdas to more accurately reflect
C++1y init-capture support, and to improve some Doxygen markup.

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

11 years agoDebug Info: clean up usage of Verify.
Manman Ren [Tue, 2 Jul 2013 19:01:53 +0000 (19:01 +0000)]
Debug Info: clean up usage of Verify.

No functionality change. It should suffice to check the type of a debug info
metadata, instead of calling Verify.

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

11 years ago[ms-cxxabi] Mangle variadic template parameter packs
Reid Kleckner [Tue, 2 Jul 2013 18:10:07 +0000 (18:10 +0000)]
[ms-cxxabi] Mangle variadic template parameter packs

Unlike Itanium, there is no code to indicate the beginning of a
parameter pack.  I tested this with MSVC 2013, which is the only version
that implements variadic templates so far.

This is needed to compile APInt.cpp for the MS C++ ABI.

Reviewers: timurrrr

Differential Revision: http://llvm-reviews.chandlerc.com/D1077

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

11 years agoAdd regression test for PR12331.
Richard Smith [Tue, 2 Jul 2013 18:08:50 +0000 (18:08 +0000)]
Add regression test for PR12331.

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

11 years agoMore fixes for block mangling.
Eli Friedman [Tue, 2 Jul 2013 17:52:28 +0000 (17:52 +0000)]
More fixes for block mangling.

Make sure we properly treat names defined inside a block as local
names.  There are basically three fixes here.  One, correctly
treat blocks as a context where we need to use local-name mangling using
the new isLocalContainerContext helper. Two, make
CXXNameMangler::manglePrefix handle local names in a consistent way.
Three, extend CXXNameMangler::mangleLocalName so it can mangle a block
correctly.

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

11 years agoFix to PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout.
Serge Pavlov [Tue, 2 Jul 2013 17:31:56 +0000 (17:31 +0000)]
Fix to PR15826 - clang hits assert in clang::ASTContext::getASTRecordLayout.

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

11 years ago[analyzer] Pointers-to-members are (currently) Locs, not NonLocs.
Jordan Rose [Tue, 2 Jul 2013 16:50:24 +0000 (16:50 +0000)]
[analyzer] Pointers-to-members are (currently) Locs, not NonLocs.

While we don't model pointers-to-members besides "null" and "non-null",
we were using Loc symbols for valid pointers and NonLoc integers for the
null case. This hit the assert committed in r185401.

Fixed by using a true (Loc) null for null member pointers.

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

11 years agoSuppress "control reaches end of non-void function" warning when compiling with gcc.
Andy Gibbs [Tue, 2 Jul 2013 16:01:56 +0000 (16:01 +0000)]
Suppress "control reaches end of non-void function" warning when compiling with gcc.

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

11 years agoSimplify getting CXXRecordDecl from a base iterator
Timur Iskhodzhanov [Tue, 2 Jul 2013 16:00:40 +0000 (16:00 +0000)]
Simplify getting CXXRecordDecl from a base iterator

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

11 years agoFix ranges computed by git clang-format.
Daniel Jasper [Tue, 2 Jul 2013 13:20:35 +0000 (13:20 +0000)]
Fix ranges computed by git clang-format.

Before, the computed byte range would include the trailing newline.
clang-format on the other hand counts whitespace as belonging to the
following token, so that git-clang-format inadvertendly reformats the
first unmodified line as well.

It is not entirely clear whether clang-format's behavior itself should
be modified, but for now this seems to be a safe change.

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

11 years agoFix formatting of long declarations with const type.
Daniel Jasper [Tue, 2 Jul 2013 09:47:29 +0000 (09:47 +0000)]
Fix formatting of long declarations with const type.

Before (exceeding the column limit):
LoooooooooooooooooooooooooooooooooooooooongType const LoooooooooooooooooooooooooooooooooooooooongVariable;

After:
LoooooooooooooooooooooooooooooooooooooooongType const
LoooooooooooooooooooooooooooooooooooooooongVariable;

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

11 years agoTeach static analyzer about AttributedStmts
Pavel Labath [Tue, 2 Jul 2013 09:38:48 +0000 (09:38 +0000)]
Teach static analyzer about AttributedStmts

Summary:
Static analyzer used to abort when encountering AttributedStmts, because it
asserted that the statements should not appear in the CFG. This is however not
the case, since at least the clang::fallthrough annotation makes it through.

This commit simply makes the analyzer ignore the statement attributes.

CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1030

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

11 years agoDon't skip lambdas when mangling local vars.
Eli Friedman [Tue, 2 Jul 2013 02:01:18 +0000 (02:01 +0000)]
Don't skip lambdas when mangling local vars.

This commit rearranges the logic in CXXNameMangler::mangleLocalName and
GetLocalClassDecl so that it doesn't accidentally skip over lambdas.  It
also reduces code duplication a bit.

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

11 years ago[analyzer] Explicitly disallow mixed Loc-NonLoc comparisons.
Jordan Rose [Tue, 2 Jul 2013 01:37:40 +0000 (01:37 +0000)]
[analyzer] Explicitly disallow mixed Loc-NonLoc comparisons.

The one bit of code that was using this is gone, and neither C nor C++
actually allows this. Add an assertion and remove dead code.

Found by Matthew Dempsky!

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

11 years agoSimplify code in mangler.
Eli Friedman [Mon, 1 Jul 2013 21:29:48 +0000 (21:29 +0000)]
Simplify code in mangler.

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

11 years agoSimplify linkage code for static local vars.
Eli Friedman [Mon, 1 Jul 2013 20:53:07 +0000 (20:53 +0000)]
Simplify linkage code for static local vars.

The key insight here is that weak linkage for a static local variable
should always mean linkonce_odr, because every file that needs it will
generate a definition.  We don't actually care about the precise linkage
of the parent context.  I feel a bit silly that I didn't realize this before.

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

11 years agoFix CMakeLists.txt.
Eli Friedman [Mon, 1 Jul 2013 20:34:51 +0000 (20:34 +0000)]
Fix CMakeLists.txt.

Sorry about that.

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