]> granicus.if.org Git - clang/log
clang
10 years agoAdd tests for ARM RT library name
Renato Golin [Fri, 31 Jan 2014 12:21:55 +0000 (12:21 +0000)]
Add tests for ARM RT library name

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

10 years agoARM RT libs with generic name
Renato Golin [Fri, 31 Jan 2014 11:47:28 +0000 (11:47 +0000)]
ARM RT libs with generic name

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

10 years ago[CMake] clang doesn't care whether CLANG_ENABLE_*(s) were set or not.
NAKAMURA Takumi [Fri, 31 Jan 2014 11:19:15 +0000 (11:19 +0000)]
[CMake] clang doesn't care whether CLANG_ENABLE_*(s) were set or not.

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

10 years ago[CMake] Suppress SampleAnalyzerPlugin w/o ENABLE_STATIC_ANALYZER.
NAKAMURA Takumi [Fri, 31 Jan 2014 11:19:09 +0000 (11:19 +0000)]
[CMake] Suppress SampleAnalyzerPlugin w/o ENABLE_STATIC_ANALYZER.

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

10 years ago[CMake] Prune stray entries in add_dependencies(). target_link_libraries() implies it.
NAKAMURA Takumi [Fri, 31 Jan 2014 11:19:04 +0000 (11:19 +0000)]
[CMake] Prune stray entries in add_dependencies(). target_link_libraries() implies it.

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

10 years ago[sanitizer] update the list of supported platforms in the docs
Kostya Serebryany [Fri, 31 Jan 2014 10:49:34 +0000 (10:49 +0000)]
[sanitizer] update the list of supported platforms in the docs

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

10 years agoARM & AArch64: unify the rest of the completely shared NEON implementations
Tim Northover [Fri, 31 Jan 2014 10:46:52 +0000 (10:46 +0000)]
ARM & AArch64: unify the rest of the completely shared NEON implementations

This should be the last routine patch: AArch64 does still delegate to
EmitARMBuiltinExpr, but the remaining instances have complications of
one sort or another so some more cunning thought will be needed.

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

10 years agoARM & AArch64: another block of miscellaneous NEON sharing.
Tim Northover [Fri, 31 Jan 2014 10:46:49 +0000 (10:46 +0000)]
ARM & AArch64: another block of miscellaneous NEON sharing.

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

10 years agoARM & AArch64: move shared vld/vst intrinsics to common implementation.
Tim Northover [Fri, 31 Jan 2014 10:46:45 +0000 (10:46 +0000)]
ARM & AArch64: move shared vld/vst intrinsics to common implementation.

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

10 years agoARM & AArch64: more instructions into common block
Tim Northover [Fri, 31 Jan 2014 10:46:41 +0000 (10:46 +0000)]
ARM & AArch64: more instructions into common block

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

10 years agoARM & AArch64: merge another NEON block completely.
Tim Northover [Fri, 31 Jan 2014 10:46:36 +0000 (10:46 +0000)]
ARM & AArch64: merge another NEON block completely.

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

10 years ago[Sema] For -Wnon-literal-null-conversion warning, look through integer casts, which...
Argyrios Kyrtzidis [Fri, 31 Jan 2014 07:51:32 +0000 (07:51 +0000)]
[Sema] For -Wnon-literal-null-conversion warning, look through integer casts, which are used
by some projects in their null macro.

rdar://15925483

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

10 years ago[OPENMP] Bug fixes in threadprivate declaration and data sharing attributes processin...
Alexey Bataev [Fri, 31 Jan 2014 05:15:34 +0000 (05:15 +0000)]
[OPENMP] Bug fixes in threadprivate declaration and data sharing attributes processing. (http://llvm-reviews.chandlerc.com/D2451)

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

10 years agoMake x86 Android default target CPUs compatible with GCC (http://llvm-reviews.chandle...
Alexey Bataev [Fri, 31 Jan 2014 04:07:13 +0000 (04:07 +0000)]
Make x86 Android default target CPUs compatible with GCC (http://llvm-reviews.chandlerc.com/D2655)

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

10 years agolibclang/Makefile: Reorder libraries.
NAKAMURA Takumi [Fri, 31 Jan 2014 01:39:31 +0000 (01:39 +0000)]
libclang/Makefile: Reorder libraries.

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

10 years agoDriver: Don't use DOS style paths on UNIX
David Majnemer [Fri, 31 Jan 2014 01:35:55 +0000 (01:35 +0000)]
Driver: Don't use DOS style paths on UNIX

We'd add, as a fallback, DOS style paths when using the driver using a
win32 triple.  On a UNIX-like platform, this isn't particularly helpful.

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

10 years agoFix autolinking when modules are imported in pch files
Ben Langmuir [Fri, 31 Jan 2014 01:06:56 +0000 (01:06 +0000)]
Fix autolinking when modules are imported in pch files

Add the ImportDecl to the set of interesting delcarations that are
deserialized eagerly when an AST file is loaded (rather than lazily like
most decls). This is required to get auto linking to work when there is
no explicit import in the main file. Also resolve a FIXME to rename
'ExternalDefinitions', since that is only one of the things that need eager
deserialization. The new name is 'EagerlyDeserializedDecls'. The corresponding
AST bitcode is also renamed.

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

10 years agoIntroduce Parser::completeExpression.
Peter Collingbourne [Thu, 30 Jan 2014 22:38:41 +0000 (22:38 +0000)]
Introduce Parser::completeExpression.

This function returns a list of completions for a given expression and
completion position.

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

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

10 years agoPR14995: Allow a dependent type as the second parameter of operator++ and
Richard Smith [Thu, 30 Jan 2014 22:24:05 +0000 (22:24 +0000)]
PR14995: Allow a dependent type as the second parameter of operator++ and
operator--, since it might instantiate as 'int' (or, if it's a pack, it
might instantiate as an empty pack).

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

10 years agoDon't produce a 'returning reference to local' warning if a lambda returns a
Richard Smith [Thu, 30 Jan 2014 22:05:38 +0000 (22:05 +0000)]
Don't produce a 'returning reference to local' warning if a lambda returns a
reference (or pointer) to a variable from the closure object or from the
surrounding function scope.

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

10 years agoRevert "Fix assertion failures on annot_* tokens in clang -E"
Ben Langmuir [Thu, 30 Jan 2014 21:50:18 +0000 (21:50 +0000)]
Revert "Fix assertion failures on annot_* tokens in clang -E"

This is causing a failure in the msan buildbot that I am having trouble
reproducing.  Reverting until I can figure out what went wrong.

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

10 years agoFix assertion failures on annot_* tokens in clang -E
Ben Langmuir [Thu, 30 Jan 2014 18:09:55 +0000 (18:09 +0000)]
Fix assertion failures on annot_* tokens in clang -E

In particular, #pragma clang __debug, and #include implicitly changed
into @import were causing assertion failures.

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

10 years agoARM & AArch64: extend shared NEON implementation to first block.
Tim Northover [Thu, 30 Jan 2014 14:48:01 +0000 (14:48 +0000)]
ARM & AArch64: extend shared NEON implementation to first block.

This extends the refactoring to the whole of the first block of
trivial correspondences (as a fairly arbitrary boundary).

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

10 years agoARM & AArch64: fully share NEON implementation of permutation intrinsics
Tim Northover [Thu, 30 Jan 2014 14:47:57 +0000 (14:47 +0000)]
ARM & AArch64: fully share NEON implementation of permutation intrinsics

As a starting point, this moves the CodeGen for NEON permutation
instructions (vtrn, vzip, vuzp) into a new shared function.

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

10 years agoARM & AArch64: share the BI__builtin_neon enum defs.
Tim Northover [Thu, 30 Jan 2014 14:47:51 +0000 (14:47 +0000)]
ARM & AArch64: share the BI__builtin_neon enum defs.

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

10 years agoclang-format: Support ObjC's NS_ENUMs.
Daniel Jasper [Thu, 30 Jan 2014 14:38:37 +0000 (14:38 +0000)]
clang-format: Support ObjC's NS_ENUMs.

Before:
  typedef NS_ENUM(NSInteger, MyType) {
      /// Information about someDecentlyLongValue.
      someDecentlyLongValue,
      /// Information about anotherDecentlyLongValue.
      anotherDecentlyLongValue,
      /// Information about aThirdDecentlyLongValue.
      aThirdDecentlyLongValue};

After:
  typedef NS_ENUM(NSInteger, MyType) {
    /// Information about someDecentlyLongValue.
    someDecentlyLongValue,
    /// Information about anotherDecentlyLongValue.
    anotherDecentlyLongValue,
    /// Information about aThirdDecentlyLongValue.
    aThirdDecentlyLongValue
  };

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

10 years agoUpdate debugging visualizers section.
Nikola Smiljanic [Thu, 30 Jan 2014 07:15:53 +0000 (07:15 +0000)]
Update debugging visualizers section.

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

10 years agoSPARCv9 supports atomic operations up to 64 bits.
Jakob Stoklund Olesen [Thu, 30 Jan 2014 04:48:04 +0000 (04:48 +0000)]
SPARCv9 supports atomic operations up to 64 bits.

Patch by Roman Divacky!

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

10 years agoDiagnose typedef names for linkage purposes that would change
John McCall [Thu, 30 Jan 2014 01:12:53 +0000 (01:12 +0000)]
Diagnose typedef names for linkage purposes that would change
a previously-computed linkage as an unsupportable error condition.

Per discussion on cfe-commits, this appears to be a
difficult-to-resolve flaw in our implementation approach;
we may pursue this as a language defect, but for now it's
better to diagnose it as unsupported than to produce
inconsistent results (or assertions).  Anything that we can
do to limit how often this diagnostic fires, such as the
changes in r200380, is probably for the best, though.

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

10 years agoActually test that the local static variable from my
John McCall [Thu, 30 Jan 2014 01:12:47 +0000 (01:12 +0000)]
Actually test that the local static variable from my
test in r200380 gets linkonce_odr linkage.

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

10 years agoUse an Itanium triple in DWARF debug info tests
Timur Iskhodzhanov [Thu, 30 Jan 2014 01:01:36 +0000 (01:01 +0000)]
Use an Itanium triple in DWARF debug info tests

This should fix the clang part of the breakage in r200340.

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

10 years agoObjective-C [IRGen]. Generator a tail call to objc_getProperty() in
Fariborz Jahanian [Thu, 30 Jan 2014 00:16:39 +0000 (00:16 +0000)]
Objective-C [IRGen]. Generator a tail call to objc_getProperty() in
synthesized getters for performance improvement.
// rdar://15884113

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

10 years agoConsolidating several table-generated files containing parser-related string switches...
Aaron Ballman [Wed, 29 Jan 2014 22:13:45 +0000 (22:13 +0000)]
Consolidating several table-generated files containing parser-related string switches into a single file. This reduces build-related complexity by replacing four separate projects (and table-gen instantiations) with a single one.

No functional changes intended.

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

10 years agoSema: Diagnose improper application of inheritance keywords
David Majnemer [Wed, 29 Jan 2014 22:07:36 +0000 (22:07 +0000)]
Sema: Diagnose improper application of inheritance keywords

We would previously allow inappropriate inheritance keywords to appear
on class declarations.  We would also allow inheritance keywords on
templates which were not fully specialized; this was divergent from
MSVC.

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

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

10 years agoclang-format: More custom option fixes for protocol buffer files.
Daniel Jasper [Wed, 29 Jan 2014 18:52:43 +0000 (18:52 +0000)]
clang-format: More custom option fixes for protocol buffer files.

Before:
  repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {
                               aaaaaaaaaaaaaaaa : AAAAAAAAAA,
                               bbbbbbbbbbbbbbbb : BBBBBBBBBB
                             }];

After:
  repeated double value = 1
      [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaa : AAAAAAAAAA,
                              bbbbbbbbbbbbbbbb : BBBBBBBBBB}];

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

10 years agoclang-format: Fix formatting of custom proto options.
Daniel Jasper [Wed, 29 Jan 2014 18:43:40 +0000 (18:43 +0000)]
clang-format: Fix formatting of custom proto options.

Before:
  repeated double value = 1 [(aaaaaaa.aaaaaaaaa) = {
                              aaaaaaaaaaaaaaaaa : AAAAAAAA
                            }];

After:
  repeated double value = 1
      [(aaaaaaa.aaaaaaaaa) = {aaaaaaaaaaaaaaaaa : AAAAAAAA}];

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

10 years agoCortex-M3 and Cortex-M4 should not enable hwdiv-arm (committing again, with an update...
Artyom Skrobov [Wed, 29 Jan 2014 09:43:07 +0000 (09:43 +0000)]
Cortex-M3 and Cortex-M4 should not enable hwdiv-arm (committing again, with an updated test)

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

10 years agoFix crash on unmatched #endif's.
Manuel Klimek [Wed, 29 Jan 2014 08:49:02 +0000 (08:49 +0000)]
Fix crash on unmatched #endif's.

The following snippet would crash:
  #endif
  #if A

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

10 years agoShort-circuit a couple of queries (and avoid corrupting
John McCall [Wed, 29 Jan 2014 08:33:09 +0000 (08:33 +0000)]
Short-circuit a couple of queries (and avoid corrupting
the linkage cache) when type-checking static local
variables.

There's a very deep problem here where the linkage of
a declaration can suddenly massively change as soon as
it's given a typedef name; these fixes, while optimizations
in their own right, are really just targeted workarounds.

rdar://15928125

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

10 years agoExtensively comment bitfield layout, rearrange some
John McCall [Wed, 29 Jan 2014 07:53:44 +0000 (07:53 +0000)]
Extensively comment bitfield layout, rearrange some
code for legibility, and fix a bug with bitfields in packed
ms_structs.

rdar://15926990

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

10 years agoclang-cl: Better error message when trying to compile stdin (PR18640)
Hans Wennborg [Wed, 29 Jan 2014 01:04:40 +0000 (01:04 +0000)]
clang-cl: Better error message when trying to compile stdin (PR18640)

We should suggest using /Tc or /Tp to set the input type, instead of
erroneously suggesting -x, which isn't a clang-cl flag.

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

10 years agoFixing PR18430 by checking that the size of bitfields plus padding does not
Yunzhong Gao [Wed, 29 Jan 2014 00:09:16 +0000 (00:09 +0000)]
Fixing PR18430 by checking that the size of bitfields plus padding does not
grow into the following virtual base.

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

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

10 years agoA new conversion warning for when an Objective-C object literal is implicitly
Richard Trieu [Tue, 28 Jan 2014 23:40:26 +0000 (23:40 +0000)]
A new conversion warning for when an Objective-C object literal is implicitly
cast into a boolean true value.  This warning will catch code like:

if (@0) {}
if (@"foo") {}

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

10 years agoIntrin.h: include setjmp.h to get a jmp_buf definition
Hans Wennborg [Tue, 28 Jan 2014 23:01:59 +0000 (23:01 +0000)]
Intrin.h: include setjmp.h to get a jmp_buf definition

This makes sure that the ms-intrin.cpp test passes by providing
a mock setjmp.h as a test input.

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

10 years agoIntrin.h: implement __rdtsc and __halt
Hans Wennborg [Tue, 28 Jan 2014 22:55:01 +0000 (22:55 +0000)]
Intrin.h: implement __rdtsc and __halt

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

10 years agoObjective-C. Fixes a bug where "new" family attribute
Fariborz Jahanian [Tue, 28 Jan 2014 22:46:29 +0000 (22:46 +0000)]
Objective-C. Fixes a bug where "new" family attribute
was not being overridden in the category method implementation
resulting in bogus warning. // rdar://15919775

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

10 years agoObjective-C. provide legacy encoding of *id and *Class types
Fariborz Jahanian [Tue, 28 Jan 2014 20:41:15 +0000 (20:41 +0000)]
Objective-C. provide legacy encoding of *id and *Class types
instead of crashing.  // rdar://15824769.

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

10 years agoclang-format: Understand __attribute__s preceding parameter lists.
Daniel Jasper [Tue, 28 Jan 2014 20:13:43 +0000 (20:13 +0000)]
clang-format: Understand __attribute__s preceding parameter lists.

Before:
  ReturnType __attribute__((unused))
      function(int i);

After:
  ReturnType __attribute__((unused))
  function(int i);

This fixes llvm.org/PR18632.

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

10 years agoclang-format: Fix option formatting in protocol buffer files.
Daniel Jasper [Tue, 28 Jan 2014 18:51:11 +0000 (18:51 +0000)]
clang-format: Fix option formatting in protocol buffer files.

Before:
  optional int32 foo[ default = true, deprecated = true ];

After:
  optional int32 foo[default = true, deprecated = true];

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

10 years agoclang-format: Add support for a space after @property
Daniel Jasper [Tue, 28 Jan 2014 15:20:33 +0000 (15:20 +0000)]
clang-format: Add support for a space after @property

Mozilla and WebKit seem to use a space after @property (verified by
grepping their codebases) so we turn this on there as well.

Change by Christian Legnitto. Thank you!

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

10 years ago[ARM] Fix AAPCS-VFP non-compliance when returning HFA from variadic functions.
Amara Emerson [Tue, 28 Jan 2014 10:56:36 +0000 (10:56 +0000)]
[ARM] Fix AAPCS-VFP non-compliance when returning HFA from variadic functions.

Arguments and return values must always be marshalled as for the base
AAPCS when the callee is a variadic function.

Patch by Oliver Stannard!

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

10 years ago[CMake] Apply llvm_update_compile_flags() to add_clang_library().
NAKAMURA Takumi [Tue, 28 Jan 2014 09:47:12 +0000 (09:47 +0000)]
[CMake] Apply llvm_update_compile_flags() to add_clang_library().

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

10 years ago[CMake] clangStaticAnalyzerFrontend: Deprecate LLVM_NO_RTTI.
NAKAMURA Takumi [Tue, 28 Jan 2014 09:43:16 +0000 (09:43 +0000)]
[CMake] clangStaticAnalyzerFrontend: Deprecate LLVM_NO_RTTI.

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

10 years agoClarify. Thanks to Sean Silva and Warren Hunt for help wordsmithing!
Nick Lewycky [Tue, 28 Jan 2014 07:03:46 +0000 (07:03 +0000)]
Clarify. Thanks to Sean Silva and Warren Hunt for help wordsmithing!

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

10 years agoFix this test and don't run it in ASan bootstrap
Alexey Samsonov [Tue, 28 Jan 2014 06:59:32 +0000 (06:59 +0000)]
Fix this test and don't run it in ASan bootstrap

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

10 years agoTurn on PIC by default on Android (http://llvm-reviews.chandlerc.com/D2603)
Alexey Bataev [Tue, 28 Jan 2014 06:30:35 +0000 (06:30 +0000)]
Turn on PIC by default on Android (http://llvm-reviews.chandlerc.com/D2603)

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

10 years agoFix always-false conditional thinko in documentation.
Nick Lewycky [Tue, 28 Jan 2014 06:20:56 +0000 (06:20 +0000)]
Fix always-false conditional thinko in documentation.

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

10 years agoTest case for clobbers on cpuid in ms inline asm
Reid Kleckner [Tue, 28 Jan 2014 02:09:28 +0000 (02:09 +0000)]
Test case for clobbers on cpuid in ms inline asm

Tests r200279 in LLVM.

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

10 years agoRelaxing the alignment requirements for fields in a transparent_union. Emits the...
Aaron Ballman [Tue, 28 Jan 2014 01:47:34 +0000 (01:47 +0000)]
Relaxing the alignment requirements for fields in a transparent_union. Emits the diagnostic only when subsequent alignments are more strict than the alignment required by the first field.

Fixes PR15134

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

10 years agoApply the typo correction replacement location fix from r191450 to the
Kaelyn Uhrain [Tue, 28 Jan 2014 00:46:47 +0000 (00:46 +0000)]
Apply the typo correction replacement location fix from r191450 to the
case when correcting for too many arguments (r191450 had only fixed the
problem for when there were too few arguments). Also fix the underlining
for both cases.

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

10 years agoRemove dead code; MacroDirective's IsHidden flag is always false.
Richard Smith [Mon, 27 Jan 2014 23:54:39 +0000 (23:54 +0000)]
Remove dead code; MacroDirective's IsHidden flag is always false.

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

10 years agoReverting because reverting r200145.
Adrian Prantl [Mon, 27 Jan 2014 22:57:33 +0000 (22:57 +0000)]
Reverting because reverting r200145.
Revert "check-clang doesn't require neither llvm_src_root nor llvm_obj_root."

This reverts commit r200146.

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

10 years agoReverting because reverting r200145.
Adrian Prantl [Mon, 27 Jan 2014 22:57:30 +0000 (22:57 +0000)]
Reverting because reverting r200145.
Revert "clang-check: Unittests doesn't requires tools."

This reverts commit r200147.

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

10 years agoRumors of test_debuginfo's death are slightly exaggerated.
Adrian Prantl [Mon, 27 Jan 2014 22:50:20 +0000 (22:50 +0000)]
Rumors of test_debuginfo's death are slightly exaggerated.
Revert "Revert r113780, "Recognize .ll as input files. Handle %test_debuginfo on a RUN command line.""

This reverts commit r200145.

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

10 years agoAnother test for patch for // rdar://15890251
Fariborz Jahanian [Mon, 27 Jan 2014 22:44:17 +0000 (22:44 +0000)]
Another test for patch for // rdar://15890251

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

10 years agoTemporarily disable test that fails on Mac OS X 10.9.
Bob Wilson [Mon, 27 Jan 2014 22:43:21 +0000 (22:43 +0000)]
Temporarily disable test that fails on Mac OS X 10.9.

PR18322. This test will be reenabled when the SDK gets fixed. In the meantime,
it is pretty disruptive to have this test keep failing.

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

10 years agoObjectiveC. Fixes a bug in recognition of an ivar
Fariborz Jahanian [Mon, 27 Jan 2014 22:27:43 +0000 (22:27 +0000)]
ObjectiveC. Fixes a bug in recognition of an ivar
backing a property resulting in bogus warning.
// rdar://15890251

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

10 years agoAdd a new attribute meta-spelling called "GCC" -- it widens into being a GNU spelling...
Aaron Ballman [Mon, 27 Jan 2014 22:10:04 +0000 (22:10 +0000)]
Add a new attribute meta-spelling called "GCC" -- it widens into being a GNU spelling, and a CXX11 spelling with the namespace "gnu". It also sets a bit on the spelling certifying that it is known to GCC. From this, we can warn about the extension appropriately. As a consequence, the FunctionDefinition functionality is completely removed.

Replacing the functionality from r199676, which didn't solve the problem as elegantly.

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

10 years agoRemove dead code.
Richard Smith [Mon, 27 Jan 2014 22:08:43 +0000 (22:08 +0000)]
Remove dead code.

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

10 years agoRevert "intrin.h: include setjmp.h to get a jmp_buf definition"
Reid Kleckner [Mon, 27 Jan 2014 19:32:42 +0000 (19:32 +0000)]
Revert "intrin.h: include setjmp.h to get a jmp_buf definition"

This failed the ms-intrin.cpp test.

This reverts commit r200237.

This also comments out the _setjmpex declaration for now so that
intrin.h will work on x64 targets.

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

10 years agoRevert "Cortex-M3 and Cortex-M4 should not enable hwdiv-arm"
Reid Kleckner [Mon, 27 Jan 2014 19:26:39 +0000 (19:26 +0000)]
Revert "Cortex-M3 and Cortex-M4 should not enable hwdiv-arm"

This reverts commit r200233.

The test required a registered ARM target, it was testing LLVM's
generated assembly, and it should have been an IRGen test.

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

10 years agoAdd implementations of some MSVC intrinsics
Reid Kleckner [Mon, 27 Jan 2014 19:16:35 +0000 (19:16 +0000)]
Add implementations of some MSVC intrinsics

Adds an implementation for _InterlockedCompareExchangePointer() and
__faststorefence().

Patch by David Ziman!

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

10 years agoObjectiveC. When introducing a new property declaration in
Fariborz Jahanian [Mon, 27 Jan 2014 19:14:49 +0000 (19:14 +0000)]
ObjectiveC. When introducing a new property declaration in
parimary class and in mrr mode, assume property's default
memory attribute (assign) and to prevent a bogus warning.
// rdar://15859862

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

10 years agointrin.h: include setjmp.h to get a jmp_buf definition
Reid Kleckner [Mon, 27 Jan 2014 19:14:09 +0000 (19:14 +0000)]
intrin.h: include setjmp.h to get a jmp_buf definition

This fixes an error on our _setjmpex declaration for 64-bit code and
allows us to declare _setjmp for 32-bit code.

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

10 years agoDriver: support -fno-debug-types-section to override -fdebug-types-section
David Blaikie [Mon, 27 Jan 2014 18:52:43 +0000 (18:52 +0000)]
Driver: support -fno-debug-types-section to override -fdebug-types-section

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

10 years agoAdd 'static __inline__' to MSVC intrinsics with implementations
Reid Kleckner [Mon, 27 Jan 2014 18:48:02 +0000 (18:48 +0000)]
Add 'static __inline__' to MSVC intrinsics with implementations

This avoids warnings visible with -Wsystem-headers.

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

10 years agoCortex-M3 and Cortex-M4 should not enable hwdiv-arm
Artyom Skrobov [Mon, 27 Jan 2014 18:44:25 +0000 (18:44 +0000)]
Cortex-M3 and Cortex-M4 should not enable hwdiv-arm

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

10 years agoXCore target exception handling
Robert Lytton [Mon, 27 Jan 2014 17:56:25 +0000 (17:56 +0000)]
XCore target exception handling

Implement __builtin_eh_return_data_regno()

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

10 years agoComment parsing: don't crash while parsing \deprecated in a standalone comment
Dmitri Gribenko [Mon, 27 Jan 2014 17:55:43 +0000 (17:55 +0000)]
Comment parsing: don't crash while parsing \deprecated in a standalone comment
(comment without a decl).

I think this can not happen during normal compilation with -Wdocumentation,
only while using Clang APIs to parse comments outside of a source file.

Based on a patch by Olivier Goffart.

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

10 years ago[Mips] Fix __mips macro definition.
Simon Atanasyan [Mon, 27 Jan 2014 13:59:11 +0000 (13:59 +0000)]
[Mips] Fix __mips macro definition.

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

10 years ago[Mips] Change default CPU for MIPS 32/64 targets. Now they are mips32r2/mips64r2...
Simon Atanasyan [Mon, 27 Jan 2014 13:59:04 +0000 (13:59 +0000)]
[Mips] Change default CPU for MIPS 32/64 targets. Now they are mips32r2/mips64r2 respectively.

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

10 years ago[Mips] Add tests to check MIPS arch macros.
Simon Atanasyan [Mon, 27 Jan 2014 13:58:54 +0000 (13:58 +0000)]
[Mips] Add tests to check MIPS arch macros.

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

10 years agoRoll back the use of ConstStringRef for now
Alp Toker [Mon, 27 Jan 2014 05:21:24 +0000 (05:21 +0000)]
Roll back the use of ConstStringRef for now

We might want try a different strategy so hold back on this for the moment, but
fix the off-by-one error in the original function template.

This reverts commit r200190.

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

10 years agoUse ConstStringRef facility for getCustomDiagID() safety
Alp Toker [Mon, 27 Jan 2014 04:22:22 +0000 (04:22 +0000)]
Use ConstStringRef facility for getCustomDiagID() safety

This is one of various functions in clang that don't handle arbitrary strings
well and can benefit from compile-time safety checks.

Also fixes an off-by-one error that caused one additional null byte to get
added to the end of custom diagnostic descriptions. ConstStringRef handles
tricky details like that for us now.

Requires supporting changes in LLVM r200187.

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

10 years agoPR17052 / DR1560 (+DR1550): In a conditional expression between a glvalue and a
Richard Smith [Mon, 27 Jan 2014 04:19:56 +0000 (04:19 +0000)]
PR17052 / DR1560 (+DR1550): In a conditional expression between a glvalue and a
throw-expression, the result is also a glvalue and isn't unnecessarily coerced
to a prvalue.

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

10 years agoFix r195149. Triple should correctly reflect that target. If it contains ios,
Evan Cheng [Sun, 26 Jan 2014 23:12:43 +0000 (23:12 +0000)]
Fix r195149. Triple should correctly reflect that target. If it contains ios,
e.g. thumbv7m-apple-ios3.0.0-eabi, then it should mean it's an iOS target. For
embedded targets, the OS should be unknown, e.g. thumbv7m-apple-unknown-macho.
Since Tim has recently fixed the triple, r195149 is no longer needed.
rdar://15911035

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

10 years agoUse canonical spelling of NetBSD
Joerg Sonnenberger [Sun, 26 Jan 2014 20:02:03 +0000 (20:02 +0000)]
Use canonical spelling of NetBSD

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

10 years agoclang-check: Unittests doesn't requires tools.
NAKAMURA Takumi [Sun, 26 Jan 2014 12:35:07 +0000 (12:35 +0000)]
clang-check: Unittests doesn't requires tools.

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

10 years agocheck-clang doesn't require neither llvm_src_root nor llvm_obj_root.
NAKAMURA Takumi [Sun, 26 Jan 2014 12:35:00 +0000 (12:35 +0000)]
check-clang doesn't require neither llvm_src_root nor llvm_obj_root.

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

10 years agoRevert r113780, "Recognize .ll as input files. Handle %test_debuginfo on a RUN comman...
NAKAMURA Takumi [Sun, 26 Jan 2014 12:34:54 +0000 (12:34 +0000)]
Revert r113780, "Recognize .ll as input files. Handle %test_debuginfo on a RUN command line."

This feature has been unused anymore.

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

10 years ago[CMake] Always set CMAKE_INCLUDE_CURRENT_DIR.
NAKAMURA Takumi [Sun, 26 Jan 2014 12:34:48 +0000 (12:34 +0000)]
[CMake] Always set CMAKE_INCLUDE_CURRENT_DIR.

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

10 years ago[CMake][Standalone] Introduce check-all.
NAKAMURA Takumi [Sun, 26 Jan 2014 12:34:38 +0000 (12:34 +0000)]
[CMake][Standalone] Introduce check-all.

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

10 years agoFix -Wreturn-type build failure on ASTMatchers, plus an intended assert
Alp Toker [Sun, 26 Jan 2014 08:12:32 +0000 (08:12 +0000)]
Fix -Wreturn-type build failure on ASTMatchers, plus an intended assert

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

10 years agoUpdate docstrings following the param name change in r200132
Alp Toker [Sun, 26 Jan 2014 06:41:58 +0000 (06:41 +0000)]
Update docstrings following the param name change in r200132

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

10 years agoUpdate for llvm api change.
Rafael Espindola [Sun, 26 Jan 2014 06:39:14 +0000 (06:39 +0000)]
Update for llvm api change.

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

10 years ago[CMake] Reindent.
NAKAMURA Takumi [Sun, 26 Jan 2014 06:18:06 +0000 (06:18 +0000)]
[CMake] Reindent.

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

10 years agoEnforce safe usage of DiagnosticsEngine::getCustomDiagID()
Alp Toker [Sun, 26 Jan 2014 06:17:37 +0000 (06:17 +0000)]
Enforce safe usage of DiagnosticsEngine::getCustomDiagID()

Replace the last incorrect uses and templatize the function to require a
compile-time constant string preventing further misuse.

The diagnostic formatter expects well-formed input and has undefined behaviour
with arbitrary input or crafted user strings in source files. Accepting user
input would also have caused unbounded generation of new diagnostic IDs which
can be problematic in long-running sessions or language bindings.

This completes the work to fix several incorrect callers that passed user
input or raw messages to the diagnostics engine where a constant format string
was expected.

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

10 years agoIdentify two more unsafe uses of getCustomDiagID()
Alp Toker [Sun, 26 Jan 2014 05:08:49 +0000 (05:08 +0000)]
Identify two more unsafe uses of getCustomDiagID()

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

10 years agoRemove buggy example code from the documentation
Alp Toker [Sun, 26 Jan 2014 05:08:07 +0000 (05:08 +0000)]
Remove buggy example code from the documentation

Instead point readers to the latest, correct example code in SVN until we find
a way to automatically include example sources into the documentation (or until
someone steps up to maintain these actively).

This ensures that the examples are up-to-date, buildable, and most of all that
readers don't pick up incorrect usage.

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

10 years agoARCMigrate: Introduce proper diagnostics for TransformActions
Alp Toker [Sun, 26 Jan 2014 05:07:32 +0000 (05:07 +0000)]
ARCMigrate: Introduce proper diagnostics for TransformActions

This starts to switch ARCMT to use proper diagnostic messages. The old use was
based on incorrect example code from the documentation.

The logic of the previous report() functions has been retained to support any
external consumers that might be intercepting diagnostic messages through the
old interface.

Note that the change in test/Misc/warning-flags.c isn't a new warning without a
flag, rather one that was previously invisible to the test. Adding a flag might
be a good idea though.

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