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

11 years agoFix mangling for block literals.
Eli Friedman [Mon, 1 Jul 2013 20:22:57 +0000 (20:22 +0000)]
Fix mangling for block literals.

Blocks, like lambdas, can be written in contexts which are required to be
treated as the same under ODR.  Unlike lambdas, it isn't possible to actually
take the address of a block, so the mangling of the block itself doesn't
matter. However, objects like static variables inside a block do need to
be mangled in a consistent way.

There are basically three components here. One, block literals need a
consistent numbering.  Two, objects/types inside a block literal need
to be mangled using it.  Three, objects/types inside a block literal need
to have their linkage computed correctly.

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

11 years agoFix MSP430 builtin types.
Anton Korobeynikov [Mon, 1 Jul 2013 19:42:40 +0000 (19:42 +0000)]
Fix MSP430 builtin types.

Patch by Job Noorman!

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

11 years agoFix incorrect token counting introduced by r185319.
Daniel Jasper [Mon, 1 Jul 2013 16:43:38 +0000 (16:43 +0000)]
Fix incorrect token counting introduced by r185319.

This lead to weird formatting.
Before:
DoSomethingWithVector({ {} /* No data */ }, {
  { 1, 2 }
});
After:
DoSomethingWithVector({ {} /* No data */ }, { { 1, 2 } });

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

11 years agoAvoid column limit violation in block comments in certain cases.
Alexander Kornienko [Mon, 1 Jul 2013 13:42:42 +0000 (13:42 +0000)]
Avoid column limit violation in block comments in certain cases.

Summary:
Add penalty when an excessively long line in a block comment can not be
broken on a leading whitespace. Lack of this addition can lead to severe column
width violations when they can be easily avoided.

Reviewers: djasper

Reviewed By: djasper

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

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

11 years agoDon't align "} // namespace" comments.
Daniel Jasper [Mon, 1 Jul 2013 11:22:57 +0000 (11:22 +0000)]
Don't align "} // namespace" comments.

This is not all bad, but people are often surprised by it.

Before:
namespace {
int SomeVariable = 0; // comment
}                     // namespace

After:
namespace {
int SomeVariable = 0; // comment
} // namespace

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

11 years agoclang/test/lit.cfg: Improve is_filesystem_case_insensitive() to work properly on...
NAKAMURA Takumi [Mon, 1 Jul 2013 09:51:55 +0000 (09:51 +0000)]
clang/test/lit.cfg: Improve is_filesystem_case_insensitive() to work properly on cygwin.

Cygwin does not accept the form /CYGDRIVE/X/PATH/TO/FILE against /cygdrive/X/PATH/TO/FILE.
"cygdrive" must be lower-cased.

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

11 years agoDon't add an extra space before ellipsis after pointers.
Daniel Jasper [Mon, 1 Jul 2013 09:47:25 +0000 (09:47 +0000)]
Don't add an extra space before ellipsis after pointers.

Before (for styles where the pointer binds to the type):
template <class... Ts> void Foo(Ts... ts) {}
template <class... Ts> void Foo(Ts* ... ts) {}
After:
template <class... Ts> void Foo(Ts... ts) {}
template <class... Ts> void Foo(Ts*... ts) {}

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

11 years agoKeep space between pointer and block comment.
Daniel Jasper [Mon, 1 Jul 2013 09:34:09 +0000 (09:34 +0000)]
Keep space between pointer and block comment.

Before: void f(int */* unused */) {}
After:  void f(int * /* unused */) {}

The previous version seems to be valid C++ code but confuses many syntax
highlighters.

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

11 years agoFix braced-list detection in lieu of trailing comments.
Daniel Jasper [Mon, 1 Jul 2013 09:15:46 +0000 (09:15 +0000)]
Fix braced-list detection in lieu of trailing comments.

Before:
DoSomethingWithVector({
} /* No data */);
After:
DoSomethingWithVector({} /* No data */);

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

11 years agoFollowing the modification introduced in llvm by commit 185311
Sylvestre Ledru [Mon, 1 Jul 2013 08:13:34 +0000 (08:13 +0000)]
Following the modification introduced in llvm by commit 185311

The build system is currently miss-identifying GNU/kFreeBSD as FreeBSD.
This kind of simplification is sometimes useful, but in general it's not correct.

As GNU/kFreeBSD is an hybrid system, for kernel-related issues we want to match the
build definitions used for FreeBSD, whereas for userland-related issues we want to
match the definitions used for other systems with Glibc.

The current modification adjusts the build system so that they can be distinguished,
and explicitly adds GNU/kFreeBSD to the build checks in which it belongs.

Fixes bug #16445.

Patch by Robert Millan in the context of Debian.

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

11 years agoPut helper class in anonymous namespace.
Craig Topper [Mon, 1 Jul 2013 06:34:58 +0000 (06:34 +0000)]
Put helper class in anonymous namespace.

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

11 years agoPut helper class in anonymous namespace.
Craig Topper [Mon, 1 Jul 2013 06:29:40 +0000 (06:29 +0000)]
Put helper class in anonymous namespace.

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

11 years agoPR16502: Fix a dumb bug where we might look past the last initializer in an
Richard Smith [Mon, 1 Jul 2013 06:08:20 +0000 (06:08 +0000)]
PR16502: Fix a dumb bug where we might look past the last initializer in an
InitListExpr.

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

11 years agoPut helper classes in an anonymous namespace.
Craig Topper [Mon, 1 Jul 2013 04:21:54 +0000 (04:21 +0000)]
Put helper classes in an anonymous namespace.

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

11 years agoUse LLVM_DELETED_FUNCTION on unimplemented copy constructor and assignment operator.
Craig Topper [Mon, 1 Jul 2013 04:07:34 +0000 (04:07 +0000)]
Use LLVM_DELETED_FUNCTION on unimplemented copy constructor and assignment operator.

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

11 years agoPut helper classes in an anonymous namespace.
Craig Topper [Mon, 1 Jul 2013 04:03:19 +0000 (04:03 +0000)]
Put helper classes in an anonymous namespace.

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

11 years agoUse static for helper functions instead of an anonymous namespace per coding standards.
Craig Topper [Mon, 1 Jul 2013 03:38:29 +0000 (03:38 +0000)]
Use static for helper functions instead of an anonymous namespace per coding standards.

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

11 years agoMake string pointer const.
Craig Topper [Sun, 30 Jun 2013 22:44:02 +0000 (22:44 +0000)]
Make string pointer const.

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

11 years agoPut helper classes into anonymous namespace.
Craig Topper [Sun, 30 Jun 2013 22:29:28 +0000 (22:29 +0000)]
Put helper classes into anonymous namespace.

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

11 years agoDocumentation cleanup for TypeOrdering.h.
James Dennett [Sun, 30 Jun 2013 21:23:07 +0000 (21:23 +0000)]
Documentation cleanup for TypeOrdering.h.

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

11 years agoRestore r184205 and associated commits (after commit of r185290)
Stephen Lin [Sun, 30 Jun 2013 20:40:16 +0000 (20:40 +0000)]
Restore r184205 and associated commits (after commit of r185290)

This allows clang to use the backend parameter attribute 'returned' when generating 'this'-returning constructors and destructors in ARM and MSVC C++ ABIs.

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

11 years agoDocumentation cleanup: Mostly formatting \brief documentation, also fix a
James Dennett [Sun, 30 Jun 2013 19:39:15 +0000 (19:39 +0000)]
Documentation cleanup: Mostly formatting \brief documentation, also fix a
typo or two.

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

11 years agoTeach -Wunsequenced that the side-effects of a function evaluation are sequenced
Richard Smith [Sun, 30 Jun 2013 10:40:20 +0000 (10:40 +0000)]
Teach -Wunsequenced that the side-effects of a function evaluation are sequenced
before the value computation of the result. In C, this is implied by there being
a sequence point after their evaluation, and in C++, it's implied by the
side-effects being sequenced before the expressions and statements in the
function body.

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

11 years agoReinstate r185229, reverted in r185256, with a tweak: further ignore the
Richard Smith [Sun, 30 Jun 2013 09:48:50 +0000 (09:48 +0000)]
Reinstate r185229, reverted in r185256, with a tweak: further ignore the
standard's rule that an extern "C" declaration conflicts with any entity in the
global scope with the same name. Now we only care if the global scope entity is
a variable declaration (and so might have the same mangled name as the extern
"C" declaration). This has been reported as a standard defect.

Original commit message:

PR7927, PR16247: Reimplement handling of matching extern "C" declarations
across scopes.

When we declare an extern "C" name that is not a redeclaration of an entity in
the same scope, check whether it redeclares some extern "C" entity from another
scope, and if not, check whether it conflicts with a (non-extern-"C") entity in
the translation unit.

When we declare a name in the translation unit that is not a redeclaration,
check whether it conflicts with any extern "C" entities (possibly from other
scopes).

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

11 years agoLex: Cleanup whitespace in PragmaRegionHandler
David Majnemer [Sun, 30 Jun 2013 08:18:16 +0000 (08:18 +0000)]
Lex: Cleanup whitespace in PragmaRegionHandler

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

11 years agoBug fix: Make RecursiveASTVisitor<T>::TraverseLambdaExpr call
James Dennett [Sun, 30 Jun 2013 03:13:35 +0000 (03:13 +0000)]
Bug fix: Make RecursiveASTVisitor<T>::TraverseLambdaExpr call
WalkUpFromLambdaExpr, so that the Visit* functions are called
on that AST node.

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

11 years agoAdd enumerators to TestVisitor::Language to allow visitor tests to
James Dennett [Sun, 30 Jun 2013 03:05:49 +0000 (03:05 +0000)]
Add enumerators to TestVisitor::Language to allow visitor tests to
explicitly specify use of C++98 or C++11. Lang_CXX is preserved as
an alias for Lang_CXX98.

This does not add Lang_CXX1Y or Lang_C11, on the assumption that it's
better to add them if/when they are needed.

(This is a prerequisite for a test in a later patch for RecursiveASTVisitor.)

Reviewed by Richard Smith.

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

11 years agoCompress pairs. No functionality change.
Benjamin Kramer [Sat, 29 Jun 2013 17:52:13 +0000 (17:52 +0000)]
Compress pairs. No functionality change.

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

11 years agoDriver: Push triple objects around instead of going to std::string all the time.
Benjamin Kramer [Sat, 29 Jun 2013 16:37:14 +0000 (16:37 +0000)]
Driver: Push triple objects around instead of going to std::string all the time.

No functionality change.

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

11 years agoRevert r185229 as it breaks compilation of <windows.h>
Timur Iskhodzhanov [Sat, 29 Jun 2013 08:38:42 +0000 (08:38 +0000)]
Revert r185229 as it breaks compilation of <windows.h>

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

11 years ago[test] Add test case for rdar://14183893.
Argyrios Kyrtzidis [Fri, 28 Jun 2013 23:47:22 +0000 (23:47 +0000)]
[test] Add test case for rdar://14183893.

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

11 years agoRemove dead code.
Eli Friedman [Fri, 28 Jun 2013 22:13:27 +0000 (22:13 +0000)]
Remove dead code.

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

11 years agoPR7927, PR16247: Reimplement handling of matching extern "C" declarations
Richard Smith [Fri, 28 Jun 2013 22:03:51 +0000 (22:03 +0000)]
PR7927, PR16247: Reimplement handling of matching extern "C" declarations
across scopes.

When we declare an extern "C" name that is not a redeclaration of an entity in
the same scope, check whether it redeclares some extern "C" entity from another
scope, and if not, check whether it conflicts with a (non-extern-"C") entity in
the translation unit.

When we declare a name in the translation unit that is not a redeclaration,
check whether it conflicts with any extern "C" entities (possibly from other
scopes).

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

11 years agoFix error recovery with in-class initializer.
Eli Friedman [Fri, 28 Jun 2013 21:07:41 +0000 (21:07 +0000)]
Fix error recovery with in-class initializer.

Previously, for a field with an invalid in-class initializer, we
would create a CXXDefaultInitExpr referring to a null Expr*.
This is not a good idea.

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

11 years agoFix line endings.
Eli Friedman [Fri, 28 Jun 2013 20:48:34 +0000 (20:48 +0000)]
Fix line endings.

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