]> granicus.if.org Git - clang/log
clang
8 years agoSkip NonNull sema checks in unevaluated contexts.
Eric Fiselier [Fri, 9 Oct 2015 00:17:57 +0000 (00:17 +0000)]
Skip NonNull sema checks in unevaluated contexts.

Summary:
Currently when a function annotated with __attribute__((nonnull)) is called in an unevaluated context with a null argument a -Wnonnull warning is emitted.
This warning seems like a false positive unless the call expression is potentially evaluated. Change this behavior so that the non-null warnings use DiagRuntimeBehavior so they wont emit when they won't be evaluated.

Reviewers: majnemer, rsmith

Subscribers: mclow.lists, cfe-commits

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

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

8 years agoExpose -f[no]ms-{compatibility,extensions} in clang-cl (PR25114)
Hans Wennborg [Thu, 8 Oct 2015 23:13:28 +0000 (23:13 +0000)]
Expose -f[no]ms-{compatibility,extensions} in clang-cl (PR25114)

These are enabled by default in clang-cl, because the whole idea is that
it should work like cl.exe, but I suppose it can make sense to disable
them if someone wants to compile code in a more strict mode.

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

8 years agoUse Triple.isAndroid() where possible.
Evgeniy Stepanov [Thu, 8 Oct 2015 21:21:44 +0000 (21:21 +0000)]
Use Triple.isAndroid() where possible.

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

8 years ago[WinEH] Push cleanupendpad scopes around exceptional cleanups
Reid Kleckner [Thu, 8 Oct 2015 21:14:56 +0000 (21:14 +0000)]
[WinEH] Push cleanupendpad scopes around exceptional cleanups

We were only doing this for SEH as a special case. Generalize it to all
cleanups.

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

8 years ago[CodeGen] [CodeGen] Attach function attributes to functions created in
Akira Hatanaka [Thu, 8 Oct 2015 20:26:34 +0000 (20:26 +0000)]
[CodeGen] [CodeGen] Attach function attributes to functions created in
CGBlocks.cpp.

This commit fixes a bug in clang's code-gen where it creates the
following functions but doesn't attach function attributes to them:

__copy_helper_block_
__destroy_helper_block_
__Block_byref_object_copy_
__Block_byref_object_dispose_

rdar://problem/20828324

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

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

8 years agoHandle sse turning on mmx, but no -mmx not turning off SSE.
Eric Christopher [Thu, 8 Oct 2015 20:10:18 +0000 (20:10 +0000)]
Handle sse turning on mmx, but no -mmx not turning off SSE.

Rationale :

// sse3
__m128d test_mm_addsub_pd(__m128d A, __m128d B) {
  return _mm_addsub_pd(A, B);
}

// mmx
void shift(__m64 a, __m64 b, int c) {
  _mm_slli_pi16(a, c);
  _mm_slli_pi32(a, c);
  _mm_slli_si64(a, c);
  _mm_srli_pi16(a, c);
  _mm_srli_pi32(a, c);
  _mm_srli_si64(a, c);
  _mm_srai_pi16(a, c);
  _mm_srai_pi32(a, c);
}

clang -msse3 -mno-mmx file.c -c

For this code we should be able to explicitly turn off MMX
without affecting the compilation of the SSE3 function and then
diagnose and error on compiling the MMX function.

This is a preparatory patch to the actual diagnosis code which is
coming in a future patch. This sets us up to have the correct information
where we need it and verifies that it's being emitted for the backend
to handle.

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

8 years agoMigrate most feature map inclusion to initFeatureMap for the x86 target so
Eric Christopher [Thu, 8 Oct 2015 20:10:14 +0000 (20:10 +0000)]
Migrate most feature map inclusion to initFeatureMap for the x86 target so
that we can build up an accurate set of features rather than relying on
TargetInfo initialization via handleTargetFeatures to munge the list
of features.

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

8 years ago[CodeGen] Check if the Decl pointer passed is null, and if so, return
Akira Hatanaka [Thu, 8 Oct 2015 19:30:57 +0000 (19:30 +0000)]
[CodeGen] Check if the Decl pointer passed is null, and if so, return
early.

This is needed in a patch I plan to commit later, in which a null Decl
pointer is passed to SetLLVMFunctionAttributesForDefinition.

Relevant discussion is in http://reviews.llvm.org/D13525.

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

8 years agoWhen mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style...
Aaron Ballman [Thu, 8 Oct 2015 19:24:08 +0000 (19:24 +0000)]
When mapping no_sanitize_* attributes to no_sanitize attributes, handle GNU-style formatting that involves prefix and suffix underscores. Cleans up other usages of similar functionality.

Patch by Adrian Zgorzalek!

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

8 years ago[clang-cl] Make /EHs turn on C++ EH once again
Reid Kleckner [Thu, 8 Oct 2015 17:29:07 +0000 (17:29 +0000)]
[clang-cl] Make /EHs turn on C++ EH once again

C++ exceptions are still off by default, which is similar to how C++
cleanups are off by default in MSVC.

If you use clang instead of clang-cl, exceptions are also still off by
default. In the future, when C++ EH is proven to be stable, we may flip
the default for that driver to be consistent with other platforms.

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

8 years agoSimplify DefaultCPU in ARMTargetInfo
Renato Golin [Thu, 8 Oct 2015 16:43:26 +0000 (16:43 +0000)]
Simplify DefaultCPU in ARMTargetInfo

Simplifying the convoluted CPU handling in ARMTargetInfo.

The default base CPU on ARM is ARM7TDMI, arch ARMv4T, and
ARMTargetInfo had a different one. This wasn't visible from
Clang because the driver selects the defaults and sets the
Arch/CPU features directly, but the constructor depended
on the CPU, which was never used.

This patch corrects the mistake and greatly simplifies
how CPU is dealt with (essentially by removing the duplicated
DefaultCPU field).

Tests updated.

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

8 years agoCGStmtOpenMP.cpp: Prune redundant \param. [-Wdocumentation]
NAKAMURA Takumi [Thu, 8 Oct 2015 16:41:42 +0000 (16:41 +0000)]
CGStmtOpenMP.cpp: Prune redundant \param. [-Wdocumentation]

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

8 years ago[VFS] Use VFS instead of virtual files in PPCallbacks test.
Benjamin Kramer [Thu, 8 Oct 2015 14:20:14 +0000 (14:20 +0000)]
[VFS] Use VFS instead of virtual files in PPCallbacks test.

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

8 years ago[Myriad]: default the Dwarf version to 2
Douglas Katzman [Thu, 8 Oct 2015 14:18:02 +0000 (14:18 +0000)]
[Myriad]: default the Dwarf version to 2

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

8 years ago[Driver] Use Twine instead of itostr. NFC.
Benjamin Kramer [Thu, 8 Oct 2015 10:31:17 +0000 (10:31 +0000)]
[Driver] Use Twine instead of itostr. NFC.

No need to construct temporary std::strings here.

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

8 years ago[MSVC Compat] Try to treat an implicit, fixed enum as an unfixed enum
David Majnemer [Thu, 8 Oct 2015 10:04:46 +0000 (10:04 +0000)]
[MSVC Compat] Try to treat an implicit, fixed enum as an unfixed enum

consider the following:
enum E *p;
enum E { e };

The above snippet is not ANSI C because 'enum E' has not bee defined
when we are processing the declaration of 'p'; however, it is a popular
extension to make the above work.  This would fail using the Microsoft
enum semantics because the definition of 'E' would implicitly have a
fixed underlying type of 'int' which would trigger diagnostic messages
about a mismatch between the declaration and the definition.

Instead, treat fixed underlying types as not fixed for the purposes of
the diagnostic.

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

8 years ago[OPENMP 4.1] Codegen for array sections/subscripts in 'reduction' clause.
Alexey Bataev [Thu, 8 Oct 2015 09:10:53 +0000 (09:10 +0000)]
[OPENMP 4.1] Codegen for array sections/subscripts in 'reduction' clause.
OpenMP 4.1 adds support for array sections/subscripts in 'reduction' clause. Patch adds codegen for this feature.

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

8 years agoUpdate a few more tests in response to the MS ABI enum semantics
David Majnemer [Thu, 8 Oct 2015 08:28:09 +0000 (08:28 +0000)]
Update a few more tests in response to the MS ABI enum semantics

Our self hosting buildbots found a few more tests which weren't updated
to reflect that the enum semantics are part of the Microsoft ABI.

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

8 years ago[Sema] Tweak incomplete enum types on MSVC ABI targets
David Majnemer [Thu, 8 Oct 2015 07:45:35 +0000 (07:45 +0000)]
[Sema] Tweak incomplete enum types on MSVC ABI targets

Enums without an explicit, fixed, underlying type are implicitly given a
fixed 'int' type for ABI compatibility with MSVC.  However, we can
enforce the standard-mandated rules on these types as-if we didn't know
this fact if the tag is not part of a definition.

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

8 years agoUpdate tests touched by r249656
David Majnemer [Thu, 8 Oct 2015 06:31:22 +0000 (06:31 +0000)]
Update tests touched by r249656

These test updates almost exclusively around the change in behavior
around enum: enums without a definition are considered incomplete except
when targeting MSVC ABIs.  Since these tests are interested in the
'incomplete-enum' behavior, restrict them to %itanium_abi_triple.

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

8 years agoUse itostr(), not std::to_string() because of Android.
Douglas Katzman [Thu, 8 Oct 2015 05:25:03 +0000 (05:25 +0000)]
Use itostr(), not std::to_string() because of Android.

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

8 years agoUnbreak 'debug-options' test when builder is Darwin
Douglas Katzman [Thu, 8 Oct 2015 05:02:24 +0000 (05:02 +0000)]
Unbreak 'debug-options' test when builder is Darwin

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

8 years ago[MSVC Compat] Enable ABI impacting non-conforming behavior independently of -fms...
David Majnemer [Thu, 8 Oct 2015 04:53:31 +0000 (04:53 +0000)]
[MSVC Compat] Enable ABI impacting non-conforming behavior independently of -fms-compatibility

No ABI for C++ currently makes it possible to implement the standard
100% perfectly.  We wrongly hid some of our compatible behavior behind
-fms-compatibility instead of tying it to the compiler ABI.

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

8 years agoStop messing with the 'g' group of options in CompilerInvocation.
Douglas Katzman [Thu, 8 Oct 2015 04:24:12 +0000 (04:24 +0000)]
Stop messing with the 'g' group of options in CompilerInvocation.

With this change, most 'g' options are rejected by CompilerInvocation.
They remain only as Driver options. The new way to request debug info
from cc1 is with "-debug-info-kind={line-tables-only|limited|standalone}"
and "-dwarf-version={2|3|4}". In the absence of a command-line option
to specify Dwarf version, the Toolchain decides it, rather than placing
Toolchain-specific logic in CompilerInvocation.

Also fix a bug in the Windows compatibility argument parsing
in which the "rightmost argument wins" principle failed.

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

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

8 years agoFix a -Wdeclaration-after-statement warning.
Craig Topper [Thu, 8 Oct 2015 03:37:36 +0000 (03:37 +0000)]
Fix a -Wdeclaration-after-statement warning.

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

8 years ago[WinEH] Remove NewMSEH and enable its behavior by default
Reid Kleckner [Thu, 8 Oct 2015 01:13:52 +0000 (01:13 +0000)]
[WinEH] Remove NewMSEH and enable its behavior by default

Testing has shown that it is at least as reliable as the old landingpad
pattern matching code.

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

8 years agoWhen pretty-printing a C++11 literal operator, don't insert whitespace between
Richard Smith [Thu, 8 Oct 2015 00:17:59 +0000 (00:17 +0000)]
When pretty-printing a C++11 literal operator, don't insert whitespace between
the "" and the suffix; that breaks names such as 'operator""if'. For symmetry,
also remove the space between the 'operator' and the '""'.

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

8 years agoDon't emit exceptional stackrestore cleanups around inalloca functions
Reid Kleckner [Thu, 8 Oct 2015 00:17:45 +0000 (00:17 +0000)]
Don't emit exceptional stackrestore cleanups around inalloca functions

The backend restores the stack pointer after recovering from an
exception.  This is similar to r245879, but it doesn't try to use the
normal cleanup mechanism, so hopefully it won't cause the same breakage.

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

8 years agoMake clang_Cursor_getMangling not mangle if the declaration isn't mangled
Ehsan Akhgari [Thu, 8 Oct 2015 00:01:20 +0000 (00:01 +0000)]
Make clang_Cursor_getMangling not mangle if the declaration isn't mangled

Right now clang_Cursor_getMangling will attempt to mangle any
declaration, even if the declaration isn't mangled (extern C).  This
results in a partially mangled name which isn't useful for much. This
patch makes clang_Cursor_getMangling return an empty string if the
declaration isn't mangled.

Patch by Michael Wu <mwu@mozilla.com>.

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

8 years ago[WinEH] Don't use lifetime markers for MS catch parameters
Reid Kleckner [Wed, 7 Oct 2015 21:03:41 +0000 (21:03 +0000)]
[WinEH] Don't use lifetime markers for MS catch parameters

We don't have a good place to put them. Our previous spot was causing us
to optimize loads from the exception object to undef, because it was
after the catchpad instruction that models the write to the catch
object.

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

8 years agoFix a shared CMake build by linking with libclangBasic.
Benjamin Kramer [Wed, 7 Oct 2015 20:19:25 +0000 (20:19 +0000)]
Fix a shared CMake build by linking with libclangBasic.

Patch by Jan Vesely!

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

8 years agoASTMatchers: Keep AllCallbacks in a set instead of a vector
Daniel Jasper [Wed, 7 Oct 2015 19:56:12 +0000 (19:56 +0000)]
ASTMatchers: Keep AllCallbacks in a set instead of a vector

AllCallbacks is currently only used to call onStartOfTranslationUnit and
onEndOfTranslationUnit on them. In this (and any other scenario I can
come up with), it is important (or at least better) not to have
duplicates in this container. E.g. currently onEndOfTranslationUnit is
called repeatedly on the same callback for every matcher that is
registered with it.

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

8 years agoclang-format: Add include sorting capabilities to sublime, emacs and
Daniel Jasper [Wed, 7 Oct 2015 17:00:20 +0000 (17:00 +0000)]
clang-format: Add include sorting capabilities to sublime, emacs and
clang-format-diff.py.

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

8 years ago[VFS] Port driver tool chains to VFS.
Benjamin Kramer [Wed, 7 Oct 2015 15:48:01 +0000 (15:48 +0000)]
[VFS] Port driver tool chains to VFS.

There are still some loose ends here but it's sufficient so we can detect
GCC headers that are inside of a VFS.

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

8 years agoclang-format: Fixed missing space between Obj-C for/in and a typecast.
Daniel Jasper [Wed, 7 Oct 2015 15:09:08 +0000 (15:09 +0000)]
clang-format: Fixed missing space between Obj-C for/in and a typecast.

Fixes this bug: https://llvm.org/bugs/show_bug.cgi?id=24504

TokenAnnotator::spaceRequiredBetween was handling TT_ForEachMacro but
not TT_ObjCForIn, so lines that look like:

  for (id nextObject in (NSArray *)myArray)

would incorrectly turn into:

  for (id nextObject in(NSArray *)myArray)

Patch by Kent Sutherland, thank you.

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

8 years ago[clang-format] Stop alignment sequences on open braces and parens when
Daniel Jasper [Wed, 7 Oct 2015 15:03:26 +0000 (15:03 +0000)]
[clang-format] Stop alignment sequences on open braces and parens when
aligning assignments.

This was done correctly when aligning the declarations, but not when
aligning assignments.

FIXME: The code between assignments and declarations alignment is
roughly duplicated and
would benefit from factorization.

Bug 25090: https://llvm.org/bugs/show_bug.cgi?id=25090

Patch by Beren Minor. Thank you.

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

8 years agoclang-format: Hopefully fix code blocks in docs.
Daniel Jasper [Wed, 7 Oct 2015 13:02:45 +0000 (13:02 +0000)]
clang-format: Hopefully fix code blocks in docs.

Otherwise I will have to install sphinx ;)..

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

8 years agoSilence warning about not being able to find clang-interpreter
Richard Barton [Wed, 7 Oct 2015 11:14:25 +0000 (11:14 +0000)]
Silence warning about not being able to find clang-interpreter

This binary is only built with the examples project, so only require it then.

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

8 years agoMake the test take input from stdin to prevent matching characters in a file path
Richard Barton [Wed, 7 Oct 2015 10:33:36 +0000 (10:33 +0000)]
Make the test take input from stdin to prevent matching characters in a file path

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

8 years agoFix crash in codegen on casting to `bool &`.
Alexey Bataev [Wed, 7 Oct 2015 10:22:08 +0000 (10:22 +0000)]
Fix crash in codegen on casting to `bool &`.
Currently codegen crashes trying to emit casting to bool &. It happens because bool type is converted to i1 and later then lvalue for reference is converted to i1*. But when codegen tries to load this lvalue it crashes trying to load value from this i1*.

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

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

8 years ago[VFS] Refactor VFSFromYAML a bit.
Benjamin Kramer [Wed, 7 Oct 2015 10:05:44 +0000 (10:05 +0000)]
[VFS] Refactor VFSFromYAML a bit.

- Rename it to RedirectingFileSystem. This is what it does, YAML is just a
  serialization format for it.
- Consistently use unique_ptr for memory management.

No functional change intended.

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

8 years ago[VFS] Also drop '.' when adding files to an in-memory FS.
Benjamin Kramer [Wed, 7 Oct 2015 08:32:50 +0000 (08:32 +0000)]
[VFS] Also drop '.' when adding files to an in-memory FS.

Otherwise we won't be able to find them later.

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

8 years agoMake clang-format actually respect custom brace wrapping flags.
Daniel Jasper [Wed, 7 Oct 2015 04:06:10 +0000 (04:06 +0000)]
Make clang-format actually respect custom brace wrapping flags.

This fixes llvm.org/PR25073.

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

8 years agoclang-format: Fix false ObjC block detection.
Daniel Jasper [Wed, 7 Oct 2015 03:43:10 +0000 (03:43 +0000)]
clang-format: Fix false ObjC block detection.

Before:
  inline A operator^(const A &lhs, const A &rhs) {} int i;

After:
  inline A operator^(const A &lhs, const A &rhs) {}
  int i;

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

8 years agoclang-format: Understand array reference types.
Daniel Jasper [Wed, 7 Oct 2015 01:41:22 +0000 (01:41 +0000)]
clang-format: Understand array reference types.

Before:
  void f(Type(&parameter)[10]) {}
  void f(Type (*parameter)[10]) {}

After:
  void f(Type (&parameter)[10]) {}
  void f(Type (*parameter)[10]) {}

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

8 years agoclang-format: Fix false positive in pointer/reference detection.
Daniel Jasper [Wed, 7 Oct 2015 01:41:14 +0000 (01:41 +0000)]
clang-format: Fix false positive in pointer/reference detection.

Before:
  return options != nullptr &&operator==(*options);

After:
  return options != nullptr && operator==(*options);

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

8 years agoclang/test/CodeGen/exceptions-seh-leave-new.c: Use "opt -instnamer" for branch-sensit...
NAKAMURA Takumi [Wed, 7 Oct 2015 01:29:26 +0000 (01:29 +0000)]
clang/test/CodeGen/exceptions-seh-leave-new.c: Use "opt -instnamer" for branch-sensitive checks.

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

8 years ago[SEH] Fix x64 __exception_code in __except blocks
Reid Kleckner [Wed, 7 Oct 2015 01:07:13 +0000 (01:07 +0000)]
[SEH] Fix x64 __exception_code in __except blocks

Use llvm.eh.exceptioncode to get the code out of EAX for x64. For
32-bit, the filter is responsible for storing it to memory for us.

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

8 years agoFix Clang-tidy modernize-use-nullptr warnings in source directories; other minor...
Hans Wennborg [Tue, 6 Oct 2015 23:40:43 +0000 (23:40 +0000)]
Fix Clang-tidy modernize-use-nullptr warnings in source directories; other minor cleanups

Patch by Eugene Zelenko!

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

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

8 years agoRevert r249437
Ehsan Akhgari [Tue, 6 Oct 2015 18:53:12 +0000 (18:53 +0000)]
Revert r249437

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

8 years agoMake clang_Cursor_getMangling don't mangle if the declaration isn't mangled
Ehsan Akhgari [Tue, 6 Oct 2015 18:24:33 +0000 (18:24 +0000)]
Make clang_Cursor_getMangling don't mangle if the declaration isn't mangled

Right now clang_Cursor_getMangling will attempt to mangle any
declaration, even if the declaration isn't mangled (extern "C").  This
results in a partially mangled name which isn't useful for much. This
patch makes clang_Cursor_getMangling return an empty string if the
declaration isn't mangled.

Patch by Michael Wu <mwu@mozilla.com>.

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

8 years ago[Tooling] Don't run a tool invocation without a FileManager.
Benjamin Kramer [Tue, 6 Oct 2015 15:04:13 +0000 (15:04 +0000)]
[Tooling] Don't run a tool invocation without a FileManager.

Fixes a crash regression from r249410.

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

8 years ago[Tooling] Reuse FileManager in ASTUnit.
Benjamin Kramer [Tue, 6 Oct 2015 14:45:20 +0000 (14:45 +0000)]
[Tooling] Reuse FileManager in ASTUnit.

ASTUnit was creating multiple FileManagers and throwing them away. Reuse
the one from Tooling. No functionality change now but necessary for
VFSifying tooling.

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

8 years ago[VFS] Put the incoming name in the file status to make InMemoryFS behave more like...
Benjamin Kramer [Tue, 6 Oct 2015 14:45:16 +0000 (14:45 +0000)]
[VFS] Put the incoming name in the file status to make InMemoryFS behave more like a real FS.

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

8 years ago[Tooling] Remove dead code.
Benjamin Kramer [Tue, 6 Oct 2015 14:45:13 +0000 (14:45 +0000)]
[Tooling] Remove dead code.

It took me some time to figure out why this is not working as expected:
std:error_code converts to true if there is an error. This means we never
ever took the generated absolute path, which happens to be the right thing
anyways as it properly works with virtual files. Just remove the whole
thing, relative paths are covered by existing tooling tests.

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

8 years agoToolingTests: Tweak getAnyTarget() to match "x86_64".
NAKAMURA Takumi [Tue, 6 Oct 2015 13:58:13 +0000 (13:58 +0000)]
ToolingTests: Tweak getAnyTarget() to match "x86_64".

Both "x86" and "x86-64" are incompatible to triple's arch.

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

8 years agoBasicTests: Suppress InMemoryFileSystemTest.WindowsPath on win32 while investigating.
NAKAMURA Takumi [Tue, 6 Oct 2015 12:16:27 +0000 (12:16 +0000)]
BasicTests: Suppress InMemoryFileSystemTest.WindowsPath on win32 while investigating.

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

8 years agoclang-format: Add empty line before code-blocks in Docs.
Daniel Jasper [Tue, 6 Oct 2015 12:11:51 +0000 (12:11 +0000)]
clang-format: Add empty line before code-blocks in Docs.

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

8 years agoclang-format: Make IncludeCategories configurable in .clang-format file.
Daniel Jasper [Tue, 6 Oct 2015 11:54:18 +0000 (11:54 +0000)]
clang-format: Make IncludeCategories configurable in .clang-format file.

This was made much easier by introducing an IncludeCategory struct to
replace the previously used std::pair.

Also, cleaned up documentation and added examples.

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

8 years agoAdds a way for tools to deduce the target config from a compiler name.
Manuel Klimek [Tue, 6 Oct 2015 10:45:03 +0000 (10:45 +0000)]
Adds a way for tools to deduce the target config from a compiler name.

Adds `addTargetAndModeForProgramName`, a utility function that will add
appropriate `-target foo` and `--driver-mode=g++` tokens to a command
line for driver invocations of the form `a/b/foo-g++`. It is intended to
support tooling: for example, should a compilation database record some
invocation of `foo-g++` without these implicit flags, a Clang tool may
use this function to add them back.

Patch by Luke Zarko.

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

8 years ago[VFS] Port SimpleFormatContext to InMemoryFileSystem.
Benjamin Kramer [Tue, 6 Oct 2015 10:23:34 +0000 (10:23 +0000)]
[VFS] Port SimpleFormatContext to InMemoryFileSystem.

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

8 years ago[VFS] Port applyAllReplacements to InMemoryFileSystem.
Benjamin Kramer [Tue, 6 Oct 2015 10:23:17 +0000 (10:23 +0000)]
[VFS] Port applyAllReplacements to InMemoryFileSystem.

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

8 years ago[VFS] Transition clang-format to use an in-memory FS.
Benjamin Kramer [Tue, 6 Oct 2015 10:04:08 +0000 (10:04 +0000)]
[VFS] Transition clang-format to use an in-memory FS.

Apart from being cleaner this also means that clang-format no longer has
access to the host file system. This isn't necessary because clang-format
never reads includes :)

Includes minor tweaks and bugfixes found in the VFS implementation while
running clang-format tests.

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

8 years agoRemove duplicated default arguments. NFC.
Benjamin Kramer [Mon, 5 Oct 2015 21:20:19 +0000 (21:20 +0000)]
Remove duplicated default arguments. NFC.

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

8 years agoFix the MSVC build.
Rafael Espindola [Mon, 5 Oct 2015 20:20:50 +0000 (20:20 +0000)]
Fix the MSVC build.

No idea what asymmetry MSVC is findind.

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

8 years agoRevert r107690 (for PR7417) and add a testcase that it breaks. The approach of
Richard Smith [Mon, 5 Oct 2015 20:05:21 +0000 (20:05 +0000)]
Revert r107690 (for PR7417) and add a testcase that it breaks. The approach of
that change turns out to not be reasonable: mutating the AST of a parsed
template during instantiation is not a sound thing to do, does not work across
chained PCH / modules builds, and is in any case a special-case workaround to a
more general problem that should be solved centrally.

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

8 years agoAdding an AST node matcher for NonTypeTemplateParmDecl objects.
Aaron Ballman [Mon, 5 Oct 2015 19:44:42 +0000 (19:44 +0000)]
Adding an AST node matcher for NonTypeTemplateParmDecl objects.

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

8 years ago[sanitizer] Enable lsan for AArch64
Adhemerval Zanella [Mon, 5 Oct 2015 19:16:42 +0000 (19:16 +0000)]
[sanitizer] Enable lsan for AArch64

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

8 years agoRe-introduce the unique_ptr removed in r249328 and just make
Adrian Prantl [Mon, 5 Oct 2015 18:54:30 +0000 (18:54 +0000)]
Re-introduce the unique_ptr removed in r249328 and just make
~CodeGenABITypes out-of-line, which should have the same effect.

Thanks to David Blaikie for pointing this out!

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

8 years agoUndo the unique_ptr'fication of CodeGenABITypes::CGM introduced in r248762.
Adrian Prantl [Mon, 5 Oct 2015 17:41:16 +0000 (17:41 +0000)]
Undo the unique_ptr'fication of CodeGenABITypes::CGM introduced in r248762.
include/clang/CodeGenABITypes.h is in meant to be included by external
users, but using a unique_ptr on the private CodeGenModule introduces a
dependency on the type definition that prevents such a use.

NFC

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

8 years agoAdding a narrowing AST matcher for FunctionDecl::isVariadic(), plus tests and documen...
Aaron Ballman [Mon, 5 Oct 2015 14:41:27 +0000 (14:41 +0000)]
Adding a narrowing AST matcher for FunctionDecl::isVariadic(), plus tests and documentation.

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

8 years ago[VFS] Fix the windows build by including the right headers.
Benjamin Kramer [Mon, 5 Oct 2015 14:06:36 +0000 (14:06 +0000)]
[VFS] Fix the windows build by including the right headers.

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

8 years ago[VFS] Fix compilation on systems where time_t is not int64_t.
Benjamin Kramer [Mon, 5 Oct 2015 14:02:15 +0000 (14:02 +0000)]
[VFS] Fix compilation on systems where time_t is not int64_t.

No functional change intended.

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

8 years ago[VFS] Add working directories to every virtual file system.
Benjamin Kramer [Mon, 5 Oct 2015 13:55:20 +0000 (13:55 +0000)]
[VFS] Add working directories to every virtual file system.

For RealFileSystem this is getcwd()/chdir(), the synthetic file systems can
make up one for themselves. OverlayFileSystem now synchronizes the working
directories when a new FS is added to the overlay or the overlay working
directory is set. This allows purely artificial file systems that have zero
ties to the underlying disks.

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

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

8 years ago[VFS] Add an in-memory file system implementation.
Benjamin Kramer [Mon, 5 Oct 2015 13:55:14 +0000 (13:55 +0000)]
[VFS] Add an in-memory file system implementation.

This is a simple file system tree of memory buffers that can be filled by a
client. In conjunction with an OverlayFS it can be used to make virtual
files accessible right next to physical files. This can be used as a
replacement for the virtual file handling in FileManager and which I intend
to remove eventually.

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

8 years ago[VFS] Move class out of method so it looks less like Java.
Benjamin Kramer [Mon, 5 Oct 2015 13:55:09 +0000 (13:55 +0000)]
[VFS] Move class out of method so it looks less like Java.

No functionality change.

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

8 years agoclang-format: Small doc fix.
Daniel Jasper [Mon, 5 Oct 2015 13:30:42 +0000 (13:30 +0000)]
clang-format: Small doc fix.

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

8 years ago[VFS] Remove setName from the file interface.
Benjamin Kramer [Mon, 5 Oct 2015 13:15:33 +0000 (13:15 +0000)]
[VFS] Remove setName from the file interface.

This streamlines the interface a bit and makes Status more immutable.
No functional change intended.

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

8 years agoThe Driver does not set the +strict-align flag when targeting
Alexandros Lamprineas [Mon, 5 Oct 2015 12:45:10 +0000 (12:45 +0000)]
The Driver does not set the +strict-align flag when targeting
[ARM] armv6m + netbsd. Tests are misssing for armv6m + darwin as well.

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

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

8 years ago[mips][p5600] Add -mcpu=p5600 option.
Daniel Sanders [Mon, 5 Oct 2015 12:24:30 +0000 (12:24 +0000)]
[mips][p5600] Add -mcpu=p5600 option.

Summary:

Reviewers: vkalintiris, atanasyan

Subscribers: cfe-commits

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

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

8 years agoUse llvm::errc instead of std::errc.
Rafael Espindola [Mon, 5 Oct 2015 11:49:35 +0000 (11:49 +0000)]
Use llvm::errc instead of std::errc.

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

8 years ago[OpenCL] Fix casting a true boolean to an integer vector.
Anastasia Stulova [Mon, 5 Oct 2015 11:27:41 +0000 (11:27 +0000)]
[OpenCL] Fix casting a true boolean to an integer vector.

OpenCL v1.1 s6.2.2: for the boolean value true, every bit in the result vector should be set.

This change treats the i1 value as signed for the purposes of performing the cast to integer,
and therefore sign extend into the result.

Patch by Neil Hickey!

http://reviews.llvm.org/D13349

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

8 years agoRemove support for the mips-mti-linux toolchain.
Vasileios Kalintiris [Mon, 5 Oct 2015 10:34:46 +0000 (10:34 +0000)]
Remove support for the mips-mti-linux toolchain.

There are two remaining buildbot failures that we'll have to
investigate before submitting this again.

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

8 years agoFix test failure on Windows buildbots for the mips-mti-linux toolchain.
Vasileios Kalintiris [Mon, 5 Oct 2015 09:55:50 +0000 (09:55 +0000)]
Fix test failure on Windows buildbots for the mips-mti-linux toolchain.

Try to make the Windows buildbots happy by fixing the regexes that match the
paths to CRT files.

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

8 years agoRe-commit "Add support for the new mips-mti-linux toolchain."
Vasileios Kalintiris [Mon, 5 Oct 2015 09:12:36 +0000 (09:12 +0000)]
Re-commit "Add support for the new mips-mti-linux toolchain."

r249137 added support for the new mips-mti-linux toolchain. However,
the new tests of that commit, broke some buildbots because they didn't use
the correct regular expressions to capture the filename of Clang & LLD.

This commit re-applies the changes of r249137 and fixes the tests in
r249137 in order to match the filenames of the Clang and LLD executable.

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

8 years agoclang-format: Remove sentence in option cost threshold that weakens the
Daniel Jasper [Mon, 5 Oct 2015 07:36:40 +0000 (07:36 +0000)]
clang-format: Remove sentence in option cost threshold that weakens the
statement. Specifically, we don't want people that have already written
a patch to just write a style guide for their 1-person project.

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

8 years agoclang-format: Document threshold for adding new options.
Daniel Jasper [Mon, 5 Oct 2015 07:24:55 +0000 (07:24 +0000)]
clang-format: Document threshold for adding new options.

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

8 years ago[CMake] Move CLANG_INCLUDE_TESTS in advance of add_subdirectory(tools).
NAKAMURA Takumi [Mon, 5 Oct 2015 02:04:49 +0000 (02:04 +0000)]
[CMake] Move CLANG_INCLUDE_TESTS in advance of add_subdirectory(tools).

The target "check-clang-tools" is affected by CLANG_INCLUDE_TESTS but it was undefined in 1st configuration procedure.

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

8 years agoModule Debugging: Emit (ObjC) function declarations in the module scope
Adrian Prantl [Sun, 4 Oct 2015 23:23:04 +0000 (23:23 +0000)]
Module Debugging: Emit (ObjC) function declarations in the module scope
when building a module.

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

8 years agoFix makefile build on OSX when ARM targets are not enabled
Keno Fischer [Sun, 4 Oct 2015 18:51:04 +0000 (18:51 +0000)]
Fix makefile build on OSX when ARM targets are not enabled

Summary: When LLVM/Clang is built without ARM support, the ios_kext runtime
library is not built, but without this patch, the Makefile still tries to
copy it. This is a recent regression, because the ios_kext library used
to also be built on x86_64.

Reviewers: beanz

Subscribers: aemerson, cfe-commits, rengolin

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

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

8 years agoAdd -f[no-]declspec to control recognition of __declspec as a keyword
Saleem Abdulrasool [Sun, 4 Oct 2015 17:51:05 +0000 (17:51 +0000)]
Add -f[no-]declspec to control recognition of __declspec as a keyword

In versions of clang prior to r238238, __declspec was recognized as a keyword in
all modes.  It was then changed to only be enabled when Microsoft or Borland
extensions were enabled (and for CUDA, as a temporary measure).  There is a
desire to support __declspec in Playstation code, and possibly other
environments.  This commit adds a command-line switch to allow explicit
enabling/disabling of the recognition of __declspec as a keyword.  Recognition
is enabled by default in Microsoft, Borland, CUDA, and PS4 environments, and
disabled in all other environments.

Patch by Warren Ristow!

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

8 years agoPass SourceRange by value in a test I missed in r249259.
Craig Topper [Sun, 4 Oct 2015 05:09:13 +0000 (05:09 +0000)]
Pass SourceRange by value in a test I missed in r249259.

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

8 years agoSourceRanges are small and trivially copyable, don't them by reference.
Craig Topper [Sun, 4 Oct 2015 04:53:55 +0000 (04:53 +0000)]
SourceRanges are small and trivially copyable, don't them by reference.

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

8 years agoDiagnose const atomics in __atomic builtins.
Eric Fiselier [Sun, 4 Oct 2015 00:11:02 +0000 (00:11 +0000)]
Diagnose const atomics in __atomic builtins.

Diagnose when a pointer to const T is used as the first argument in at atomic
builtin unless that builtin is a load operation. This is already checked for
C11 atomics builtins but not for __atomic ones.

This patch was given the LGTM by rsmith when it was part
of a larger review. (See http://reviews.llvm.org/D10407)

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

8 years agoReplace double negation of !FileID.isInvalid() with FileID.isValid().
Yaron Keren [Sat, 3 Oct 2015 10:46:20 +0000 (10:46 +0000)]
Replace double negation of !FileID.isInvalid() with FileID.isValid().
+couple more of double-negated !SourceLocation.isInvalid() unfixed in r249228.

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

8 years agofix previous commit
Saleem Abdulrasool [Sat, 3 Oct 2015 07:15:28 +0000 (07:15 +0000)]
fix previous commit

Forgot to add the '='.  In cl mode, --target must have an '='.

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

8 years agotry to fix the ARM self host bots
Saleem Abdulrasool [Sat, 3 Oct 2015 06:37:38 +0000 (06:37 +0000)]
try to fix the ARM self host bots

The default target is ARM on the ARM self host bots.  This is problematic since
the behaviour on x86, x64 is different from ARM.  Explicitly pass the target.
This should hopefully fix the ARM bots.

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

8 years agoReplace double-negated !SourceLocation.isInvalid() with SourceLocation.isValid().
Yaron Keren [Sat, 3 Oct 2015 05:15:57 +0000 (05:15 +0000)]
Replace double-negated !SourceLocation.isInvalid() with SourceLocation.isValid().

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

8 years agoDriver: follow WoA ABI recommendations
Saleem Abdulrasool [Sat, 3 Oct 2015 03:39:28 +0000 (03:39 +0000)]
Driver: follow WoA ABI recommendations

The Windows on ARM ABI recommends that FPO be disabled.  This is since the
Windows on ARM ABI uses the FP for fast stack walking.  By paying the slight
cost of the loss of registers, a much faster backtrace is possible by using the
frame pointer since the pdata need not be consulted.  Furthermore, even if pdata
is not available, you can still more easily reconstruct the stack.

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

8 years agoFix clang/test/CodeGenCXX/strict-vtable-pointers.cpp for -Asserts. It missed somethin...
NAKAMURA Takumi [Sat, 3 Oct 2015 00:50:12 +0000 (00:50 +0000)]
Fix clang/test/CodeGenCXX/strict-vtable-pointers.cpp for -Asserts. It missed something. :)

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