]> granicus.if.org Git - clang/log
clang
9 years ago[modules] Remove unnecessary deserialization of fully-external HeaderFileInfos for...
Richard Smith [Mon, 24 Aug 2015 21:59:32 +0000 (21:59 +0000)]
[modules] Remove unnecessary deserialization of fully-external HeaderFileInfos for all files we've seen in this compilation.

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

9 years ago[MS ABI] Don't emit stackrestore in cleanups
David Majnemer [Mon, 24 Aug 2015 21:34:21 +0000 (21:34 +0000)]
[MS ABI] Don't emit stackrestore in cleanups

The stackrestore intrinsic isn't meaningful inside of a cleanup funclet.

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

9 years agoRevert r245866.
Akira Hatanaka [Mon, 24 Aug 2015 20:30:57 +0000 (20:30 +0000)]
Revert r245866.

This commit was causing buildbot failures.

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

9 years ago[libclang] For convenience to clients, make sure that nullability and __kindof annota...
Argyrios Kyrtzidis [Mon, 24 Aug 2015 19:50:45 +0000 (19:50 +0000)]
[libclang] For convenience to clients, make sure that nullability and __kindof annotations do not hide
the underlying type.

rdar://22063577

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

9 years ago[ARM] Error out on apple darwin platforms if float-abi is "hard".
Akira Hatanaka [Mon, 24 Aug 2015 19:50:35 +0000 (19:50 +0000)]
[ARM] Error out on apple darwin platforms if float-abi is "hard".

Error out if the user tries to use float-abi="hard" since it isn't
supported on darwin platforms. Previously clang issued no warnings or
erros and just passed the option to the backend, which had no effect on
code generation for targets using apcs.

rdar://problem/22257950

Differential Revision: http://reviews.llvm.org/D12155

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

9 years agoFixing some copy-pasta comments; NFC.
Aaron Ballman [Mon, 24 Aug 2015 18:50:01 +0000 (18:50 +0000)]
Fixing some copy-pasta comments; NFC.

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

9 years agoclang-format: Always allow break after leading annotations.
Daniel Jasper [Mon, 24 Aug 2015 15:10:01 +0000 (15:10 +0000)]
clang-format: Always allow break after leading annotations.

Before:
  DEPRECATED("Use NewClass::NewFunction instead.") int OldFunction(
  const string &parameter) {}

Could not be formatted at all, as clang-format would both require and
disallow the break before "int".

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

9 years agoclang-format: Make formatting of member function reference qualifiers
Daniel Jasper [Mon, 24 Aug 2015 14:28:08 +0000 (14:28 +0000)]
clang-format: Make formatting of member function reference qualifiers
more consistent.

Before:
  SomeType MemberFunction(const Deleted &)&&;
  SomeType MemberFunction(const Deleted &) && { ... }

After:
  SomeType MemberFunction(const Deleted &)&&;
  SomeType MemberFunction(const Deleted &)&& { ... }

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

9 years agoclang-format: Properly handle braced lists in macros.
Daniel Jasper [Mon, 24 Aug 2015 13:23:37 +0000 (13:23 +0000)]
clang-format: Properly handle braced lists in macros.

Before:
  #define A    \
      { a, a } \
      ,

After:
  #define A {a, a},

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

9 years ago[AArch64] Define the macro __ARM_FP16_ARGS
Keith Walker [Mon, 24 Aug 2015 10:11:14 +0000 (10:11 +0000)]
[AArch64] Define the macro __ARM_FP16_ARGS

The ACLE (ARM C Language Extensions) 2.0 defines that the predefined macro
__ARM_FP16_ARGS should be defined if __fp16 can be used as an argument and
result.

The support for __fp16 to be used as an argument and result is already
implemented for AArch64 so this change is just adding the missing macro.

Differential Revision: http://reviews.llvm.org/D12240

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

9 years ago[OPENMP] Info about OpenMP Support in Users Manual, NFC.
Alexey Bataev [Mon, 24 Aug 2015 05:31:10 +0000 (05:31 +0000)]
[OPENMP] Info about OpenMP Support in Users Manual, NFC.
Differential Revision: http://reviews.llvm.org/D12152

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

9 years ago[modules] If local submodule visibility is disabled, don't bother checking
Richard Smith [Mon, 24 Aug 2015 03:38:11 +0000 (03:38 +0000)]
[modules] If local submodule visibility is disabled, don't bother checking
whether the owning module of a hidden declaration is visible -- it can't be.

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

9 years ago[modules] Stop updating all identifiers when writing a module. This is
Richard Smith [Mon, 24 Aug 2015 03:33:22 +0000 (03:33 +0000)]
[modules] Stop updating all identifiers when writing a module. This is
unnecessary in C++ modules (where we don't need the identifiers for their
Decls) and expensive.

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

9 years ago[test] Fix typos in a few tests (NFC)
Vedant Kumar [Sun, 23 Aug 2015 18:53:59 +0000 (18:53 +0000)]
[test] Fix typos in a few tests (NFC)

Patch by Kai Zhao!

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

9 years agoAdded missing tests for SSE41 pmovsx/pmovzx extension intrinsics
Simon Pilgrim [Sun, 23 Aug 2015 16:19:38 +0000 (16:19 +0000)]
Added missing tests for SSE41 pmovsx/pmovzx extension intrinsics

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

9 years agoAdd a missing 'classof' to AST Node TypoExpr to identify its 'Kind'.
Faisal Vali [Sun, 23 Aug 2015 13:14:42 +0000 (13:14 +0000)]
Add a missing 'classof' to AST Node TypoExpr to identify its 'Kind'.

I'm not sure why TypoExpr had its classof left out - but I expect every AST node should fulfill the 'contract of classof' (http://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html).

There should be no functionality change.  I just happened to notice it was missing, while messing around with something else.

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

9 years agoChanges missed from r245810
Serge Pavlov [Sun, 23 Aug 2015 11:09:40 +0000 (11:09 +0000)]
Changes missed from r245810

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

9 years agoInstantiate function declarations in instantiated functions.
Serge Pavlov [Sun, 23 Aug 2015 10:22:28 +0000 (10:22 +0000)]
Instantiate function declarations in instantiated functions.

If a function declaration is found inside a template function as in:

    template<class T> void f() {
      void g(int x = T::v) except(T::w);
    }

it must be instantiated along with the enclosing template function,
including default arguments and exception specification.

Together with the patch committed in r240974 this implements DR1484.

Differential Revision: http://reviews.llvm.org/D11194

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

9 years ago[WinEH] Update to new EH pad/ret signatures (with tokens required)
Joseph Tremoulet [Sun, 23 Aug 2015 00:26:48 +0000 (00:26 +0000)]
[WinEH] Update to new EH pad/ret signatures (with tokens required)

Summary:
The signatures of the methods in LLVM for creating EH pads/rets are changing
to require token arguments on rets and assume token return type on pads.
Update creation code accordingly.

Reviewers: majnemer, rnk

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12109

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

9 years agoImprove the performance of resolving a lookup result. We usually don't need to
Richard Smith [Sat, 22 Aug 2015 21:37:34 +0000 (21:37 +0000)]
Improve the performance of resolving a lookup result. We usually don't need to
pick the most recent declaration, and we can often tell which declaration is
more recent without walking the redeclaration chain. Do so when possible.

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

9 years ago[modules] Further simplification and speedup of redeclaration chain loading.
Richard Smith [Sat, 22 Aug 2015 20:13:39 +0000 (20:13 +0000)]
[modules] Further simplification and speedup of redeclaration chain loading.

Instead of eagerly deserializing a list of DeclIDs when we load a module file
and doing a binary search to find the redeclarations of a decl, store a list of
redeclarations of each chain before the first declaration and load it directly.

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

9 years ago[CUDA] Change initializer for CUDA device code based on CUDA documentation.
Jingyue Wu [Sat, 22 Aug 2015 05:49:28 +0000 (05:49 +0000)]
[CUDA] Change initializer for CUDA device code based on CUDA documentation.

Summary:
According to CUDA documentation, global variables declared with __device__,
__constant__ can be initialized from host code, so mark them as
externally initialized. Because __shared__ variables cannot have an
initialization as part of their declaration and since the value maybe kept
across different kernel invocation, the value of __shared__ is effectively
undefined instead of zero initialized.

Wrongly using zero initializer may cause illegitimate optimization, e.g.
removing unused __constant__ variable because it's not updated in the device
code and the value is initialized with zero.

Test Plan: test/CodeGenCUDA/address-spaces.cu

Patch by Xuetian Weng

Reviewers: jholewinski, eliben, tra, jingyue

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D12241

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

9 years ago[modules] Remove some dead code after r245779.
Richard Smith [Sat, 22 Aug 2015 02:09:38 +0000 (02:09 +0000)]
[modules] Remove some dead code after r245779.

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

9 years ago[modules] Rearrange how redeclaration chains are loaded, to remove a walk over
Richard Smith [Sat, 22 Aug 2015 01:47:18 +0000 (01:47 +0000)]
[modules] Rearrange how redeclaration chains are loaded, to remove a walk over
all modules and reduce the number of declarations we load when loading a
redeclaration chain.

The new approach is:
 * when loading the first declaration of an entity within a module file, we
   first load all declarations of the entity that were imported into that
   module file, and then load all the other declarations of that entity from
   that module file and build a suitable decl chain from them
 * when loading any other declaration of an entity, we first load the first
   declaration from the same module file

As before, we complete redecl chains through name lookup where necessary.

To make this work, I also had to change the way that template specializations
are stored -- it no longer suffices to track only canonical specializations; we
now emit all "first local" declarations when emitting a list of specializations
for a template.

On one testcase with several thousand imported module files, this reduces the
total runtime by 72%.

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

9 years ago[ARM NEON] Remove special-case for f16 vcvt handling. NFCI.
Ahmed Bougacha [Sat, 22 Aug 2015 01:30:13 +0000 (01:30 +0000)]
[ARM NEON] Remove special-case for f16 vcvt handling. NFCI.

We can use the 'H' typespec modifier to use 128-bit vectors directly
in the only two users of this special-case: the vcvt f16 intrinsics.
This also lets us use more meaningful prototype modifiers.

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

9 years agoWhen building a pseudo-object assignment, and the RHS is
John McCall [Sat, 22 Aug 2015 00:35:27 +0000 (00:35 +0000)]
When building a pseudo-object assignment, and the RHS is
a contextually-typed expression that semantic analysis will
probably need to invasively rewrite, don't include the
RHS OVE as a separate semantic expression, and check the
operation with the original RHS expression.

There are two contextually-typed expressions that can survive
to here: overloaded function references, which are at least
safe to double-emit, and C++11 initializer list expressions,
which are not at all safe to double-emit and which often
don't update the original syntactic InitListExpr with
implicit conversions to member types, etc.

This means that the original RHS may appear, undecorated by
an OVE, in the semantic expressions.  Fortunately, it will
only ever be used in a single place there, and I don't
believe there are clients that rely on being able to pick
out the original RHS from the semantic expressions.
But this could be problematic if there are clients that do
visit the entire tree and rely on not seeing the same
expression multiple times, once in the syntactic and once
in the semantic expressions.  This is a very fiddly part
of the compiler.

rdar://21801088

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

9 years ago[ARM NEON] Use the common naming scheme for vcvt f16 builtins. NFC.
Ahmed Bougacha [Fri, 21 Aug 2015 23:34:20 +0000 (23:34 +0000)]
[ARM NEON] Use the common naming scheme for vcvt f16 builtins. NFC.

We had "vcvt_f16" and "VCVT_HIGH_F16": for other FP types, this naming
is used for intrinsics with integer overloads. The FP->FP conversions,
on the other hand, use the full "vcvt_f32_f64" name instead.

Use the same naming convention for the f16<->f32 conversions.
While there, reorder the definitions a little bit.

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

9 years ago[ARM NEON] Factor out FP-prototype checking. NFC.
Ahmed Bougacha [Fri, 21 Aug 2015 23:24:18 +0000 (23:24 +0000)]
[ARM NEON] Factor out FP-prototype checking. NFC.

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

9 years ago[SemaObjC] Remove unused code from test.
Alex Denisov [Fri, 21 Aug 2015 20:28:16 +0000 (20:28 +0000)]
[SemaObjC] Remove unused code from test.
Patch by modocache (Brian Gesiak).

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

9 years agoRevert "Generating assumption loads of vptr after ctor call (fixed)"
Piotr Padlewski [Fri, 21 Aug 2015 19:49:41 +0000 (19:49 +0000)]
Revert "Generating assumption loads of vptr after ctor call (fixed)"
Reverting because of 245721

This reverts commit 552658e2b60543c928030b09cc9b5dfcb40c3f28.

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

9 years agoGenerating assumption loads of vptr after ctor call (fixed)
Piotr Padlewski [Fri, 21 Aug 2015 18:28:00 +0000 (18:28 +0000)]
Generating assumption loads of vptr after ctor call (fixed)

Generating call assume(icmp %vtable, %global_vtable) after constructor
call for devirtualization purposes.

For more info go to:
http://lists.llvm.org/pipermail/cfe-dev/2015-July/044227.html

Edit:
Fixed version because of PR24479.

http://reviews.llvm.org/D11859

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

9 years agoProperly provide alignment of 'byval' arguments down to llvm.
James Y Knight [Fri, 21 Aug 2015 18:19:06 +0000 (18:19 +0000)]
Properly provide alignment of 'byval' arguments down to llvm.

This is important in the case that the LLVM-inferred llvm-struct
alignment is not the same as the clang-known C-struct alignment.

Differential Revision: http://reviews.llvm.org/D12243

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

9 years agoFix typo - symetric -> symmetric.
Eric Christopher [Fri, 21 Aug 2015 16:24:01 +0000 (16:24 +0000)]
Fix typo - symetric -> symmetric.

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

9 years ago[RecordLayoutBuilder] Remove duplicated diagnostic argument. NFC.
Benjamin Kramer [Fri, 21 Aug 2015 12:51:01 +0000 (12:51 +0000)]
[RecordLayoutBuilder] Remove duplicated diagnostic argument. NFC.

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

9 years agoRemove unused diagnostic.
Benjamin Kramer [Fri, 21 Aug 2015 12:29:47 +0000 (12:29 +0000)]
Remove unused diagnostic.

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

9 years ago[OPENMP 4.1] Add codegen for 'simdlen' clause.
Alexey Bataev [Fri, 21 Aug 2015 12:19:04 +0000 (12:19 +0000)]
[OPENMP 4.1] Add codegen for 'simdlen' clause.
Add emission of metadata for simd loops in presence of 'simdlen' clause.
If 'simdlen' clause is provided without 'safelen' clause, the vectorizer width for the loop is set to value of 'simdlen' clause + all read/write ops in loop are marked with '!llvm.mem.parallel_loop_access' metadata.
If 'simdlen' clause is provided along with 'safelen' clause, the vectorizer width for the loop is set to value of 'simdlen' clause + all read/write ops in loop are not marked with '!llvm.mem.parallel_loop_access' metadata.
If 'safelen' clause is provided without 'simdlen' clause, the vectorizer width for the loop is set to value of 'safelen' clause + all read/write ops in loop are not marked with '!llvm.mem.parallel_loop_access' metadata.

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

9 years agoclang-format: Be more conservative about specially indenting blocks in C++.
Daniel Jasper [Fri, 21 Aug 2015 11:44:57 +0000 (11:44 +0000)]
clang-format: Be more conservative about specially indenting blocks in C++.

This is a bit of a step back of what we did in r222531, as there are
some corner cases in C++, where this kind of formatting is really bad.

Example:
Before:
  virtual aaaaaaaaaaaaaaaa(std::function<bool()> IsKindWeWant = [&]() {
    return true;
  }, aaaaa aaaaaaaaa);

After:
  virtual aaaaaaaaaaaaaaaa(std::function<bool()> IsKindWeWant =
                               [&]() { return true; },
                           aaaaa aaaaaaaaa);

The block formatting logic in JavaScript will probably go some other changes,
too, and we'll potentially be able to make the rules more consistent again. For
now, this seems to be the best approach for C++.

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

9 years ago[OPENMP 4.1] Add ast-print tests for 'val', 'uval' and 'ref' modifiers.
Alexey Bataev [Fri, 21 Aug 2015 11:32:42 +0000 (11:32 +0000)]
[OPENMP 4.1] Add ast-print tests for 'val', 'uval' and 'ref' modifiers.

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

9 years ago[OPENMP 4.1] Initial support for 'simdlen' clause.
Alexey Bataev [Fri, 21 Aug 2015 11:14:16 +0000 (11:14 +0000)]
[OPENMP 4.1] Initial support for 'simdlen' clause.
Add parsing/sema analysis for 'simdlen' clause in simd directives. Also add check that if both 'safelen' and 'simdlen' clauses are specified, the value of 'simdlen' parameter is less than the value of 'safelen' parameter.

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

9 years ago[CMake][Standalone] Detect Python. Python is used for Lit testing.
NAKAMURA Takumi [Fri, 21 Aug 2015 09:38:46 +0000 (09:38 +0000)]
[CMake][Standalone] Detect Python. Python is used for Lit testing.

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

9 years agoUntabify.
NAKAMURA Takumi [Fri, 21 Aug 2015 09:37:53 +0000 (09:37 +0000)]
Untabify.

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

9 years agoExpand mingw-long-double.c to test for long double alignment.
Yaron Keren [Fri, 21 Aug 2015 08:26:31 +0000 (08:26 +0000)]
Expand mingw-long-double.c to test for long double alignment.

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

9 years ago[Sema] Don't crash when diagnosing hack in libstdc++
David Majnemer [Fri, 21 Aug 2015 06:44:10 +0000 (06:44 +0000)]
[Sema] Don't crash when diagnosing hack in libstdc++

While working around a bug in certain standard library implementations,
we would try to diagnose the issue so that library implementors would
fix their code.  However, we assumed an entity being initialized was
a non-static data member subobject when other circumstances are
possible.

This fixes PR24526.

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

9 years ago[OPENMP 4.1] Improved codegen for 'uval' qualifier of 'linear' clause.
Alexey Bataev [Fri, 21 Aug 2015 06:41:23 +0000 (06:41 +0000)]
[OPENMP 4.1] Improved codegen for 'uval' qualifier of 'linear' clause.
According to standard the 'uval' modifier declares the address of the original list item to have an invariant value for all iterations of the associated loop(s). Patch improves codegen for this qualifier by removing usage of the original reference variable and replacing by referenced l-value.

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

9 years agoStop treating -static as overriding -fPIC: they are distinct.
James Y Knight [Fri, 21 Aug 2015 04:14:55 +0000 (04:14 +0000)]
Stop treating -static as overriding -fPIC: they are distinct.

For some reason, clang had been treating a command like:
 clang -static -fPIC foo.c
as if it should be compiled without the PIC relocation model.

This was incorrect: -static should be affecting only the linking
model, and -fPIC only the compilation.

This new behavior also matches GCC.

This is a follow-up from a review comment on r245447.

Differential Revision: http://reviews.llvm.org/D12208

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

9 years agoFix a few things with -Winfinite-recursion. NFC
Richard Trieu [Fri, 21 Aug 2015 03:43:09 +0000 (03:43 +0000)]
Fix a few things with -Winfinite-recursion.  NFC

Now that -Winfinite-recursion no longer uses recursive calls to before path
analysis, several bits of the code can be improved.  The main changes:

1) Early return when finding a path to the exit block without a recursive call
2) Moving the states vector into checkForRecursiveFunctionCall instead of
   passing it in by reference
3) Change checkForRecursiveFunctionCall to return a bool when the warning
   should be emitted.
4) Use the State vector instead of storing it in the Stack vector.

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

9 years ago[modules] When we see a definition of a function for which we already have a
Richard Smith [Fri, 21 Aug 2015 03:04:33 +0000 (03:04 +0000)]
[modules] When we see a definition of a function for which we already have a
non-visible definition, skip the new definition to avoid ending up with a
function with multiple definitions.

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

9 years ago[Static Analyzer] Add checker to catch lightweight generics related type errors in...
Gabor Horvath [Fri, 21 Aug 2015 00:18:28 +0000 (00:18 +0000)]
[Static Analyzer] Add checker to catch lightweight generics related type errors in Objective-C.

Differential Revision: http://reviews.llvm.org/D11427

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

9 years ago[Static Analyzer] Made it easier to test new checkers using the test suite.
Gabor Horvath [Thu, 20 Aug 2015 22:59:49 +0000 (22:59 +0000)]
[Static Analyzer] Made it easier to test new checkers using the test suite.

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

9 years ago[analyzer] Fix for PR24112 (scan-build doesn't work with --use-analyzer="path to...
Anton Yartsev [Thu, 20 Aug 2015 21:52:39 +0000 (21:52 +0000)]
[analyzer] Fix for PR24112 (scan-build doesn't work with --use-analyzer="path to clang++.exe").

Don't derive the path_to_clang++ from the path_to_clang if the path_to_clang is really the path_to_clang++.

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

9 years ago Revert the 64bit part of r245084; long double values were not changed by
Yaron Keren [Thu, 20 Aug 2015 21:51:46 +0000 (21:51 +0000)]
 Revert the 64bit part of r245084; long double values were not changed by
 it as they are already set correctly by X86_64TargetInfo and X86TargetInfo.

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

9 years agoRevert r245344.
Evgeniy Stepanov [Thu, 20 Aug 2015 21:47:16 +0000 (21:47 +0000)]
Revert r245344.

That change is causing strange test failures on Fedora 22 (PR24503),
and it does not have any effect with Gold linker anyway (PR15823,
https://sourceware.org/bugzilla/show_bug.cgi?id=18859).

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

9 years agoRevert the 32bit part of r245084; mingw values were correct before it.
Yaron Keren [Thu, 20 Aug 2015 21:36:14 +0000 (21:36 +0000)]
Revert the 32bit part of r245084; mingw values were correct before it.

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

9 years agoDo not crash when static analysis encounters a FunctionDecl that has a delayed templa...
Aaron Ballman [Thu, 20 Aug 2015 21:27:35 +0000 (21:27 +0000)]
Do not crash when static analysis encounters a FunctionDecl that has a delayed template parse of its body.

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

9 years agoPR24483: Delete some dead/incorrect code that triggered assertions.
Richard Smith [Thu, 20 Aug 2015 20:45:25 +0000 (20:45 +0000)]
PR24483: Delete some dead/incorrect code that triggered assertions.

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

9 years agoFix test on Windows to accept both gcc and gcc.exe.
Yaron Keren [Thu, 20 Aug 2015 20:37:58 +0000 (20:37 +0000)]
Fix test on Windows to accept both gcc and gcc.exe.

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

9 years ago[Headers][X86] Use __builtin_shufflevector in AVX2 broadcasts.
Ahmed Bougacha [Thu, 20 Aug 2015 20:27:21 +0000 (20:27 +0000)]
[Headers][X86] Use __builtin_shufflevector in AVX2 broadcasts.

This lets us optimize them better. We agreed to remove the intrinsics,
instead of combining them later, as, at -O0, we generate the expected
instructions. Plus, it's a nice cleanup.

Differential Revision: http://reviews.llvm.org/D10556

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

9 years ago[CMake] Simplifying logic for USES_TERMINAL on bootstrap targets.
Chris Bieneman [Thu, 20 Aug 2015 20:12:20 +0000 (20:12 +0000)]
[CMake] Simplifying logic for USES_TERMINAL on bootstrap targets.

In CMake variables that haven't been set are evaluated to empty strings, so we don't need to set the variables to empty strings.

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

9 years ago[CMake] Exclude 'bootstrap' target from 'all' where possible.
Chris Bieneman [Thu, 20 Aug 2015 20:12:18 +0000 (20:12 +0000)]
[CMake] Exclude 'bootstrap' target from 'all' where possible.

EXCLUDE_FROM_ALL in ExternalProject is only available on CMake 3.1 and later.

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

9 years ago[Sparc] Add '-EL' when invoking gcc to link little-endian binaries.
Douglas Katzman [Thu, 20 Aug 2015 18:32:26 +0000 (18:32 +0000)]
[Sparc] Add '-EL' when invoking gcc to link little-endian binaries.

Differential Revision: http://reviews.llvm.org/D12201

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

9 years agoRevert r245496 "[CUDA] Add appropriate host/device attribute to builtins."
Artem Belevich [Thu, 20 Aug 2015 18:28:56 +0000 (18:28 +0000)]
Revert r245496 "[CUDA] Add appropriate host/device attribute to builtins."

It's breaking internal test.

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

9 years agoSilence a "not all control paths return a value" warning; NFC.
Aaron Ballman [Thu, 20 Aug 2015 13:31:16 +0000 (13:31 +0000)]
Silence a "not all control paths return a value" warning; NFC.

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

9 years agoFix crash with two typos in the arguments of a function
Olivier Goffart [Thu, 20 Aug 2015 13:11:14 +0000 (13:11 +0000)]
Fix crash with two typos in the arguments of a function

The problem is that the arguments are of TheCall are reset later
to the ones in Args, making TypoExpr put back. Some TypoExpr that have
already  been diagnosed and will assert later in Sema::getTypoExprState

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

9 years ago[OPENMP 4.1] Allow to use 'uval' and 'ref' modifiers for reference types only.
Alexey Bataev [Thu, 20 Aug 2015 12:15:57 +0000 (12:15 +0000)]
[OPENMP 4.1] Allow to use 'uval' and 'ref' modifiers for reference types only.
Standard allows to use 'uval' and 'ref' modifiers in 'linear' clause for variables with reference types only. Added check for it and modified test.

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

9 years ago[OPENMP 4.1] Initial support for modifiers in 'linear' clause.
Alexey Bataev [Thu, 20 Aug 2015 10:54:39 +0000 (10:54 +0000)]
[OPENMP 4.1] Initial support for modifiers in 'linear' clause.

OpenMP 4.1 adds 3 optional modifiers to 'linear' clause.
Format of 'linear' clause has changed to:
```
linear(linear-list[ : linear-step])
```
where linear-list is one of the following
```
list
modifier(list)
```
where modifier is one of the following:
```
 ref (C++)
 val (C/C++)
 uval (C++)
```
Patch adds parsing and sema analysis for these modifiers.

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

9 years agoFix the layout of bitfields in ms_struct unions: their
John McCall [Wed, 19 Aug 2015 22:42:36 +0000 (22:42 +0000)]
Fix the layout of bitfields in ms_struct unions: their
alignment is ignored, and they always allocate a complete
storage unit.

Also, change the dumping of AST record layouts: use the more
readable C++-style dumping even in C, include bitfield offset
information in the dump, and don't print sizeof/alignof
information for fields of record type, since we don't do so
for bases or other kinds of field.

rdar://22275433

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

9 years agoAdd missing comment.
Richard Smith [Wed, 19 Aug 2015 21:59:52 +0000 (21:59 +0000)]
Add missing comment.

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

9 years agoFix -Wlogical-not-parentheses to work better with C code.
Richard Trieu [Wed, 19 Aug 2015 21:33:54 +0000 (21:33 +0000)]
Fix -Wlogical-not-parentheses to work better with C code.

Remove the assumption of a Boolean type by checking if an expression is known
to have a boolean value.  Disable warning in two other tests.

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

9 years ago[CUDA] Added stubs for __nvvm_atom_add_*_d() builtins.
Artem Belevich [Wed, 19 Aug 2015 21:11:37 +0000 (21:11 +0000)]
[CUDA] Added stubs for __nvvm_atom_add_*_d() builtins.

They show up in CUDA headers but are not currently supported by
NVPTX back-end.

Differential Revision: http://reviews.llvm.org/D11694

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

9 years ago[modules] Don't needlessly bounce through Sema when updating exception specifications.
Richard Smith [Wed, 19 Aug 2015 21:09:32 +0000 (21:09 +0000)]
[modules] Don't needlessly bounce through Sema when updating exception specifications.

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

9 years agoInternal-linkage variables with constant-evaluatable initializers do not need to...
Richard Smith [Wed, 19 Aug 2015 20:49:38 +0000 (20:49 +0000)]
Internal-linkage variables with constant-evaluatable initializers do not need to be emitted. (Also reduces the set of variables that need to be eagerly deserialized when using PCH / modules.)

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

9 years ago[CUDA] Add appropriate host/device attribute to builtins.
Artem Belevich [Wed, 19 Aug 2015 20:48:20 +0000 (20:48 +0000)]
[CUDA] Add appropriate host/device attribute to builtins.

Differential Revision: http://reviews.llvm.org/D12122

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

9 years agoGenerating available_externally vtables bugfix
Piotr Padlewski [Wed, 19 Aug 2015 20:09:09 +0000 (20:09 +0000)]
Generating available_externally vtables bugfix

Bugfix revealed in r245264.

http://reviews.llvm.org/D12128

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

9 years agoAdd REQUIRES: x86-registered-target to test since it's required.
Yaron Keren [Wed, 19 Aug 2015 17:18:32 +0000 (17:18 +0000)]
Add REQUIRES: x86-registered-target to test since it's required.

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

9 years agoAccording to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.
Yaron Keren [Wed, 19 Aug 2015 17:02:32 +0000 (17:02 +0000)]
According to i686 ABI, long double size on x86 is 12 bytes not 16 bytes.
See
 https://gcc.gnu.org/onlinedocs/gcc-3.2/gcc/i386-and-x86-64-Options.html

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

9 years agoProperly pass through the PIC mode to the integrated assembler when
James Y Knight [Wed, 19 Aug 2015 15:12:02 +0000 (15:12 +0000)]
Properly pass through the PIC mode to the integrated assembler when
doing assembly-only, and unify the Driver's PIC argument parsing.

On a few architectures, parsing of assembly files annoyingly depends
on whether PIC is enabled or not. This was handled for external 'as'
already (passing -KPIC), but was missed for calls to the standalone
internal assembler.

The integrated-as.s test needed to be modified to not expect
-fsanitize=address to be unused, as now fsanitize *IS* used for
assembly, since -fsanitize=memory can sometimes imply -fPIE, which the
assembler needs to know (gack!!).

Differential Revision: http://reviews.llvm.org/D11845

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

9 years ago[ARM] Proper generic cpus handling
Vladimir Sukharev [Wed, 19 Aug 2015 14:50:18 +0000 (14:50 +0000)]
[ARM] Proper generic cpus handling

"generic" cpu was wrongly handled as exact real CPU name of ARMv8.1A architecture.

This has been fixed, now it is abstract name, suitable for any arch.

Reviewers: rengolin

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D11640

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

9 years ago[OPENMP] Link libomp.lib on Windows
Alexey Bataev [Wed, 19 Aug 2015 04:49:01 +0000 (04:49 +0000)]
[OPENMP] Link libomp.lib on Windows

Adds libomp.lib for -fopenmp=libomp and libiomp5md.lib for -fopenmp=libiomp5 on Windows
Differential Revision: http://reviews.llvm.org/D11932

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

9 years ago[modules] Don't eagerly deserialize so many ImportDecls. CodeGen basically ignores...
Richard Smith [Wed, 19 Aug 2015 02:30:28 +0000 (02:30 +0000)]
[modules] Don't eagerly deserialize so many ImportDecls. CodeGen basically ignores ImportDecls imported from modules, so only eagerly deserialize the ones from a PCH / preamble.

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

9 years agoRename getDefaultFeatures -> initDefaultFeatures and update comment
Eric Christopher [Wed, 19 Aug 2015 02:24:21 +0000 (02:24 +0000)]
Rename getDefaultFeatures -> initDefaultFeatures and update comment
with the current behavior as the name seems to match what's going on.

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

9 years ago[SemaExpr] Re-enable missing assertion.
Davide Italiano [Wed, 19 Aug 2015 02:21:12 +0000 (02:21 +0000)]
[SemaExpr] Re-enable missing assertion.

This has been disabled for a long time, but:
1) Initializers work (and apparently they're re reason why this was disabled).
2) various tests happen to hit this code path and the invariant seems to be
always verified.

Differential Revision: http://reviews.llvm.org/D12110
Reviewed by: rsmith

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

9 years agoMake __builtin_object_size always answer correctly
George Burgess IV [Wed, 19 Aug 2015 02:19:07 +0000 (02:19 +0000)]
Make __builtin_object_size always answer correctly

__builtin_object_size would return incorrect answers for many uses where
type=3. This fixes the inaccuracy by making us emit 0 instead of LLVM's
objectsize intrinsic.

Additionally, there are many cases where we would emit suboptimal (but
correct) answers, such as when arrays are involved. This patch fixes
some of these cases (please see new tests in test/CodeGen/object-size.c
for specifics on which cases are improved)

Resubmit of r245323 with PR24493 fixed.
Patch mostly by Richard Smith.
Differential Revision: http://reviews.llvm.org/D12000
This fixes PR15212.

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

9 years agounique_ptrify CXXBasePaths::DeclsFound & remove the then-unnecessary user-defined...
David Blaikie [Tue, 18 Aug 2015 23:56:00 +0000 (23:56 +0000)]
unique_ptrify CXXBasePaths::DeclsFound & remove the then-unnecessary user-defined dtor

Maybe this and the NumDeclsFound member should just be a std::vector
instead. (it could be a std::dynarray, but that missed standardization)

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

9 years ago[modules] Tests for r245390.
Richard Smith [Tue, 18 Aug 2015 23:42:50 +0000 (23:42 +0000)]
[modules] Tests for r245390.

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

9 years ago[modules] Fix HeaderFileInfo serialization to store all the known owning modules...
Richard Smith [Tue, 18 Aug 2015 23:42:23 +0000 (23:42 +0000)]
[modules] Fix HeaderFileInfo serialization to store all the known owning modules for a header, not just the current favourite.

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

9 years agoDevirtualize EHScopeStack::Cleanup's dtor because it's never destroyed polymorphically
David Blaikie [Tue, 18 Aug 2015 22:40:54 +0000 (22:40 +0000)]
Devirtualize EHScopeStack::Cleanup's dtor because it's never destroyed polymorphically

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

9 years agoFix for MSVC
David Blaikie [Tue, 18 Aug 2015 22:10:49 +0000 (22:10 +0000)]
Fix for MSVC

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

9 years agoWdeprecated: Support movability of EHScopeStack::Cleanup objects as they are move...
David Blaikie [Tue, 18 Aug 2015 22:09:28 +0000 (22:09 +0000)]
Wdeprecated: Support movability of EHScopeStack::Cleanup objects as they are move constructed in ConditionalCleanup::restore

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

9 years agoRange-based-for-convert some loops in ASTWriter. No functionality change intended.
Richard Smith [Tue, 18 Aug 2015 21:53:42 +0000 (21:53 +0000)]
Range-based-for-convert some loops in ASTWriter. No functionality change intended.

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

9 years ago[autoconf] Fixing reversed logic introduced r245304.
Chris Bieneman [Tue, 18 Aug 2015 21:23:44 +0000 (21:23 +0000)]
[autoconf] Fixing reversed logic introduced r245304.

Thanks for the catch Hal!

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

9 years agoWorkaround -Wdeprecated on SemDiagnosticConsumer's tricksy copy ctor.
David Blaikie [Tue, 18 Aug 2015 20:54:26 +0000 (20:54 +0000)]
Workaround -Wdeprecated on SemDiagnosticConsumer's tricksy copy ctor.

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

9 years agoInitialize the AST consumer as soon as we have both an ASTConsumer and an
Richard Smith [Tue, 18 Aug 2015 20:39:29 +0000 (20:39 +0000)]
Initialize the AST consumer as soon as we have both an ASTConsumer and an
ASTContext. Fixes some cases where we could previously initialize the AST
consumer more than once.

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

9 years ago[sanitizer] Add -lutil to static runtime link flags.
Evgeniy Stepanov [Tue, 18 Aug 2015 20:36:11 +0000 (20:36 +0000)]
[sanitizer] Add -lutil to static runtime link flags.

This is needed to prevent breakage of -Wl,-as-needed link when
interceptors for functions in libutil are added. See PR15823.

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

9 years agoRevert r245323, it caused PR24493.
Nico Weber [Tue, 18 Aug 2015 20:32:55 +0000 (20:32 +0000)]
Revert r245323, it caused PR24493.

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

9 years agoSimplify Diagnostic's ctors a bit by using in-class initializers for its members
David Blaikie [Tue, 18 Aug 2015 20:24:06 +0000 (20:24 +0000)]
Simplify Diagnostic's ctors a bit by using in-class initializers for its members

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

9 years agoAdd AST narrowing matchers for inline and anonymous namespaces. Since the inline...
Aaron Ballman [Tue, 18 Aug 2015 19:55:20 +0000 (19:55 +0000)]
Add AST narrowing matchers for inline and anonymous namespaces. Since the inline keyword can also be specified on a FunctionDecl, this is a polymorphic matcher.

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

9 years agoRemoving useless whitespace; NFC.
Aaron Ballman [Tue, 18 Aug 2015 19:11:07 +0000 (19:11 +0000)]
Removing useless whitespace; NFC.

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

9 years agoMake __builtin_object_size always answer correctly
George Burgess IV [Tue, 18 Aug 2015 18:18:27 +0000 (18:18 +0000)]
Make __builtin_object_size always answer correctly

__builtin_object_size would return incorrect answers for many uses where
type=3. This fixes the inaccuracy by making us emit 0 instead of LLVM's
objectsize intrinsic.

Additionally, there are many cases where we would emit suboptimal (but
correct) answers, such as when arrays are involved. This patch fixes
some of these cases (please see new tests in test/CodeGen/object-size.c
for specifics on which cases are improved)

Patch mostly by Richard Smith.
Differential Revision: http://reviews.llvm.org/D12000
This fixes PR15212.

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

9 years agoUpdate to reflect the library set in LLVM changing.
Chandler Carruth [Tue, 18 Aug 2015 17:59:33 +0000 (17:59 +0000)]
Update to reflect the library set in LLVM changing.

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

9 years agoWe shouldn't need to pass -fno-strict-aliasing when building clang with clang.
Chris Bieneman [Tue, 18 Aug 2015 16:15:44 +0000 (16:15 +0000)]
We shouldn't need to pass -fno-strict-aliasing when building clang with clang.

Summary: The code comments in the Makefile indicate this was put in place to support issues when building clang with GCC. Today clang's strict aliasing works, so we shouldn't pass -fno-strict-aliasing when building with clang.

Reviewers: bogner, echristo

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D12036

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