]> granicus.if.org Git - clang/log
clang
9 years agoLook through using decls when classifying implicit member access
Reid Kleckner [Tue, 20 Oct 2015 18:12:08 +0000 (18:12 +0000)]
Look through using decls when classifying implicit member access

Clang will now accept this valid C++11 code:
  struct A { int field; };
  struct B : A {
    using A::field;
    enum { TheSize = sizeof(field) };
  };

Previously we would classify the 'field' reference as something other
than a field, and then forget to apply the C++11 rule to allow
non-static data member references in unevaluated contexts.

This usually arises in class templates that want to reference fields of
a dependent base in an unevaluated context outside of an instance
method. Such contexts do not allow references to 'this', so the only way
to access the field is with a using decl and an implicit member
reference.

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

9 years ago[CMake] Make external compiler-rt install scripts relative to CMAKE_INSTALL_PREFIX.
Chris Bieneman [Tue, 20 Oct 2015 16:39:25 +0000 (16:39 +0000)]
[CMake] Make external compiler-rt install scripts relative to CMAKE_INSTALL_PREFIX.

This change makes LLVM_BUILD_EXTERNAL_COMPILER_RT work correctly when overriding CMAKE_INSTALL_PREFIX on the install action (which is how LLVM_CREATE_XCODE_TOOLCHAIN works).

This fix is two parts:
(1) Pass CMAKE_INSTALL_PREFIX in as a variable from the parent install to the child install
(2) When passing COMPILER_RT_INSTALL_PATH into the external project make sure it is passed as a string not a path.

Not specifying the full path for COMPILER_RT_INSTALL_PATH isn't enough to fix the issue because relative paths specified on the CMake command line are expanded relative to the working directory before the cache is populated. Forcing this to a string allows it to remain a relative path through to the install() calls. Relative paths specified in install() calls are expanded relative to CMAKE_INSTALL_PREFIX at install time.

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

9 years ago[AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap.
Benjamin Kramer [Tue, 20 Oct 2015 15:08:46 +0000 (15:08 +0000)]
[AST] Put TypeLocs and NestedNameSpecifierLocs into the ParentMap.

Firstly this changes the type of parent map to be keyed on DynTypedNode to
simplify the following changes. This comes with a DenseMapInfo for
DynTypedNode, which is a bit incomplete still and will probably only work
for parentmap right now.

Then the RecursiveASTVisitor in ASTContext is updated and finally
ASTMatchers hasParent and hasAncestor learn about the new functionality.

Now ParentMap is only missing TemplateArgumentLocs and CXXCtorInitializers.

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

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

9 years agoRoll-back r250822.
Angel Garcia Gomez [Tue, 20 Oct 2015 13:23:58 +0000 (13:23 +0000)]
Roll-back r250822.

Summary: It breaks the build for the ASTMatchers

Subscribers: klimek, cfe-commits

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

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

9 years agoApply modernize-use-default to clang.
Angel Garcia Gomez [Tue, 20 Oct 2015 12:52:55 +0000 (12:52 +0000)]
Apply modernize-use-default to clang.

Summary: Replace empty bodies of default constructors and destructors with '= default'.

Reviewers: bkramer, klimek

Subscribers: klimek, alexfh, cfe-commits

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

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

9 years ago[x86] Fix maskload/store intrinsic definitions in avxintrin.h
Andrea Di Biagio [Tue, 20 Oct 2015 11:19:54 +0000 (11:19 +0000)]
[x86] Fix maskload/store intrinsic definitions in avxintrin.h

According to the Intel documentation, the mask operand of a maskload and
maskstore intrinsics is always a vector of packed integer/long integer values.
This patch introduces the following two changes:
 1. It fixes the avx maskload/store intrinsic definitions in avxintrin.h.
 2. It changes BuiltinsX86.def to match the correct gcc definitions for avx
    maskload/store (see D13861 for more details).

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

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

9 years agoRevert accidental commit. This isn't ready yet.
Benjamin Kramer [Tue, 20 Oct 2015 07:53:14 +0000 (07:53 +0000)]
Revert accidental commit. This isn't ready yet.

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

9 years agoPut back dead code that's used out-of-tree.
Benjamin Kramer [Tue, 20 Oct 2015 07:50:21 +0000 (07:50 +0000)]
Put back dead code that's used out-of-tree.

Partially reverts r250418.

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

9 years ago[DEBUG INFO] Emit debug info for type used in explicit cast only.
Alexey Bataev [Tue, 20 Oct 2015 04:24:12 +0000 (04:24 +0000)]
[DEBUG INFO] Emit debug info for type used in explicit cast only.
Currently debug info for types used in explicit cast only is not emitted. It happened after a patch for better alignment handling. This patch fixes this bug.
Differential Revision: http://reviews.llvm.org/D13582

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

9 years agoRevert "Diagnose UnresolvedLookupExprs that resolve to instance members in static...
Reid Kleckner [Tue, 20 Oct 2015 00:31:42 +0000 (00:31 +0000)]
Revert "Diagnose UnresolvedLookupExprs that resolve to instance members in static methods"

This reverts commit r250592.

It has issues around unevaluated contexts, like this:
  template <class T> struct A { T i; };
  template <class T>
  struct B : A<T> {
    using A<T>::i;
    typedef decltype(i) U;
  };
  template struct B<int>;

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

9 years ago[X86] Remove a few 'else' after 'return'
Craig Topper [Tue, 20 Oct 2015 00:00:17 +0000 (00:00 +0000)]
[X86] Remove a few 'else' after 'return'

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

9 years ago[MS ABI] Give linkonce_odr, instead of external_linkage, to certain kinds of static...
David Majnemer [Mon, 19 Oct 2015 23:22:49 +0000 (23:22 +0000)]
[MS ABI] Give linkonce_odr, instead of external_linkage, to certain kinds of static data members

Out-of-line definitions of static data members which have an inline
initializer must get GVA_DiscardableODR linkage instead of
GVA_StrongExternal linkage.

MSVC 2013's behavior is different with respect to this and would cause
link errors if one TU provided a definition while another did not.
MSVC 2015 fixed this bug, making this OK.  Note that the 2015 behavior
is always compatible with 2013: it never produces a strong definition.

This essentially reverts r237787.

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

9 years agoclang-format: Use pipes instead of temporary files for most lit tests.
Nico Weber [Mon, 19 Oct 2015 16:21:29 +0000 (16:21 +0000)]
clang-format: Use pipes instead of temporary files for most lit tests.

This makes the format tests look more like most other FileCheck tests in clang.

The multiple-inputs tests still use temp files, to make sure that the file
input code in clang-format stays tested.

Stop stripping out the comment lines in style-on-command-line.cpp as they don't
get in the way and it makes the test simpler. Also remove 2>&1s on the tests in
that file that don't need it.

http://reviews.llvm.org/D13852

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

9 years agoSample Profiles - Fix location of binary encoding documentation. NFC.
Diego Novillo [Mon, 19 Oct 2015 15:53:17 +0000 (15:53 +0000)]
Sample Profiles - Fix location of binary encoding documentation. NFC.

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

9 years agoAdded new options to ClangFormat VSIX package.
Marek Kurdej [Mon, 19 Oct 2015 10:08:35 +0000 (10:08 +0000)]
Added new options to ClangFormat VSIX package.

Summary:
Added new options to ClangFormat VSIX package:
* fallback-style
* assume-filename
* sort-includes.
Changed version to 1.1 (otherwise one couldn't update).

Fixed clang-format escaping of XML reserved characters.

Reviewers: hans, aaron.ballman, klimek, rnk, zturner

Subscribers: djasper, cfe-commits

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

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

9 years agoFix 'will be initialized after' warning.
Manuel Klimek [Mon, 19 Oct 2015 08:43:46 +0000 (08:43 +0000)]
Fix 'will be initialized after' warning.

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

9 years agoMake test not rely on %T ending on /Output.
Manuel Klimek [Mon, 19 Oct 2015 08:27:51 +0000 (08:27 +0000)]
Make test not rely on %T ending on /Output.

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

9 years ago[X86] Enable soft float ABI for x86
Michael Kuperstein [Mon, 19 Oct 2015 08:09:43 +0000 (08:09 +0000)]
[X86] Enable soft float ABI for x86

The Intel MCU psABI requires floating-point values to be passed in-reg.
This makes the x86-32 ABI code respect "-mfloat-abi soft" and generate float inreg arguments.

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

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

9 years agoUse saner variable names. NFC.
Michael Kuperstein [Mon, 19 Oct 2015 07:52:25 +0000 (07:52 +0000)]
Use saner variable names. NFC.

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

9 years ago[OPENMP] Fix for http://llvm.org/PR25221: Infinite loop while parsing OpenMP directive
Alexey Bataev [Mon, 19 Oct 2015 06:40:17 +0000 (06:40 +0000)]
[OPENMP] Fix for http://llvm.org/PR25221: Infinite loop while parsing OpenMP directive
Clang skipped annot_pragma_openmp token, while it should be considered as a stop token while skipping tokens.

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

9 years agoMake getTargetBuiltins return an ArrayRef instead of having two out parameters of...
Craig Topper [Mon, 19 Oct 2015 04:51:35 +0000 (04:51 +0000)]
Make getTargetBuiltins return an ArrayRef instead of having two out parameters of a pointer and length. NFC

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

9 years agoRecommit "Return an ArrayRef instead of having two out parameters of a pointer and...
Craig Topper [Mon, 19 Oct 2015 03:52:27 +0000 (03:52 +0000)]
Recommit "Return an ArrayRef instead of having two out parameters of a pointer and length. NFC". Hopefully this time the bots will be happy.

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

9 years agoRevert r250676 "Return an ArrayRef instead of having two out parameters of a pointer...
Craig Topper [Mon, 19 Oct 2015 03:17:00 +0000 (03:17 +0000)]
Revert r250676 "Return an ArrayRef instead of having two out parameters of a pointer and length. NFC"

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

9 years agoReturn an ArrayRef instead of having two out parameters of a pointer and length. NFC
Craig Topper [Mon, 19 Oct 2015 03:05:12 +0000 (03:05 +0000)]
Return an ArrayRef instead of having two out parameters of a pointer and length. NFC

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

9 years agoclang-format: Extend main header include sorting heuristic to Objective-C files.
Nico Weber [Mon, 19 Oct 2015 01:36:09 +0000 (01:36 +0000)]
clang-format: Extend main header include sorting heuristic to Objective-C files.

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

9 years agodocs: remote stale refs
Saleem Abdulrasool [Mon, 19 Oct 2015 01:24:08 +0000 (01:24 +0000)]
docs: remote stale refs

Since the attribute documentation is now auto-generated, the previous references
are no longer valid.  This prevented the docs build from completing
successfully.

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

9 years agoUpdate `clang-format -help` output in clang-format docs.
Nico Weber [Mon, 19 Oct 2015 01:08:30 +0000 (01:08 +0000)]
Update `clang-format -help` output in clang-format docs.

-assume-filename, -fallback-style, and -sort-includes are new.  (They're also
longer than the previous options, so all descriptions shift over by some amount,
making this diff look larger than it is.)

It looks like someone renamed "General options" to "Generic Options" too.

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

9 years agoUpdate list of languages advertised in OVERVIEW: A tool to format C/C++/Java/JavaScri...
Nico Weber [Mon, 19 Oct 2015 01:03:19 +0000 (01:03 +0000)]
Update list of languages advertised in OVERVIEW: A tool to format C/C++/Java/JavaScript/Objective-C/Protobuf code.

If no arguments are specified, it formats the code from standard input
and writes the result to the standard output.
If <file>s are given, it reformats the files. If -i is specified
together with <file>s, the files are edited in-place. Otherwise, the
result is written to the standard output.

USAGE: clang-format [options] [<file> ...]

OPTIONS:
  -assume-filename=<string> - When reading from stdin, clang-format assumes this
                              filename to look for a style config file (with
                              -style=file) and to determine the language.
  -cursor=<uint>            - The position of the cursor when invoking
                              clang-format from an editor integration
  -dump-config              - Dump configuration options to stdout and exit.
                              Can be used with -style option.
  -fallback-style=<string>  - The name of the predefined style used as a
                              fallback in case clang-format is invoked with
                              -style=file, but can not find the .clang-format
                              file to use.
                              Use -fallback-style=none to skip formatting.
  -help                     - Display available options (-help-hidden for more)
  -i                        - Inplace edit <file>s, if specified.
  -length=<uint>            - Format a range of this length (in bytes).
                              Multiple ranges can be formatted by specifying
                              several -offset and -length pairs.
                              When only a single -offset is specified without
                              -length, clang-format will format up to the end
                              of the file.
                              Can only be used with one input file.
  -lines=<string>           - <start line>:<end line> - format a range of
                              lines (both 1-based).
                              Multiple ranges can be formatted by specifying
                              several -lines arguments.
                              Can't be used with -offset and -length.
                              Can only be used with one input file.
  -offset=<uint>            - Format a range starting at this byte offset.
                              Multiple ranges can be formatted by specifying
                              several -offset and -length pairs.
                              Can only be used with one input file.
  -output-replacements-xml  - Output replacements as XML.
  -sort-includes            - Sort touched include lines
  -style=<string>           - Coding style, currently supports:
                                LLVM, Google, Chromium, Mozilla, WebKit.
                              Use -style=file to load style configuration from
                              .clang-format file located in one of the parent
                              directories of the source file (or current
                              directory for stdin).
                              Use -style="{key: value, ...}" to set specific
                              parameters, e.g.:
                                -style="{BasedOnStyle: llvm, IndentWidth: 8}"
  -version                  - Display the version of this program output.

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

9 years agoNo functionality change, just fix whitespace, a typo and remove an unnecessary
Nick Lewycky [Sun, 18 Oct 2015 20:32:12 +0000 (20:32 +0000)]
No functionality change, just fix whitespace, a typo and remove an unnecessary
emacs mode marker. (Changes left behind from another patch that ended up not
working out.)

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

9 years agoCodeGen: simplify TargetOptions setup
Saleem Abdulrasool [Sun, 18 Oct 2015 20:24:53 +0000 (20:24 +0000)]
CodeGen: simplify TargetOptions setup

Do direct assignment of boolean values and regroup.  Use StringSwitch instead of
custom cases.  NFC.

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

9 years agoSupport linking against OpenMP runtime on FreeBSD.
Dimitry Andric [Sun, 18 Oct 2015 13:32:20 +0000 (13:32 +0000)]
Support linking against OpenMP runtime on FreeBSD.

Summary:
Similar to rL248426 (which was a followup to rL248379 and rL248424), add the
required libraries for OpenMP on the linker command line, and update the test
case.

Reviewers: emaste, theraven, joerg

Subscribers: cfe-commits

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

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

9 years agoclang-format: [JS] Handle string literals spanning character classes.
Daniel Jasper [Sun, 18 Oct 2015 07:02:28 +0000 (07:02 +0000)]
clang-format: [JS] Handle string literals spanning character classes.

If a RegExp contains a character group with a quote (/["]/), the
trailing end of it is first tokenized as a string literal, which leads
to the merging code seeing an unbalanced bracket.

This change parses regex literals from the left hand side. That
simplifies the parsing code and also allows correctly handling escapes
and character classes, hopefully correctly parsing all regex literals.

Patch by Martin Probst, thank you.
Review: http://reviews.llvm.org/D13765

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

9 years agoMake a bunch of static arrays const.
Craig Topper [Sun, 18 Oct 2015 05:29:26 +0000 (05:29 +0000)]
Make a bunch of static arrays const.

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

9 years agoAdd an unnecessary makeArrayRef I add earlier. I didn't realize range-based for loops...
Craig Topper [Sun, 18 Oct 2015 05:29:23 +0000 (05:29 +0000)]
Add an unnecessary makeArrayRef I add earlier. I didn't realize range-based for loops worked with arrays.

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

9 years agoUse std::is_sorted instead of a manual loop.
Craig Topper [Sun, 18 Oct 2015 05:29:21 +0000 (05:29 +0000)]
Use std::is_sorted instead of a manual loop.

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

9 years agoclang/test/Driver/ps4-linker-non-win.c: Tweak for cygwin like ps4-linker-win.c@250403...
NAKAMURA Takumi [Sat, 17 Oct 2015 23:54:54 +0000 (23:54 +0000)]
clang/test/Driver/ps4-linker-non-win.c: Tweak for cygwin like ps4-linker-win.c@250403. Cygwin seeks dependent libs along $PATH.

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

9 years agoclang/test/Driver/ps4-linker-non-win.c: Make %T/ps4-ld executable, or the driver...
NAKAMURA Takumi [Sat, 17 Oct 2015 23:47:02 +0000 (23:47 +0000)]
clang/test/Driver/ps4-linker-non-win.c: Make %T/ps4-ld executable, or the driver wouldn't find it.

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

9 years agoclang/test/Driver/ps4-linker-non-win.c: Make sure that %T/ps4-ld would be used but...
NAKAMURA Takumi [Sat, 17 Oct 2015 23:15:16 +0000 (23:15 +0000)]
clang/test/Driver/ps4-linker-non-win.c: Make sure that %T/ps4-ld would be used but *fails*.

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

9 years agoclang-format: Add test for (properly escaped) XML output.
Daniel Jasper [Sat, 17 Oct 2015 22:44:19 +0000 (22:44 +0000)]
clang-format: Add test for (properly escaped) XML output.

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

9 years agoReplace a static compare function with a lambda. NFC
Craig Topper [Sat, 17 Oct 2015 20:18:46 +0000 (20:18 +0000)]
Replace a static compare function with a lambda. NFC

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

9 years agoUse a range-based for loop. Use std::end instead of pointer+array_lengthof. NFC
Craig Topper [Sat, 17 Oct 2015 17:10:43 +0000 (17:10 +0000)]
Use a range-based for loop. Use std::end instead of pointer+array_lengthof. NFC

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

9 years ago[Frontend] Name variable correctly.
Davide Italiano [Sat, 17 Oct 2015 06:46:39 +0000 (06:46 +0000)]
[Frontend] Name variable correctly.

Reported by: Kim Grasman!

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

9 years agoAdd an AST node matcher for TemplateTypeParmDecl objects.
Eric Fiselier [Sat, 17 Oct 2015 02:34:44 +0000 (02:34 +0000)]
Add an AST node matcher for TemplateTypeParmDecl objects.

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

9 years agoDiagnose UnresolvedLookupExprs that resolve to instance members in static methods
Reid Kleckner [Sat, 17 Oct 2015 00:19:04 +0000 (00:19 +0000)]
Diagnose UnresolvedLookupExprs that resolve to instance members in static methods

During the initial template parse for this code, 'member' is unresolved
and we don't know anything about it:

  struct A { int member };
  template <typename T>
  struct B : public T {
    using T::member;
    static void f() {
      (void)member; // Could be static or non-static.
    }
  };
  template class B<A>;

The pattern declaration contains an UnresolvedLookupExpr rather than an
UnresolvedMemberExpr because `f` is static, and `member` should never be
a field. However, if the code is invalid, it may become a field, in
which case we should diagnose it.

Reviewers: rjmccall, rsmith

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

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

9 years ago[modules] Allow the error when explicitly loading an incompatible module file
Richard Smith [Fri, 16 Oct 2015 23:20:19 +0000 (23:20 +0000)]
[modules] Allow the error when explicitly loading an incompatible module file
via -fmodule-file= to be turned off; in that case, just include the relevant
files textually. This allows module files to be unconditionally passed to all
compile actions via CXXFLAGS, and to be ignored for rules that specify custom
incompatible flags.

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

9 years ago[Frontend/CompilerInvocation] Use range-based loop. NFC.
Davide Italiano [Fri, 16 Oct 2015 22:13:53 +0000 (22:13 +0000)]
[Frontend/CompilerInvocation] Use range-based loop. NFC.

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

9 years agoRefactor module lookup when looking up a header file, and wire through the requesting...
Richard Smith [Fri, 16 Oct 2015 21:42:56 +0000 (21:42 +0000)]
Refactor module lookup when looking up a header file, and wire through the requesting module. No functionality change.

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

9 years agoOnce again fix this test to read from stdin rather than an input file
Richard Barton [Fri, 16 Oct 2015 20:15:33 +0000 (20:15 +0000)]
Once again fix this test to read from stdin rather than an input file

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

9 years agoFurther increase helfulness of assert message
Richard Barton [Fri, 16 Oct 2015 20:15:29 +0000 (20:15 +0000)]
Further increase helfulness of assert message

If you increase the number of diags of a particular type by one more than the
number available you get the nice assert message. If you do it by two more
than available you get the old non-helpful message. Combining the two makes
sense I think.

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

9 years agoTeach MyriadToolchain how to find its C++ header paths.
James Y Knight [Fri, 16 Oct 2015 18:46:26 +0000 (18:46 +0000)]
Teach MyriadToolchain how to find its C++ header paths.

Also move the addLibStdCXXIncludePaths helper function from Linux to
Generic_GCC.

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

9 years ago[PS4] Add missing tests for -fsanitize=...
Filipe Cabecinhas [Fri, 16 Oct 2015 15:08:01 +0000 (15:08 +0000)]
[PS4] Add missing tests for -fsanitize=...

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

9 years agoPS4: Add tests for rtti/vptr-sanitizer interaction
Filipe Cabecinhas [Fri, 16 Oct 2015 15:07:56 +0000 (15:07 +0000)]
PS4: Add tests for rtti/vptr-sanitizer interaction

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

9 years agoPS4: Make sure to add the sanitizer runtime before any linker input
Filipe Cabecinhas [Fri, 16 Oct 2015 15:07:48 +0000 (15:07 +0000)]
PS4: Make sure to add the sanitizer runtime before any linker input

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

9 years ago[CMake] Reformat CLANG_TEST_DEPS.
NAKAMURA Takumi [Fri, 16 Oct 2015 09:38:42 +0000 (09:38 +0000)]
[CMake] Reformat CLANG_TEST_DEPS.

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

9 years agoTest commit
Sean Eveson [Fri, 16 Oct 2015 08:54:23 +0000 (08:54 +0000)]
Test commit

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

9 years ago[X86] Add fxsr feature name for fxsave/fxrestore builtins.
Craig Topper [Fri, 16 Oct 2015 06:22:36 +0000 (06:22 +0000)]
[X86] Add fxsr feature name for fxsave/fxrestore builtins.

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

9 years ago[X86] Add sse4.2 feature name to CRC32 builtins.
Craig Topper [Fri, 16 Oct 2015 05:25:15 +0000 (05:25 +0000)]
[X86] Add sse4.2 feature name to CRC32 builtins.

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

9 years ago[X86] Add proper feature name to some avx512dq builtins.
Craig Topper [Fri, 16 Oct 2015 05:25:04 +0000 (05:25 +0000)]
[X86] Add proper feature name to some avx512dq builtins.

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

9 years agoMake __builtin_object_size more conservative
George Burgess IV [Fri, 16 Oct 2015 01:49:01 +0000 (01:49 +0000)]
Make __builtin_object_size more conservative

r246877 made __builtin_object_size substantially more aggressive with
unknown bases if Type=1 or Type=3, which causes issues when we encounter
code like this:

struct Foo {
  int a;
  char str[1];
};

const char str[] = "Hello, World!";
struct Foo *f = (struct Foo *)malloc(sizeof(*f) + strlen(str));
strcpy(&f->str, str);

__builtin_object_size(&f->str, 1) would hand back 1, which is
technically correct given the type of Foo, but the type of Foo lies to
us about how many bytes are available in this case.

This patch adds support for this "writing off the end" idiom -- we now
answer conservatively when we're given the address of the very last
member in a struct.

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

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

9 years ago[Sema] Fix address-of + enable_if overloading logic
George Burgess IV [Fri, 16 Oct 2015 01:17:38 +0000 (01:17 +0000)]
[Sema] Fix address-of + enable_if overloading logic

Previously, our logic when taking the address of an overloaded function
would not consider enable_if attributes, so long as all of the enable_if
conditions on a given candidate were true. So, two functions with
identical signatures (one with enable_if attributes, the other without),
would be considered equally good overloads. If we were calling the
function instead of taking its address, then the function with enable_if
attributes would be preferred.

This patch makes us prefer the candidate with enable_if regardless of if
we're calling or taking the address of an overloaded function.

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

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

9 years agoAdd "-Wc++11-inline-namespace" so that libc++ can use -pedantic in C++03.
Eric Fiselier [Fri, 16 Oct 2015 00:31:36 +0000 (00:31 +0000)]
Add "-Wc++11-inline-namespace" so that libc++ can use -pedantic in C++03.

Summary: The title says it all.

Reviewers: rsmith

Subscribers: cfe-commits

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

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

9 years agoMark this test as requiring and x86 registered target.
Eric Christopher [Fri, 16 Oct 2015 00:14:36 +0000 (00:14 +0000)]
Mark this test as requiring and x86 registered target.

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

9 years agoAdd an error when calling a builtin that requires features that don't
Eric Christopher [Thu, 15 Oct 2015 23:47:11 +0000 (23:47 +0000)]
Add an error when calling a builtin that requires features that don't
match the feature set of the function that they're being called from.

This ensures that we can effectively diagnose some[1] code that would
instead ICE in the backend with a failure to select message.

Example:

__m128d foo(__m128d a, __m128d b) {
  return __builtin_ia32_addsubps(b, a);
}

compiled for normal x86_64 via:

clang -target x86_64-linux-gnu -c

would fail to compile in the back end because the normal subtarget
features for x86_64 only include sse2 and the builtin requires sse3.

[1] We're still not erroring on:

__m128i bar(__m128i const *p) { return _mm_lddqu_si128(p); }

where we should fail and error on an always_inline function being
inlined into a function that doesn't support the subtarget features
required.

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

9 years agoFix the subtarget features required by some x86 builtins.
Eric Christopher [Thu, 15 Oct 2015 22:46:02 +0000 (22:46 +0000)]
Fix the subtarget features required by some x86 builtins.

Update the fma builtins to be fma/fma4 until some we can find some
documentation either way.

Update a couple of the avx intrinsics because they were in the wrong
category.

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

9 years agoAdd llvm-bcanalyzer to list of clang test dependences
Teresa Johnson [Thu, 15 Oct 2015 21:06:53 +0000 (21:06 +0000)]
Add llvm-bcanalyzer to list of clang test dependences

This addresses a bot failure from r250455, since new Misc/thinlto.c
test uses it.

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

9 years agoRecommit "Clang support for -flto=thin."
Teresa Johnson [Thu, 15 Oct 2015 20:35:53 +0000 (20:35 +0000)]
Recommit "Clang support for -flto=thin."

This recommits r250398 with fixes to the tests for bot failures.

Add "-target x86_64-unknown-linux" to the clang invocations that
check for the gold plugin.

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

9 years agoThe target-feature command line option doesn't take a comma delimited
Eric Christopher [Thu, 15 Oct 2015 20:04:42 +0000 (20:04 +0000)]
The target-feature command line option doesn't take a comma delimited
string, so split them into multiple options.

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

9 years agoAdd the minimum target features that these tests depend upon.
Eric Christopher [Thu, 15 Oct 2015 20:04:40 +0000 (20:04 +0000)]
Add the minimum target features that these tests depend upon.

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

9 years agoclang-format: Basic escaping when outputting XML.
Daniel Jasper [Thu, 15 Oct 2015 18:39:31 +0000 (18:39 +0000)]
clang-format: Basic escaping when outputting XML.

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

9 years agoPut back doxygen comment accidentally dropped in r250418.
Benjamin Kramer [Thu, 15 Oct 2015 16:46:25 +0000 (16:46 +0000)]
Put back doxygen comment accidentally dropped in r250418.

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

9 years agoclang-format/java: Break after annotations on fields in Chromium style.
Nico Weber [Thu, 15 Oct 2015 16:03:01 +0000 (16:03 +0000)]
clang-format/java: Break after annotations on fields in Chromium style.

Chromium follows the Android style guide for Java code, and that doesn't make
the distinction between fields and non-fields that the Google Java style guide
makes:

https://source.android.com/source/code-style.html#use-standard-java-annotations
https://google.github.io/styleguide/javaguide.html#s4.8.5-annotations

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

9 years ago[CodeGen] Remove dead code. NFC.
Benjamin Kramer [Thu, 15 Oct 2015 15:29:40 +0000 (15:29 +0000)]
[CodeGen] Remove dead code. NFC.

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

9 years agoAdd support for CloudABI/aarch64.
Ed Schouten [Thu, 15 Oct 2015 15:07:07 +0000 (15:07 +0000)]
Add support for CloudABI/aarch64.

The core C library has already been ported over to aarch64 successfully,
meaning there is no reason to hold this change back.

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

9 years agoTweak to make clang/test/Driver/ps4-linker-win.c less sinsitive of DLL path.
NAKAMURA Takumi [Thu, 15 Oct 2015 13:51:13 +0000 (13:51 +0000)]
Tweak to make clang/test/Driver/ps4-linker-win.c less sinsitive of DLL path.

  - On mingw-w64, libstdc++-6.dll is used for clang.exe. The DLL might not be in Windows' system directory.
  - With --enable-shared, DLLs might be in ${CMAKE_BINARY_DIR}/bin.

I understand this test confirms that appropriate name of executable can be found on %PATH%.
Therefore I added "Output\\" before each expression.

FIXME: The output directory %T is hardcoded like "Output\\ps4-ld.exe".

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

9 years agoRevert "Clang support for -flto=thin." (bot failures)
Teresa Johnson [Thu, 15 Oct 2015 13:41:51 +0000 (13:41 +0000)]
Revert "Clang support for -flto=thin." (bot failures)

Rolling this back for now since there are a couple of bot failures on
the new tests I added, and I won't have a chance to look at them in detail
until later this afternoon. I think the new tests need some restrictions on
having the gold plugin available.

This reverts commit r250398.

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

9 years agoClang support for -flto=thin.
Teresa Johnson [Thu, 15 Oct 2015 13:08:13 +0000 (13:08 +0000)]
Clang support for -flto=thin.

Summary:
Add clang support for -flto=thin option, which is used to set the
EmitFunctionSummary code gen option on compiles.

Add -flto=full as an alias to the existing -flto.

Add tests to check for proper overriding of -flto variants on the
command line, and convert grep tests to FileCheck.

Reviewers: dexonsmith, joker.eph

Subscribers: davidxl, cfe-commits

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

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

9 years agoHeaders: Switch some headers to LF line endings for consistency.
Peter Collingbourne [Thu, 15 Oct 2015 10:33:27 +0000 (10:33 +0000)]
Headers: Switch some headers to LF line endings for consistency.

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

9 years agoUpdate clang for DIBuilder::createSubroutineType API change.
Eric Christopher [Thu, 15 Oct 2015 06:56:08 +0000 (06:56 +0000)]
Update clang for DIBuilder::createSubroutineType API change.

Patch by Amaury Sechet!

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

9 years ago[X86] Add proper feature names to xsave builtins.
Craig Topper [Thu, 15 Oct 2015 05:23:46 +0000 (05:23 +0000)]
[X86] Add proper feature names to xsave builtins.

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

9 years ago[X86] Add command line switches for xsave/xsaveopt/xsavec/xsaves. Macro defines for...
Craig Topper [Thu, 15 Oct 2015 05:23:38 +0000 (05:23 +0000)]
[X86] Add command line switches for xsave/xsaveopt/xsavec/xsaves. Macro defines for the same. And add the flags to correct CPU names.

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

9 years agoRemove unnecessary braces in single-line 'if'.
Douglas Katzman [Thu, 15 Oct 2015 04:10:40 +0000 (04:10 +0000)]
Remove unnecessary braces in single-line 'if'.

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

9 years ago[X86] Use C+11 non-static data member initialization to initialize all the X86 featur...
Craig Topper [Wed, 14 Oct 2015 23:47:57 +0000 (23:47 +0000)]
[X86] Use C+11 non-static data member initialization to initialize all the X86 feature controls. NFC

This simplifies the constructor initialization list and makes it less likely a feature flag will be forgotten there.

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

9 years agoSample profiles - Update text profile documentation.
Diego Novillo [Wed, 14 Oct 2015 18:37:39 +0000 (18:37 +0000)]
Sample profiles - Update text profile documentation.

There's been some changes to the text encoding for sample profiles. This
updates the documentation and an example.

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

9 years agoIntrin.h: implement __emul and __emulu
Hans Wennborg [Wed, 14 Oct 2015 16:24:28 +0000 (16:24 +0000)]
Intrin.h: implement __emul and __emulu

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

9 years agoTweak a -g related test for the PS4
Filipe Cabecinhas [Wed, 14 Oct 2015 14:45:36 +0000 (14:45 +0000)]
Tweak a -g related test for the PS4

Make sure we're matching what we want:
 - Always have -generate-arange-section (independent of -g)
 - Emit a -dwarf-version=... when -g is there.

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

9 years agoBring back r250262: PS4 toolchain
Filipe Cabecinhas [Wed, 14 Oct 2015 12:25:43 +0000 (12:25 +0000)]
Bring back r250262: PS4 toolchain

There was a minor problem with a test. Sorry for the noise yesterday.

This patch adds missing pieces to clang, including the PS4 toolchain
definition, added warnings, PS4 defaults, and Driver changes needed for
our compiler.

A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova!

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

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

9 years ago[CMake] Add LLVM_VERSION_PATCH to the -current_version flag for libclang.
Chris Bieneman [Wed, 14 Oct 2015 07:50:47 +0000 (07:50 +0000)]
[CMake] Add LLVM_VERSION_PATCH to the -current_version flag for libclang.

This is to match autoconf where LLVM_SUBMIT_SUBVERSION is usually set to ${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}.

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

9 years agoRevert-to-green r250262 (PS4 toolchain patch)
Sean Silva [Wed, 14 Oct 2015 06:45:07 +0000 (06:45 +0000)]
Revert-to-green r250262 (PS4 toolchain patch)

It is breaking llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast
e.g. http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/1362

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

9 years agoCanonicalize some of the x86 builtin tests and either remove or comment
Eric Christopher [Wed, 14 Oct 2015 05:40:21 +0000 (05:40 +0000)]
Canonicalize some of the x86 builtin tests and either remove or comment
about optimization options.

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

9 years agoRemove the optimization option from this test as it is unnecessary
Eric Christopher [Wed, 14 Oct 2015 05:40:11 +0000 (05:40 +0000)]
Remove the optimization option from this test as it is unnecessary
and front end tests should avoid this if possible.

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

9 years ago[MSVC] Fix for http://llvm.org/PR24132: __declspec(property): double invocations...
Alexey Bataev [Wed, 14 Oct 2015 04:05:42 +0000 (04:05 +0000)]
[MSVC] Fix for http://llvm.org/PR24132: __declspec(property): double invocations of foo() when compiling foo()->propertyName
Removes extra codegen for base expression of MS property call
Differential Revision: http://reviews.llvm.org/D13375

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

9 years agoI took care of the build problem in the commit 250252.
Ekaterina Romanova [Wed, 14 Oct 2015 01:09:02 +0000 (01:09 +0000)]
I took care of the build problem in the commit 250252.
Resubmitting the patch.

This patch adds missing pieces to clang, including the PS4 toolchain
definition, added warnings, PS4 defaults, and Driver changes needed for
our compiler.

A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova!

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

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

9 years agoreverting my patch, cause build problems
Ekaterina Romanova [Wed, 14 Oct 2015 00:03:20 +0000 (00:03 +0000)]
reverting my patch, cause build problems

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

9 years agoThis patch adds missing pieces to clang, including the PS4 toolchain
Ekaterina Romanova [Tue, 13 Oct 2015 23:40:02 +0000 (23:40 +0000)]
This patch adds missing pieces to clang, including the PS4 toolchain
definition, added warnings, PS4 defaults, and Driver changes needed for
our compiler.

A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova!

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

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

9 years ago[Sema/objc] When checking for unimplemented methods treat methods from class extensio...
Argyrios Kyrtzidis [Tue, 13 Oct 2015 23:27:34 +0000 (23:27 +0000)]
[Sema/objc] When checking for unimplemented methods treat methods from class extensions as continuation of the class interface.

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

9 years ago[CMake]Getting rid of references to LLVM_SUBMIT_VERSION and LLVM_SUBMIT_SUBVERSION...
Chris Bieneman [Tue, 13 Oct 2015 23:03:54 +0000 (23:03 +0000)]
[CMake]Getting rid of references to LLVM_SUBMIT_VERSION and LLVM_SUBMIT_SUBVERSION in favor of LLVM_VERSION_MAJOR and LLVM_VERSION_MINOR.

LLVM_SUBMIT_VERSION and LLVM_SUBMIT_SUBVERSION are commonly used variable names in the autoconf build system. They seem to have leeched into clang's CMake in a few places, and should just be replaced by the LLVM_VERSION_* variables where appropriate.

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

9 years ago[analyzer] Don’t invalidate CXXThis when conservatively evaluating const methods...
Devin Coughlin [Tue, 13 Oct 2015 22:20:52 +0000 (22:20 +0000)]
[analyzer] Don’t invalidate CXXThis when conservatively evaluating const methods (PR 21606)

Prevent invalidation of `this' when a method is const; fixing PR 21606.

A patch by Sean Eveson!

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

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

9 years agoMove the adc-builtins test to the pattern of the other builtins
Eric Christopher [Tue, 13 Oct 2015 18:40:21 +0000 (18:40 +0000)]
Move the adc-builtins test to the pattern of the other builtins
tests by predefining _MM_MALLOC_H rather than use -ffreestanding.

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

9 years agoAdd subtarget feature support for 3dnowa to the 3dnowa intrinsics.
Eric Christopher [Tue, 13 Oct 2015 18:40:17 +0000 (18:40 +0000)]
Add subtarget feature support for 3dnowa to the 3dnowa intrinsics.

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

9 years ago[CMake] When building clang as an external project we should pass through all variabl...
Chris Bieneman [Tue, 13 Oct 2015 18:17:30 +0000 (18:17 +0000)]
[CMake] When building clang as an external project we should pass through all variables that start with COMPILER_RT

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