]> granicus.if.org Git - clang/log
clang
10 years agoclang-format: Be more aggressive on incorrect code.
Daniel Jasper [Fri, 18 Oct 2013 17:20:57 +0000 (17:20 +0000)]
clang-format: Be more aggressive on incorrect code.

Before, clang-format would not adjust leading indents if it found a
structural error (e.g. unmatched {}). It seems, however, that
clang-format has gotten good enough at parsing the code structure that
this hurts in almost all cases. Commonly, while writing code, it is
very useful to be able to correclty indent incomplete if statements or
for loops.

In case this leads to errors that we don't anticipate, we need to find
out and fix those.

This fixed llvm.org/PR17594.

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

10 years agoclang-format: Don't force linebreak between return and multiline string.
Daniel Jasper [Fri, 18 Oct 2013 16:47:55 +0000 (16:47 +0000)]
clang-format: Don't force linebreak between return and multiline string.

This looks ugly and leads to llvm.org/PR17590.

Before (with AlwaysBreakBeforeMultilineStrings):
  return
      "aaaa"
      "bbbb";

After:
  return "aaaa"
         "bbbb";

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

10 years agoMake clang-format slightly more willing to break before trailing annotations.
Daniel Jasper [Fri, 18 Oct 2013 16:34:40 +0000 (16:34 +0000)]
Make clang-format slightly more willing to break before trailing annotations.

Specifically, prefer breaking before trailing annotations over breaking
before the first parameter.

Before:
  void ffffffffffffffffffffffff(
      int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
      int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa) OVERRIDE;

After:
  void ffffffffffffffffffffffff(int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,
                                int aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa)
      OVERRIDE;

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

10 years agoAdd another MinGW header include path
Hans Wennborg [Fri, 18 Oct 2013 15:48:58 +0000 (15:48 +0000)]
Add another MinGW header include path

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

10 years agoclang-format: Improve formatting of templated builder-type calls.
Daniel Jasper [Fri, 18 Oct 2013 15:23:06 +0000 (15:23 +0000)]
clang-format: Improve formatting of templated builder-type calls.

Before:
  aaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaa().aaaaaaaaaaaaaaaaa().has<
      bbbbbbbbbbbbbbbbbbbbb>();

After:
  aaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaa()
      .aaaaaaaaaaaaaaaaaaaaaaaaaa()
      .has<bbbbbbbbbbbbbbbbbbbbb>();

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

10 years ago[AArch64] Add support for NEON scalar extract narrow instructions.
Chad Rosier [Fri, 18 Oct 2013 14:03:36 +0000 (14:03 +0000)]
[AArch64] Add support for NEON scalar extract narrow instructions.

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

10 years ago[Mips] Define __mips_fpr and _MIPS_FPSET macros.
Simon Atanasyan [Fri, 18 Oct 2013 13:13:53 +0000 (13:13 +0000)]
[Mips] Define __mips_fpr and _MIPS_FPSET macros.

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

10 years agoclang-format: Make continuation indent width configurable.
Daniel Jasper [Fri, 18 Oct 2013 10:38:14 +0000 (10:38 +0000)]
clang-format: Make continuation indent width configurable.

Patch by Kim Gräsman. Thank you!

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

10 years agoC++ modules: don't lose track of a 'namespace std' that is imported from a module.
Richard Smith [Fri, 18 Oct 2013 06:54:39 +0000 (06:54 +0000)]
C++ modules: don't lose track of a 'namespace std' that is imported from a module.

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

10 years agoBasic ODR checking for C++ modules:
Richard Smith [Fri, 18 Oct 2013 06:05:18 +0000 (06:05 +0000)]
Basic ODR checking for C++ modules:

If we have multiple definitions of the same entity from different modules, we
nominate the first definition which we see as being the canonical definition.
If we load a declaration from a different definition and we can't find a
corresponding declaration in the canonical definition, issue a diagnostic.

This is insufficient to prevent things from going horribly wrong in all cases
-- we might be in the middle of emitting IR for a function when we trigger some
deserialization and discover that it refers to an incoherent piece of the AST,
by which point it's probably too late to bail out -- but we'll at least produce
a diagnostic.

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

10 years agoCheck "late parsed" friend functions for redefinition
Alp Toker [Fri, 18 Oct 2013 05:54:24 +0000 (05:54 +0000)]
Check "late parsed" friend functions for redefinition

r177003 applied the late parsed template technique to friend functions
but omitted the corresponding check for redefinitions.

This patch adds the same check already in use for templates to the
new code path in order to diagnose and reject invalid redefinitions
that were being silently accepted.

Fixes PR17324.

Reviewed by Richard Smith.

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

10 years agoFix missed exception spec checks and crashes
Alp Toker [Fri, 18 Oct 2013 05:54:19 +0000 (05:54 +0000)]
Fix missed exception spec checks and crashes

Delayed exception specification checking for defaulted members and virtual
destructors are both susceptible to mutation during iteration so we need to
swap and process the worklists.

This resolves both accepts-invalid and rejects-valid issues and moreover fixes
potential invalid memory access as the contents of the vectors change during
iteration and recursive template instantiation.

Checking can be further delayed where parent classes aren't yet fully defined.
This patch adds two assertions at end of TU to ensure no specs are left
unchecked as was happenning before the fix, plus a test case from Marshall Clow
for the defaulted member crash extracted from the libcxx headers.

Reviewed by Richard Smith.

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

10 years agoFalse. GCC does not accept [[gnu::warn_unused]], not to be confused with [[gnu::warn_...
Nick Lewycky [Fri, 18 Oct 2013 05:00:41 +0000 (05:00 +0000)]
False. GCC does not accept [[gnu::warn_unused]], not to be confused with [[gnu::warn_unused_result]] which does exist.

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

10 years agoFix 80-column violation.
Richard Smith [Fri, 18 Oct 2013 01:34:56 +0000 (01:34 +0000)]
Fix 80-column violation.

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

10 years ago[-fms-extensions] Permit 'override' in C++98 and 'sealed' as a synonym for 'final'
David Majnemer [Fri, 18 Oct 2013 00:33:31 +0000 (00:33 +0000)]
[-fms-extensions] Permit 'override' in C++98 and 'sealed' as a synonym for 'final'

Summary: Some MS headers use these features.

Reviewers: rnk, rsmith

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

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

10 years agoConsumed analysis: Add param_typestate attribute, which specifies that
DeLesley Hutchins [Thu, 17 Oct 2013 23:23:53 +0000 (23:23 +0000)]
Consumed analysis: Add param_typestate attribute, which specifies that
function parameters must be in a particular state.  Patch by
chris.wailes@gmail.com.  Reviewed by delesley@google.com.

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

10 years agoObjectiveC migrator. Minor clean up of my last patch.
Fariborz Jahanian [Thu, 17 Oct 2013 23:13:13 +0000 (23:13 +0000)]
ObjectiveC migrator. Minor clean up of my last patch.
No functional change.

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

10 years agoConsumed Analysis: Allow parameters that are passed by non-const reference
DeLesley Hutchins [Thu, 17 Oct 2013 22:53:04 +0000 (22:53 +0000)]
Consumed Analysis: Allow parameters that are passed by non-const reference
to be treated as return values, and marked with the "returned_typestate"
attribute.  Patch by chris.wailes@gmail.com; reviewed by delesley@google.com.

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

10 years agoObjectiveC migrator. In infering NS_ENUM/NS_OPTIONS
Fariborz Jahanian [Thu, 17 Oct 2013 22:23:32 +0000 (22:23 +0000)]
ObjectiveC migrator. In infering NS_ENUM/NS_OPTIONS
macros, prefer the typedef immediately following the
enum declaration to the one preceeding it.
// rdar://15200915

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

10 years agoConsumed analysis: update to previous test case.
DeLesley Hutchins [Thu, 17 Oct 2013 22:21:03 +0000 (22:21 +0000)]
Consumed analysis: update to previous test case.

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

10 years ago[ms-cxxabi] Error out on virtual function memptrs
Reid Kleckner [Thu, 17 Oct 2013 21:30:27 +0000 (21:30 +0000)]
[ms-cxxabi] Error out on virtual function memptrs

These are uncommon and this is better than miscompiling.

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

10 years agoRevert "Fix missed exception spec checks and crashes"
Alp Toker [Thu, 17 Oct 2013 21:00:19 +0000 (21:00 +0000)]
Revert "Fix missed exception spec checks and crashes"

The changes caused the sanitizer bot to hang:
  http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/2311

Needs investigation.

This reverts commit r192914.

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

10 years agoMake .asm a valid extension for assembly files
Hans Wennborg [Thu, 17 Oct 2013 20:41:18 +0000 (20:41 +0000)]
Make .asm a valid extension for assembly files

This is a common extension on Windows, and now clang will assemble them
instead of treating them as linker input which is the default for unknown
file types.

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

10 years agoFix missed exception spec checks and crashes
Alp Toker [Thu, 17 Oct 2013 19:12:03 +0000 (19:12 +0000)]
Fix missed exception spec checks and crashes

Delayed exception specification checking for defaulted members and virtual
destructors are both susceptible to mutation during iteration so we need to
process the worklists fully.

This resolves both accepts-invalid and rejects-valid issues and moreover fixes
potential invalid memory access as the contents of the vectors change during
iteration and recursive template instantiation.

This patch also adds two assertions at end of TU to ensure no specs are left
unchecked as was happenning before the fix, plus a test case from Marshall Clow
for the defaulted member crash extracted from the libcxx headers.

Reviewed by Richard Smith.

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

10 years agoConsumed analysis: fix ICE in handling of loop source locations.
DeLesley Hutchins [Thu, 17 Oct 2013 18:19:31 +0000 (18:19 +0000)]
Consumed analysis: fix ICE in handling of loop source locations.

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

10 years ago[AArch64] Add support for NEON scalar three register different instruction
Chad Rosier [Thu, 17 Oct 2013 18:12:50 +0000 (18:12 +0000)]
[AArch64] Add support for NEON scalar three register different instruction
class.  The instruction class includes the signed saturating doubling
multiply-add long, signed saturating doubling multiply-subtract long, and
the signed saturating doubling multiply long instructions.

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

10 years agoclang-cl: Add support for asm listings (/FA and /Fa)
Hans Wennborg [Thu, 17 Oct 2013 16:16:23 +0000 (16:16 +0000)]
clang-cl: Add support for asm listings (/FA and /Fa)

This adds support for outputing the assembly to a file during compilation.
It does this by changing the compilation pipeling to not use the integrated
assembler, and keep the intermediate assembler file.

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

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

10 years agoRename some functions for consistency.
Rafael Espindola [Thu, 17 Oct 2013 15:37:26 +0000 (15:37 +0000)]
Rename some functions for consistency.

Every other function in Redeclarable.h was using Decl instead of Declaration.

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

10 years ago[mips] Added -mfp64 and -mfp32 options.
Daniel Sanders [Thu, 17 Oct 2013 14:55:58 +0000 (14:55 +0000)]
[mips] Added -mfp64 and -mfp32 options.

These options specify 64-bit FP registers and 32-bit FP registers respectively.

When using -mfp32, the FPU has 16x double-precision registers overlapping with
the 32x single-precision registers (each double-precision register overlaps
two single-precision registers).

When using -mfp64, the FPU has 32x double-precision registers overlapping with
the 32x single-precision registers (each double-precision register overlaps
with one single-precision register and has an additional 32-bits).

MSA requires -mfp64.

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

10 years ago[mips][msa] Update -mmsa help text and removed the hidden flag to better match conven...
Daniel Sanders [Thu, 17 Oct 2013 14:35:42 +0000 (14:35 +0000)]
[mips][msa] Update -mmsa help text and removed the hidden flag to better match conventions used by other targets

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

10 years ago[mips][msa] Added most of the remaining builtins
Daniel Sanders [Thu, 17 Oct 2013 13:57:25 +0000 (13:57 +0000)]
[mips][msa] Added most of the remaining builtins

Includes:
and.v, bmnz.v, bmz.v, bnz.[bhwdv], bz.[bhwdv], cfcmsa, ctcmsa, fcaf,
fcor, fcueq, fcul[et], fcun, fcune, fsaf, fsueq, fsul[et], fsun, fsune, ftrunc
hadd_[su].[hwd], hsub_[su].[hwd], insert.[bhw], insve.[bhw], ld.[bhwd],
move.v, nor.v, or.v, srar.[bhwd], srari.[bhwd], srlr.[bhwd], srlri.[bhwd],
st.[bhwd], subsus_u.[bhwd], subsuu_s.[bhwd], vshf.[bhwd], xor.v

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

10 years agoRemove unicode characters, trailing whitespace from test case
David Majnemer [Thu, 17 Oct 2013 09:55:56 +0000 (09:55 +0000)]
Remove unicode characters, trailing whitespace from test case

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

10 years agoFollow-up to r192822: fix Clang assertion when building with -fexceptions
Timur Iskhodzhanov [Thu, 17 Oct 2013 09:11:45 +0000 (09:11 +0000)]
Follow-up to r192822: fix Clang assertion when building with -fexceptions

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

10 years agotsan: update docs
Dmitry Vyukov [Thu, 17 Oct 2013 08:06:19 +0000 (08:06 +0000)]
tsan: update docs
update docs for no_sanitize_thread attribute and blacklist

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

10 years agoThis is now passing. Uncomment and close out PR6281.
Bill Wendling [Thu, 17 Oct 2013 04:13:35 +0000 (04:13 +0000)]
This is now passing. Uncomment and close out PR6281.

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

10 years agoAdd support to the Clang driver for forwarding all of gfortran's flags
Chandler Carruth [Thu, 17 Oct 2013 03:28:24 +0000 (03:28 +0000)]
Add support to the Clang driver for forwarding all of gfortran's flags
to GCC when asked to compile a fortran input.

This fixes a regression with essentially every Fortran compile since we
started rejecting unknown flags. Also moves a mis-classified gfortran
flag into the nicely documented set.

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

10 years agoAdd the context that a function was created in as the context for the
Eric Christopher [Thu, 17 Oct 2013 01:31:21 +0000 (01:31 +0000)]
Add the context that a function was created in as the context for the
function, not the context of the context.

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

10 years agoAdd implementations of the MSVC barrier intrinsics
Reid Kleckner [Thu, 17 Oct 2013 01:29:48 +0000 (01:29 +0000)]
Add implementations of the MSVC barrier intrinsics

Summary:
These are deprecated in VS 2012 according to MSDN.  They don't actually
compile down to any code.  They prevent the compiler from reordering
memory accesses across the barrier, which is what a memory-clobbering
volatile asm does.

Reviewers: echristo

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

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

10 years agoObjectiveC migrator. Remove blank lines
Fariborz Jahanian [Wed, 16 Oct 2013 22:35:19 +0000 (22:35 +0000)]
ObjectiveC migrator. Remove blank lines
when inferring property from setter/getter
methods. // rdar://15200949

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

10 years agoRename HandleTargetFeatures->handleTargetFeatures to match
Eric Christopher [Wed, 16 Oct 2013 21:26:26 +0000 (21:26 +0000)]
Rename HandleTargetFeatures->handleTargetFeatures to match
everything else in the class.

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

10 years agoAdd preprocessor support for powerpc vsx.
Eric Christopher [Wed, 16 Oct 2013 21:19:26 +0000 (21:19 +0000)]
Add preprocessor support for powerpc vsx.

The test should be expanded upon for more powerpc checking.

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

10 years agoRemove an old, seemingly out of date, comment.
Eric Christopher [Wed, 16 Oct 2013 21:19:23 +0000 (21:19 +0000)]
Remove an old, seemingly out of date, comment.

The referenced script no longer seems to exist.

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

10 years agoFix comments.
Eric Christopher [Wed, 16 Oct 2013 21:19:19 +0000 (21:19 +0000)]
Fix comments.

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

10 years agoPR17592: Ensure we diagnose shadowing a template parameter with a local extern
Richard Smith [Wed, 16 Oct 2013 21:12:00 +0000 (21:12 +0000)]
PR17592: Ensure we diagnose shadowing a template parameter with a local extern
declaration.

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

10 years ago[AArch64] Add support for NEON scalar negate instruction.
Chad Rosier [Wed, 16 Oct 2013 21:04:53 +0000 (21:04 +0000)]
[AArch64] Add support for NEON scalar negate instruction.

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

10 years ago[AArch64] Add support for NEON scalar absolute value instruction.
Chad Rosier [Wed, 16 Oct 2013 21:04:49 +0000 (21:04 +0000)]
[AArch64] Add support for NEON scalar absolute value instruction.

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

10 years agoObjectiveC migrator. Don't add 'assign' for
Fariborz Jahanian [Wed, 16 Oct 2013 20:44:26 +0000 (20:44 +0000)]
ObjectiveC migrator. Don't add 'assign' for
inferred properties when type is scalar and
assumed to be 'assign. // rdar://15231241

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

10 years agoAdd minimal command line support for the VSX powerpc processor.
Eric Christopher [Wed, 16 Oct 2013 20:40:13 +0000 (20:40 +0000)]
Add minimal command line support for the VSX powerpc processor.

Preprocessor support is still needed.

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

10 years agoRework ppc options handling into a features group.
Eric Christopher [Wed, 16 Oct 2013 20:40:08 +0000 (20:40 +0000)]
Rework ppc options handling into a features group.

This should have no functional behavior.

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

10 years agoObjectiveC migrator. 'atomic' is the default attribute.
Fariborz Jahanian [Wed, 16 Oct 2013 19:48:23 +0000 (19:48 +0000)]
ObjectiveC migrator. 'atomic' is the default attribute.
Don't add it to inferred property. // rdar://14988132

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

10 years agoEmit a .ident saying that clang produced this file.
Rafael Espindola [Wed, 16 Oct 2013 19:28:50 +0000 (19:28 +0000)]
Emit a .ident saying that clang produced this file.

Patch by Katya Romanova.

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

10 years agoEnabling 3DNow! prefetch instruction support for a few AMD processors in the
Yunzhong Gao [Wed, 16 Oct 2013 19:07:02 +0000 (19:07 +0000)]
Enabling 3DNow! prefetch instruction support for a few AMD processors in the
clang front end. This change will allow the __PRFCHW__ macro to be set on these
processors and hence include prfchwintrin.h in x86intrin.h header. Support for
the intrinsic itself seems to have already been added in r178041.

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

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

10 years agoObjectiveC migrator. Use 'assign' for 'delegate'
Fariborz Jahanian [Wed, 16 Oct 2013 18:52:17 +0000 (18:52 +0000)]
ObjectiveC migrator. Use 'assign' for 'delegate'
properties. // rdar://15231860

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

10 years ago[-cxx-abi microsoft] Fix this argument/parameter offsets for virtual destructors...
Timur Iskhodzhanov [Wed, 16 Oct 2013 18:24:06 +0000 (18:24 +0000)]
[-cxx-abi microsoft] Fix this argument/parameter offsets for virtual destructors in the presence of virtual bases

Reviewed at http://llvm-reviews.chandlerc.com/D1939

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

10 years agoObjectiveC++: support for passing C++11 style initialized temporaries to
Fariborz Jahanian [Wed, 16 Oct 2013 17:51:43 +0000 (17:51 +0000)]
ObjectiveC++: support for passing C++11 style initialized temporaries to
objc++ properties using property-dot syntax.
// rdar://14654207

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

10 years ago[analyzer] Don't draw edges to C++11 in-class member initializers.
Jordan Rose [Wed, 16 Oct 2013 17:45:35 +0000 (17:45 +0000)]
[analyzer] Don't draw edges to C++11 in-class member initializers.

Since these aren't lexically in the constructor, drawing arrows would
be a horrible jump across the body of the class. We could still do
better here by skipping over unimportant initializers, but this at least
keeps everything within the body of the constructor.

<rdar://problem/14960554>

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

10 years agoDriver: Factor duplicated code.
Benjamin Kramer [Wed, 16 Oct 2013 17:42:39 +0000 (17:42 +0000)]
Driver: Factor duplicated code.

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

10 years ago[mips] Enable frame-pointer elimination for -O1 and above.
Akira Hatanaka [Wed, 16 Oct 2013 17:13:08 +0000 (17:13 +0000)]
[mips] Enable frame-pointer elimination for -O1 and above.

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

10 years agoAdd a note about clang now rejecting unknown options.
Rafael Espindola [Wed, 16 Oct 2013 16:32:17 +0000 (16:32 +0000)]
Add a note about clang now rejecting unknown options.

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

10 years agoUpdate comment.
Chad Rosier [Wed, 16 Oct 2013 16:30:39 +0000 (16:30 +0000)]
Update comment.

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

10 years agoUpdate comment.
Chad Rosier [Wed, 16 Oct 2013 16:21:43 +0000 (16:21 +0000)]
Update comment.

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

10 years agoSema: Simplify the check if a method returns an instance of the class.
Benjamin Kramer [Wed, 16 Oct 2013 16:21:04 +0000 (16:21 +0000)]
Sema: Simplify the check if a method returns an instance of the class.

Just checking if the parent of the method is the same as the return type
should be sufficient. Also fixes PR17587.

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

10 years ago[AArch64] Add support for NEON scalar signed saturating accumulated of unsigned
Chad Rosier [Wed, 16 Oct 2013 16:09:16 +0000 (16:09 +0000)]
[AArch64] Add support for NEON scalar signed saturating accumulated of unsigned
value and unsigned saturating accumulate of signed value instructions.

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

10 years agoRemove a workaround for PR16406 from the vtables-virtual-inheritance test
Timur Iskhodzhanov [Wed, 16 Oct 2013 11:38:29 +0000 (11:38 +0000)]
Remove a workaround for PR16406 from the vtables-virtual-inheritance test

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

10 years agoOn 32 bit windows, mangle stdcall and fastcall decls in clang.
Rafael Espindola [Wed, 16 Oct 2013 01:40:34 +0000 (01:40 +0000)]
On 32 bit windows, mangle stdcall and fastcall decls in clang.

This removes the dependency on the llvm mangler doing it for us. In isolation,
the benefit is that the testing of what mangling is applied is all in one place:
(C, C++) X (Itanium, Microsoft) are all handled by clang.

This also gives me hope that in the future the llvm mangler (and llvm-ar) will
not depend on TargetMachine.

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

10 years agoTest that we can merge together explicit and partial specializations from
Richard Smith [Tue, 15 Oct 2013 23:19:58 +0000 (23:19 +0000)]
Test that we can merge together explicit and partial specializations from
merged declarations of a class template.

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

10 years agoC++ modules: merging for enumerations and enumerators with multiple definitions
Richard Smith [Tue, 15 Oct 2013 22:02:41 +0000 (22:02 +0000)]
C++ modules: merging for enumerations and enumerators with multiple definitions
(eg through template instantiations in multiple modules).

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

10 years agoTeach the AST dumper to dump the canonical declaration for a mergeable declaration.
Richard Smith [Tue, 15 Oct 2013 21:58:30 +0000 (21:58 +0000)]
Teach the AST dumper to dump the canonical declaration for a mergeable declaration.

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

10 years agoRemove this regression test now that PR17578 is fixed (r192674). The fix is to
Yunzhong Gao [Tue, 15 Oct 2013 21:33:02 +0000 (21:33 +0000)]
Remove this regression test now that PR17578 is fixed (r192674). The fix is to
reject this test case at the Sema stage, so no CodeGen test should be needed.

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

10 years agoReflow slightly.
Eric Christopher [Tue, 15 Oct 2013 21:22:34 +0000 (21:22 +0000)]
Reflow slightly.

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

10 years ago[AArch64] Add support for NEON scalar signed saturating absolute value and
Chad Rosier [Tue, 15 Oct 2013 21:19:02 +0000 (21:19 +0000)]
[AArch64] Add support for NEON scalar signed saturating absolute value and
scalar signed saturating negate instructions.

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

10 years agoAdd constant evaluation support for __builtin_isinf, __builtin_isfinite,
Richard Smith [Tue, 15 Oct 2013 19:07:14 +0000 (19:07 +0000)]
Add constant evaluation support for __builtin_isinf, __builtin_isfinite,
__builtin_isnan, and __builtin_isnormal. Patch by Karthik Bhat! Tests by me.

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

10 years agoAdd llvm_unreachable to pacify GCC's dropping off non-void function warning.
Benjamin Kramer [Tue, 15 Oct 2013 18:53:18 +0000 (18:53 +0000)]
Add llvm_unreachable to pacify GCC's dropping off non-void function warning.

+ 80 cols fix.

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

10 years agoms-compat: Fix taking the address of a member of a dependent base
Reid Kleckner [Tue, 15 Oct 2013 18:38:02 +0000 (18:38 +0000)]
ms-compat: Fix taking the address of a member of a dependent base

If unqualified id lookup fails while parsing a class template with a
dependent base, clang with -fms-compatibility will pretend the user
prefixed the name with 'this->' in order to delay the lookup.  However,
if there was a unary ampersand, Sema::ActOnDependentIdExpression() will
create a DependentDeclRefExpr, which is not what we wanted at all.  Fix
this by building the CXXDependentScopeMemberExpr directly instead.

In order to be fully MSVC compatible, we would have to defer all
attempts at name lookup to instantiation time.  However, until we have
real problems with system headers that can't be parsed, we'll put off
implementing that.

Fixes PR16014.

Reviewers: rsmith

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

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

10 years ago[libclang] For an unscoped enum include the enumerators in the top-level code-complet...
Argyrios Kyrtzidis [Tue, 15 Oct 2013 17:37:55 +0000 (17:37 +0000)]
[libclang] For an unscoped enum include the enumerators in the top-level code-completion hash since they enter the top-level namespace.

rdar://14703327

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

10 years agoObjectiveC driver. Scrap -fno-objc-legacy-dispatch for NeXT
Fariborz Jahanian [Tue, 15 Oct 2013 17:16:30 +0000 (17:16 +0000)]
ObjectiveC driver. Scrap -fno-objc-legacy-dispatch for NeXT
runtime. It will be silently ignored and regardless
of deployment target. // rdar://14803286

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

10 years ago[libclang] When querying for the availability of an enumerator, pick up the availabil...
Argyrios Kyrtzidis [Tue, 15 Oct 2013 17:00:53 +0000 (17:00 +0000)]
[libclang] When querying for the availability of an enumerator, pick up the availability from the enum declaration.

rdar://14789001.

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

10 years agoDon't depend on alias to declarations.
Rafael Espindola [Tue, 15 Oct 2013 15:40:03 +0000 (15:40 +0000)]
Don't depend on alias to declarations.

Accepting them is a bug (pr17535), not a feature.

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

10 years agoFixed code style of my change.
Serge Pavlov [Tue, 15 Oct 2013 14:24:32 +0000 (14:24 +0000)]
Fixed code style of my change.

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

10 years agoSema: Cleanup formatting of C++ exceptions related code
David Majnemer [Tue, 15 Oct 2013 09:50:08 +0000 (09:50 +0000)]
Sema: Cleanup formatting of C++ exceptions related code

No functional change.

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

10 years agoSema: Cleanup formatting of SEH related code
David Majnemer [Tue, 15 Oct 2013 09:33:02 +0000 (09:33 +0000)]
Sema: Cleanup formatting of SEH related code

No functional change.

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

10 years agoSema: Don't crash when __try/__except/__finally appears in a template function
David Majnemer [Tue, 15 Oct 2013 09:30:14 +0000 (09:30 +0000)]
Sema: Don't crash when __try/__except/__finally appears in a template function

We wouldn't transform the compound statement in any of these forms,
causing crashes when it got time to act on them.  Additionally, we
wouldn't check to see if the handler was invalid before deciding whether
or not we should continue acting on the __try.

This fixes PR17584.

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

10 years agodocs: Remove incompatibility with Solaris shell
David Majnemer [Tue, 15 Oct 2013 08:33:43 +0000 (08:33 +0000)]
docs: Remove incompatibility with Solaris shell

There doesn't seem to be a need in checking if a directory exists if we
will just rm -rf it once we affirm that it does.  Instead, just blindly
try to delete it.

This fixes PR17541.

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

10 years agoclang/test/Driver/netbsd.c*: Tweak path separators to be matched on win32 driver.
NAKAMURA Takumi [Tue, 15 Oct 2013 06:36:47 +0000 (06:36 +0000)]
clang/test/Driver/netbsd.c*: Tweak path separators to be matched on win32 driver.

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

10 years agoSema: Consider it an error to apply __builtin_offsetof to a member in a virtual base
David Majnemer [Tue, 15 Oct 2013 06:28:23 +0000 (06:28 +0000)]
Sema: Consider it an error to apply __builtin_offsetof to a member in a virtual base

icc 13 and g++ 4.9 both reject this while we would crash.

Fixes PR17578.

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

10 years agoSpecial case '%C' handling in ObjC format strings to handle integer literals that...
Ted Kremenek [Tue, 15 Oct 2013 05:25:17 +0000 (05:25 +0000)]
Special case '%C' handling in ObjC format strings to handle integer literals that can represent unicode characters

Fixes <rdar://problem/13991617>.

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

10 years agoCorrectly skip type sugar when determining the width of an enum type. Derived
Richard Smith [Tue, 15 Oct 2013 04:56:17 +0000 (04:56 +0000)]
Correctly skip type sugar when determining the width of an enum type. Derived
from a patch by Justin Bogner.

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

10 years agoDocument the presence of the new Objective-C++ mangling for qualified-id.
Ted Kremenek [Tue, 15 Oct 2013 04:28:42 +0000 (04:28 +0000)]
Document the presence of the new Objective-C++ mangling for qualified-id.

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

10 years agoTidy up and improve error recovery for C++11 attributes in bad places. Based on
Richard Smith [Tue, 15 Oct 2013 01:34:54 +0000 (01:34 +0000)]
Tidy up and improve error recovery for C++11 attributes in bad places. Based on
a patch by Michael Han.

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

10 years ago[ms-cxxabi] Fix assert in unspecified inheritance memptr emission
Reid Kleckner [Tue, 15 Oct 2013 01:18:02 +0000 (01:18 +0000)]
[ms-cxxabi] Fix assert in unspecified inheritance memptr emission

If a class is using the unspecified inheritance model for member
pointers and later we find the class is defined to use single
inheritance, zero out the vbptr offset field of the member pointer when
it is formed.

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

10 years agoObjectiveC migrator: Support for more possibility of
Fariborz Jahanian [Tue, 15 Oct 2013 00:00:28 +0000 (00:00 +0000)]
ObjectiveC migrator: Support for more possibility of
migration to NS_ENUM/NS_OPTIONS macros; when
typedef'ed to NSInteger/NSUInteger preceeds well
before of the enum declaration. // rdar://15201056

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

10 years agoPR17567: Improve diagnostic for a mistyped constructor name. If we see something
Richard Smith [Tue, 15 Oct 2013 00:00:26 +0000 (00:00 +0000)]
PR17567: Improve diagnostic for a mistyped constructor name. If we see something
that looks like a function declaration, except that it's missing a return type,
try typo-correcting it to the relevant constructor name.

In passing, fix a bug where the missing-type-specifier recovery codepath would
drop a preceding scope specifier on the floor, leading to follow-on diagnostics
and incorrect recovery for the auto-in-c++98 hack.

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

10 years agoAdd has_feature support for reflecting the presence of refined Objective-C ABI mangli...
Ted Kremenek [Mon, 14 Oct 2013 23:48:27 +0000 (23:48 +0000)]
Add has_feature support for reflecting the presence of refined Objective-C ABI mangling for qualified id<...>.  Fixes <rdar://problem/14799110>.

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

10 years agoProvide a dummy NetBSD tree and use --sysroot in the driver test.
Joerg Sonnenberger [Mon, 14 Oct 2013 23:26:44 +0000 (23:26 +0000)]
Provide a dummy NetBSD tree and use --sysroot in the driver test.

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

10 years agoTrivial formatting changes; no functional changes intended.
Aaron Ballman [Mon, 14 Oct 2013 23:26:04 +0000 (23:26 +0000)]
Trivial formatting changes; no functional changes intended.

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

10 years agoSwitching some custom logic to using table-generated helper methods. This also remov...
Aaron Ballman [Mon, 14 Oct 2013 23:22:37 +0000 (23:22 +0000)]
Switching some custom logic to using table-generated helper methods.  This also removes an unnecessary diagnostic.

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

10 years agoAdding a regression test for PR17578. It is marked xfail until the bug is fixed.
Yunzhong Gao [Mon, 14 Oct 2013 22:51:23 +0000 (22:51 +0000)]
Adding a regression test for PR17578. It is marked xfail until the bug is fixed.

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

10 years agoPR17576: Fix assertion on polymorphic classes with small alignment
Reid Kleckner [Mon, 14 Oct 2013 21:14:05 +0000 (21:14 +0000)]
PR17576: Fix assertion on polymorphic classes with small alignment

We have to reserve at least the width of a pointer for the vfptr.  For
classes with small alignment, we weren't reserving enough space, and
were overlapping the first field with the vfptr.

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

10 years agoFixing stdout/stderr interleaving in lit test.
Warren Hunt [Mon, 14 Oct 2013 20:58:36 +0000 (20:58 +0000)]
Fixing stdout/stderr interleaving in lit test.

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

10 years agoCorrectly check for distructors when realizing vtordisps
Warren Hunt [Mon, 14 Oct 2013 20:14:09 +0000 (20:14 +0000)]
Correctly check for distructors when realizing vtordisps

This patch fixes the distructor test when checking for vtordisp requirements in
microsoft record layout.  A test case is also included.

Addresses:
http://llvm.org/bugs/show_bug.cgi?id=16406#c7

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