]> granicus.if.org Git - clang/log
clang
10 years ago[Layering] Update include of DebugInfo.h which moved to the IR library
Chandler Carruth [Thu, 6 Mar 2014 00:46:56 +0000 (00:46 +0000)]
[Layering] Update include of DebugInfo.h which moved to the IR library
in LLVM r203046.

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

10 years agoObjective-C properties. Fixes a crash in Sema where RHS of
Fariborz Jahanian [Thu, 6 Mar 2014 00:34:05 +0000 (00:34 +0000)]
Objective-C properties. Fixes a crash in Sema where RHS of
the property assignment is an lvalue for an incomplete type.
// rdar://15118128. Reviewed offline by John McCall.

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

10 years agoSwitch to an idiomatic C++ erase/remove for this loop, and fix a bug in the
Richard Smith [Thu, 6 Mar 2014 00:33:23 +0000 (00:33 +0000)]
Switch to an idiomatic C++ erase/remove for this loop, and fix a bug in the
process (I don't believe it's possible to write a testcase for the bug with
a non-checking STL implementation).

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

10 years ago[Layering] Update include for the move of DIBuilder.h to the IR library
Chandler Carruth [Thu, 6 Mar 2014 00:22:29 +0000 (00:22 +0000)]
[Layering] Update include for the move of DIBuilder.h to the IR library
in LLVM r203038.

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

10 years ago[-Wunreachable-code] Handle idiomatic do...while() with an uninteresting condition.
Ted Kremenek [Thu, 6 Mar 2014 00:17:44 +0000 (00:17 +0000)]
[-Wunreachable-code] Handle idiomatic do...while() with an uninteresting condition.

Sometimes do..while() is used to create a scope that can be left early.
In such cases, the unreachable 'while()' test is not usually interesting
unless it actually does something that is observable.

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

10 years agoclang/test/Modules/recursive.c: Tweak expressions for win32.
NAKAMURA Takumi [Thu, 6 Mar 2014 00:12:04 +0000 (00:12 +0000)]
clang/test/Modules/recursive.c: Tweak expressions for win32.

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

10 years ago[-Wunreachable-code] generalize pruning out warning on trivial returns.
Ted Kremenek [Wed, 5 Mar 2014 23:46:07 +0000 (23:46 +0000)]
[-Wunreachable-code] generalize pruning out warning on trivial returns.

Previously we only pruned dead returns preceded by a call to a
'noreturn' function.  After looking at the results of the LLVM codebase,
there are many others that should be pruned as well.

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

10 years agoObjective-C. Suppress the warning for auto synthesis of property not
Fariborz Jahanian [Wed, 5 Mar 2014 23:44:00 +0000 (23:44 +0000)]
Objective-C. Suppress the warning for auto synthesis of property not
synthesizing protocol properties if class's super class
implements them. // rdar://16089191

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

10 years ago[-Wunreachabe-code] add test for double 'break'.
Ted Kremenek [Wed, 5 Mar 2014 23:38:43 +0000 (23:38 +0000)]
[-Wunreachabe-code] add test for double 'break'.

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

10 years ago[-Wunreachable-code] include some enum constants in "configuration value" heuristic
Ted Kremenek [Wed, 5 Mar 2014 23:38:41 +0000 (23:38 +0000)]
[-Wunreachable-code] include some enum constants in "configuration value" heuristic

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

10 years agoPR19010: Make sure we initialize (empty) indirect base class subobjects when
Richard Smith [Wed, 5 Mar 2014 23:32:50 +0000 (23:32 +0000)]
PR19010: Make sure we initialize (empty) indirect base class subobjects when
evaluating trivial default initialization of a literal class type.

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

10 years agoFix recursion bug in logic to validate 'objc_protocol_requires_explicit_implementatio...
Ted Kremenek [Wed, 5 Mar 2014 23:18:22 +0000 (23:18 +0000)]
Fix recursion bug in logic to validate 'objc_protocol_requires_explicit_implementation' conformance.

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

10 years agoDR status page: add link targets for individual DRs, and link duplicates.
Richard Smith [Wed, 5 Mar 2014 23:02:47 +0000 (23:02 +0000)]
DR status page: add link targets for individual DRs, and link duplicates.

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

10 years agoTests for DR370-380.
Richard Smith [Wed, 5 Mar 2014 22:54:58 +0000 (22:54 +0000)]
Tests for DR370-380.

Also promote a couple of Warnings on ill-formed code found by this testing to
ExtWarns.

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

10 years ago[-Wunreachable-code] generalize configuration value checking to all comparison operators.
Ted Kremenek [Wed, 5 Mar 2014 22:32:39 +0000 (22:32 +0000)]
[-Wunreachable-code] generalize configuration value checking to all comparison operators.

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

10 years agoUpdating this test case to appease build bots which support ANSI escape sequences...
Aaron Ballman [Wed, 5 Mar 2014 21:59:02 +0000 (21:59 +0000)]
Updating this test case to appease build bots which support ANSI escape sequences (unlike my dev box).

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

10 years agoCapabilities are required to pass a name specifying what type of capability is being...
Aaron Ballman [Wed, 5 Mar 2014 21:47:13 +0000 (21:47 +0000)]
Capabilities are required to pass a name specifying what type of capability is being annotated. There are currently only two supported names: mutex and role. Adding functionality to check for the capability name and diagnose when it's unexpected.

Note that for backwards compatibility, an unnamed capability will default to being a "mutex." This allows the deprecated lockable attribute to continue to function.

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

10 years agoAttempt to re-enable the VFS unittests on Windows
Ben Langmuir [Wed, 5 Mar 2014 21:32:20 +0000 (21:32 +0000)]
Attempt to re-enable the VFS unittests on Windows

Using a //net/ path to hopefully avoid problems with non-absolute paths
on Windows.

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

10 years agoDon't produce an alias between destructors with different calling conventions.
Rafael Espindola [Wed, 5 Mar 2014 21:04:41 +0000 (21:04 +0000)]
Don't produce an alias between destructors with different calling conventions.

Fixes pr19007.

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

10 years agoWhen building a module from the command line via -emit-module, add an entry to
Richard Smith [Wed, 5 Mar 2014 20:55:36 +0000 (20:55 +0000)]
When building a module from the command line via -emit-module, add an entry to
the module build stack for the module being built, so we can correctly detect
recursive module builds.

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

10 years agoIf a #include finds a file relative to the current file, don't forget to check
Richard Smith [Wed, 5 Mar 2014 20:51:45 +0000 (20:51 +0000)]
If a #include finds a file relative to the current file, don't forget to check
whether it's part of a module.

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

10 years agoMention clang-cl in MSVCCompatibility.rst
Nico Weber [Wed, 5 Mar 2014 20:18:59 +0000 (20:18 +0000)]
Mention clang-cl in MSVCCompatibility.rst

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

10 years agoUpdate for llvm change.
Rafael Espindola [Wed, 5 Mar 2014 20:08:57 +0000 (20:08 +0000)]
Update for llvm change.

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

10 years ago[code-completion] Add a couple of test cases suggested by Jordan, and a FIXME.
Argyrios Kyrtzidis [Wed, 5 Mar 2014 19:10:31 +0000 (19:10 +0000)]
[code-completion] Add a couple of test cases suggested by Jordan, and a FIXME.

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

10 years agoAST: Remove layering violation with Sema
David Majnemer [Wed, 5 Mar 2014 18:55:38 +0000 (18:55 +0000)]
AST: Remove layering violation with Sema

Scope lives in Sema and cannot be used in AST. Shuffle things around.

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

10 years ago[C++11] Using std::unique_ptr to ensure that Argument objects do not leak (since...
Aaron Ballman [Wed, 5 Mar 2014 16:49:55 +0000 (16:49 +0000)]
[C++11] Using std::unique_ptr to ensure that Argument objects do not leak (since clang-tblgen isn't long-lived, the old leak is probably acceptable, but it offended my senses nonetheless).

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

10 years agoUse ThreadSafeRefCountedBase for vfs::FileSystem
Ben Langmuir [Wed, 5 Mar 2014 15:25:59 +0000 (15:25 +0000)]
Use ThreadSafeRefCountedBase for vfs::FileSystem

Allow trivial read-only filesystems such as RealFileSystem to be shared
between threads.

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

10 years agoStyle fix: replace "1 entries" with "1 entry" in the vftable layout dumping code
Timur Iskhodzhanov [Wed, 5 Mar 2014 13:54:07 +0000 (13:54 +0000)]
Style fix: replace "1 entries" with "1 entry" in the vftable layout dumping code

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

10 years agoRevert "[C++11] Replace trivial lambda with std::cref."
Benjamin Kramer [Wed, 5 Mar 2014 13:25:00 +0000 (13:25 +0000)]
Revert "[C++11] Replace trivial lambda with std::cref."

MSVC2013's standard library is too broken to understand this pattern.

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

10 years ago[C++11] Replace trivial lambda with std::cref.
Benjamin Kramer [Wed, 5 Mar 2014 11:38:18 +0000 (11:38 +0000)]
[C++11] Replace trivial lambda with std::cref.

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

10 years agoAdded a const qualifier to SourceManager& parameters.
Alexander Kornienko [Wed, 5 Mar 2014 10:38:27 +0000 (10:38 +0000)]
Added a const qualifier to SourceManager& parameters.

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

10 years agoMS ABI: Mangle lambdas
David Majnemer [Wed, 5 Mar 2014 10:35:06 +0000 (10:35 +0000)]
MS ABI: Mangle lambdas

Use a scheme inspired by the Itanium ABI to properly implement the
mangling of lambdas.

N.B.  The incredibly astute observer will notice that we do not generate
external names that are identical, or even compatible with, MSVC.
This is fine because they don't generate names that they can use across
translation units.  Technically, we can generate any name we'd like so
long as that name wouldn't conflict with any other and would be stable
across translation units.

This fixes PR15512.

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

10 years agoDisable BasicTests/VFS on win32 for now. Investigating.
NAKAMURA Takumi [Wed, 5 Mar 2014 09:10:04 +0000 (09:10 +0000)]
Disable BasicTests/VFS on win32 for now. Investigating.

  Failing Tests (5):
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.CaseInsensitive
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.MappedFiles
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.MultiComponentPath
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.TrailingSlashes
    Clang-Unit :: Basic/BasicTests.exe/VFSFromYAMLTest.UseExternalName

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

10 years ago[-cxx-abi microsoft] Implement local manglings accurately
David Majnemer [Wed, 5 Mar 2014 08:57:59 +0000 (08:57 +0000)]
[-cxx-abi microsoft] Implement local manglings accurately

Summary:
The MSVC ABI appears to mangle the lexical scope into the names of
statics.  Specifically, a counter is incremented whenever a scope is
entered where things can be declared in such a way that an ambiguity can
arise.  For example, a class scope inside of a class scope doesn't do
anything interesting because the nested class cannot collide with
another nested class.

There are problems with this scheme:
- It is unreliable. The counter is only incremented when a previously
  never encountered scope is entered.  There are cases where this will
  cause ambiguity amongst declarations that have the same name where one
  was introduced in a deep scope while the other was introduced right
  after in the previous lexical scope.
- It is wasteful.  Statements like: {{{{{{{ static int foo = a; }}}}}}}
  will make the mangling of "foo" larger than it need be because the
  scope counter has been incremented many times.

Because of these problems, and practical implementation concerns.  We
choose not to implement this scheme if the local static or local type
isn't visible.  The mangling of these declarations will look very
similar but the numbering will make far more sense, this scheme is
lifted from the Itanium ABI implementation.

Reviewers: rsmith, doug.gregor, rnk, eli.friedman, cdavis5x

Reviewed By: rnk

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

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

10 years agoAdjust logic for 'objc_protocol_requires_explicit_implementation' for inherited proto...
Ted Kremenek [Wed, 5 Mar 2014 08:13:08 +0000 (08:13 +0000)]
Adjust logic for 'objc_protocol_requires_explicit_implementation' for inherited protocols and protocols already conformed in the class hierarchy.

Per more discussion, 'objc_protocol_requires_explicit_implementation' is
refinement that it mainly adds that requirement that a protocol must be
explicitly satisfied at the moment the first class in the class hierarchy
conforms to it.  Any subclasses that also conform to that protocol,
either directly or via conforming to a protocol that inherits that protocol,
do not need to re-implement that protocol.

Doing this requires first doing a pass on the super class hierarchy,
gathering the set of protocols conformed to by the super classes,
and then culling those out when determining conformance.  This
two-pass algorithm could be generalized for all protocol checking,
and could possibly be a performance win in some cases.  For now
we restrict this change to protocols with this attribute to isolate
the change in logic (especially as the design continues to evolve).

This change needs to be adjusted for properties as well; this
only impacts methods right now.

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

10 years ago[OPENMP] allow clause 'private' on directive 'omp simd'
Alexey Bataev [Wed, 5 Mar 2014 07:21:14 +0000 (07:21 +0000)]
[OPENMP] allow clause 'private' on directive 'omp simd'

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

10 years ago[OPENMP] emit error message for clause 'if(1 0)'
Alexey Bataev [Wed, 5 Mar 2014 06:53:13 +0000 (06:53 +0000)]
[OPENMP] emit error message for clause 'if(1 0)'

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

10 years ago[AST] A "Class<P>" type should not have '*' when printed out.
Argyrios Kyrtzidis [Wed, 5 Mar 2014 06:47:57 +0000 (06:47 +0000)]
[AST] A "Class<P>" type should not have '*' when printed out.

rdar://14309030

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

10 years ago[OPNEMP] Fixed instantiation of 'if' clause
Alexey Bataev [Wed, 5 Mar 2014 06:45:14 +0000 (06:45 +0000)]
[OPNEMP] Fixed instantiation of 'if' clause

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

10 years agoSpeculatively fix MSVC buildbots
David Majnemer [Wed, 5 Mar 2014 06:32:38 +0000 (06:32 +0000)]
Speculatively fix MSVC buildbots

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

10 years agoMerge using-decl-pr17575.cpp into existing test case.
Peter Collingbourne [Wed, 5 Mar 2014 02:12:55 +0000 (02:12 +0000)]
Merge using-decl-pr17575.cpp into existing test case.

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

10 years agoAdd a test case for PR17575.
Peter Collingbourne [Wed, 5 Mar 2014 01:49:35 +0000 (01:49 +0000)]
Add a test case for PR17575.

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

10 years ago[-Wunreachable-code] Don't warn about dead code guarded by a "configuration value".
Ted Kremenek [Wed, 5 Mar 2014 00:01:17 +0000 (00:01 +0000)]
[-Wunreachable-code] Don't warn about dead code guarded by a "configuration value".

Some unreachable code is only "sometimes unreachable" because it
is guarded by a configuration value that is determined at compile
time and is always constant.  Sometimes those represent real bugs,
but often they do not.  This patch causes the reachability analysis
to cover such branches even if they are technically unreachable
in the CFG itself.  There are some conservative heuristics at
play here to determine a "configuration value"; these are intended
to be refined over time.

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

10 years agoHeaders: Provide an ABI compatible max_align_t when _MSC_VER is defined
David Majnemer [Tue, 4 Mar 2014 23:43:48 +0000 (23:43 +0000)]
Headers: Provide an ABI compatible max_align_t when _MSC_VER is defined

Summary:
Our usual definition of max_align_t wouldn't match up with MSVC if it
was used in a template argument.

Reviewers: chandlerc, rsmith, rnk

Reviewed By: chandlerc

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

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

10 years agoRemove some unnecessary qualification
David Blaikie [Tue, 4 Mar 2014 23:39:18 +0000 (23:39 +0000)]
Remove some unnecessary qualification

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

10 years agoObjective-C. Return 0 as class of methods in protocols.
Fariborz Jahanian [Tue, 4 Mar 2014 22:57:32 +0000 (22:57 +0000)]
Objective-C. Return 0 as class of methods in protocols.
This simplifies my last patch a bit. No change in
functionality.

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

10 years agoSupport relative paths in VFSFromYAML
Ben Langmuir [Tue, 4 Mar 2014 22:34:50 +0000 (22:34 +0000)]
Support relative paths in VFSFromYAML

Use llvm::sys::fs::make_absolute to get an absolute path before
matching. Also, allow "." directories to enable testing.  ".." is still
not supported, and will require crossing file system boundaries to
implement correctly.

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

10 years agoTokenKinds: _Atomic isn't a keyword in MS mode
David Majnemer [Tue, 4 Mar 2014 22:07:09 +0000 (22:07 +0000)]
TokenKinds: _Atomic isn't a keyword in MS mode

Summary:
This is needed to allow MSVC's <atomic> header to properly parse.
It uses _Atomic as a class-id.

Reviewers: rnk

Reviewed By: rnk

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

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

10 years agoDebugInfo: Refix r202888 (a fix to r202769) in a different way, ensuring types aren...
David Blaikie [Tue, 4 Mar 2014 22:01:08 +0000 (22:01 +0000)]
DebugInfo: Refix r202888 (a fix to r202769) in a different way, ensuring types aren't needlessly built during -gmlt

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

10 years ago[CFG] Tweak "?:" CFG construction to record the unreachable blocks.
Ted Kremenek [Tue, 4 Mar 2014 21:53:26 +0000 (21:53 +0000)]
[CFG] Tweak "?:" CFG construction to record the unreachable blocks.

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

10 years ago[C++11] Simplify a callback to use a lambda.
Richard Smith [Tue, 4 Mar 2014 21:50:01 +0000 (21:50 +0000)]
[C++11] Simplify a callback to use a lambda.

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

10 years agoRevert "FileEntry: Remove unused and half-broken copy ctor."
Benjamin Kramer [Tue, 4 Mar 2014 21:49:45 +0000 (21:49 +0000)]
Revert "FileEntry: Remove unused and half-broken copy ctor."

Looks like libstdc++ 4.7 still needs it.

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

10 years ago[C++11] Push move semantics through APValue.
Benjamin Kramer [Tue, 4 Mar 2014 21:47:57 +0000 (21:47 +0000)]
[C++11] Push move semantics through APValue.

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

10 years agoFileEntry: Remove unused and half-broken copy ctor.
Benjamin Kramer [Tue, 4 Mar 2014 21:47:50 +0000 (21:47 +0000)]
FileEntry: Remove unused and half-broken copy ctor.

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

10 years ago[-Wunreachable-code] handle cases where a dead 'return' may have a valid predecessor.
Ted Kremenek [Tue, 4 Mar 2014 21:41:38 +0000 (21:41 +0000)]
[-Wunreachable-code] handle cases where a dead 'return' may have a valid predecessor.

Fies PR19040.

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

10 years agoAdd a test case for r202888, which boiled down to -gline-tables-only
Reid Kleckner [Tue, 4 Mar 2014 21:33:26 +0000 (21:33 +0000)]
Add a test case for r202888, which boiled down to -gline-tables-only

clang-cl defaults to -gline-tables-only, because that's the only
CodeView debug info that LLVM knows how to emit.

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

10 years agoAdd tests for newly-resolved core issues <= 370.
Richard Smith [Tue, 4 Mar 2014 21:14:30 +0000 (21:14 +0000)]
Add tests for newly-resolved core issues <= 370.

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

10 years agoFix unconditional dereference of a WeakVH in CGDebugInfo TypeCache
Reid Kleckner [Tue, 4 Mar 2014 20:51:58 +0000 (20:51 +0000)]
Fix unconditional dereference of a WeakVH in CGDebugInfo TypeCache

This fails an "isa<> used with null pointer" assert during a clang-cl
self-host on Windows.  This was caused by r202769, and I'm currently
reducing a test case.

Reviewers: dblaikie

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

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

10 years agoUpdate DR status page to match post-Issaquah core issues list.
Richard Smith [Tue, 4 Mar 2014 20:44:20 +0000 (20:44 +0000)]
Update DR status page to match post-Issaquah core issues list.

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

10 years agoAdd links to TSen from post-Issaquah mailing.
Richard Smith [Tue, 4 Mar 2014 20:22:54 +0000 (20:22 +0000)]
Add links to TSen from post-Issaquah mailing.

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

10 years agoPass llvm::Triple objects by const reference.
Benjamin Kramer [Tue, 4 Mar 2014 19:31:42 +0000 (19:31 +0000)]
Pass llvm::Triple objects by const reference.

Copying isn't cheap as it contains a std::string.

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

10 years ago[Mips] Check all MIPS toolchains to find the one that best meets command
Simon Atanasyan [Tue, 4 Mar 2014 18:37:28 +0000 (18:37 +0000)]
[Mips] Check all MIPS toolchains to find the one that best meets command
line arguments and directories tree. The old toolchain selection heuristics
worked incorrectly when user has a reduced MIPS toolchain supports
the O32 ABI only.

Patch reviewed by Jonathan Roelofs, David Majnemer.

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

10 years agoObjective-C IRGen. Fix up the hueristics for determining
Fariborz Jahanian [Tue, 4 Mar 2014 18:34:52 +0000 (18:34 +0000)]
Objective-C IRGen. Fix up the hueristics for determining
if an ivar offset load is invariant iff inside an instance method
and ivar belongs to instance method's class and one of its super class.
// rdar://16095748

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

10 years agoThe wmmintrin.h header includes two different sub-headers: one for AES support
Roman Divacky [Tue, 4 Mar 2014 18:26:12 +0000 (18:26 +0000)]
The wmmintrin.h header includes two different sub-headers: one for AES support
and one for PCLMUL support.  The current immintrin.h header only includes
wmmintrin.h if AES support is enabled.  It should include it if either AES or
PCLMUL is enabled (GCC's version of immintrin.h does this).

Patch by John Baldwin!

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

10 years agoFirst step towards fixing PR18967 - simplify the ComputeThisOffset interface
Timur Iskhodzhanov [Tue, 4 Mar 2014 18:17:38 +0000 (18:17 +0000)]
First step towards fixing PR18967 - simplify the ComputeThisOffset interface

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

10 years agoWhen deciding whether or not to resolve two
Sean Callanan [Tue, 4 Mar 2014 18:11:50 +0000 (18:11 +0000)]
When deciding whether or not to resolve two
anonymous structs to the same Decl in the
ASTImporter, ensure that both are filled in
from their external sources (if present).
Otherwise two different structs may be
identified erroneously.

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

10 years agoTests for LLVM MS inline asm change r202865
Reid Kleckner [Tue, 4 Mar 2014 17:57:56 +0000 (17:57 +0000)]
Tests for LLVM MS inline asm change r202865

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

10 years agoFix -Wsign-compare warning.
Jordan Rose [Tue, 4 Mar 2014 17:45:43 +0000 (17:45 +0000)]
Fix -Wsign-compare warning.

No functionality change.

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

10 years ago[C++11] Make StoredDeclsList move-only.
Benjamin Kramer [Tue, 4 Mar 2014 16:42:46 +0000 (16:42 +0000)]
[C++11] Make StoredDeclsList move-only.

It is only moved when a StoredDeclsMap grows.

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

10 years ago[Modules] Update to reflect the move of CFG.h to the IR library in LLVM
Chandler Carruth [Tue, 4 Mar 2014 11:46:22 +0000 (11:46 +0000)]
[Modules] Update to reflect the move of CFG.h to the IR library in LLVM
r202827.

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

10 years ago[Modules] Update to reflect ValueHandle moving to the IR library in LLVM
Chandler Carruth [Tue, 4 Mar 2014 11:18:19 +0000 (11:18 +0000)]
[Modules] Update to reflect ValueHandle moving to the IR library in LLVM
r202821.

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

10 years ago[Modules] Update to reflect the move of CallSite into the IR library in
Chandler Carruth [Tue, 4 Mar 2014 11:02:08 +0000 (11:02 +0000)]
[Modules] Update to reflect the move of CallSite into the IR library in
LLVM r202816.

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

10 years ago[cleanup] Re-sort includes with llvm/utils/sort_includes.py and fix
Chandler Carruth [Tue, 4 Mar 2014 10:05:20 +0000 (10:05 +0000)]
[cleanup] Re-sort includes with llvm/utils/sort_includes.py and fix
a missing include from CLog.h.

CLog.h referenced most of the core libclang types but never directly
included Index.h that provides them. Previously it got lucky and other
headers were always included first but with the sorting it ended up
first in one case and stopped compiling. Adding the Index.h include
fixes it right up.

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

10 years agoWe now require Visual C++ 2012 (MSVC_VERSION = 1700) or later to build LLVM.
Yaron Keren [Tue, 4 Mar 2014 09:12:17 +0000 (09:12 +0000)]
We now require Visual C++ 2012 (MSVC_VERSION = 1700) or later to build LLVM.

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

10 years agoGive %itanium_abi_triple to the test to appease targeting msvc.
NAKAMURA Takumi [Tue, 4 Mar 2014 09:04:20 +0000 (09:04 +0000)]
Give %itanium_abi_triple to the test to appease targeting msvc.

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

10 years ago[CMake] Add the newly introduced compiler header.
Argyrios Kyrtzidis [Tue, 4 Mar 2014 06:28:23 +0000 (06:28 +0000)]
[CMake] Add the newly introduced compiler header.

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

10 years agoMS ABI: Reorganize some tests
David Majnemer [Tue, 4 Mar 2014 05:47:41 +0000 (05:47 +0000)]
MS ABI: Reorganize some tests

Move some c++11 specific tests to mangle-ms-cxx11

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

10 years agoMS ABI: Mangle variable templates properly
David Majnemer [Tue, 4 Mar 2014 05:38:05 +0000 (05:38 +0000)]
MS ABI: Mangle variable templates properly

We wouldn't recognize variable templates as being templates leading us
to leave the template arguments off of the mangled name.  This would
allow two unrelated templates to map to the same mangled name.

N.B.  While MSVC doesn't support variable templates as of this date,
this mangling is the most likely thing they will choose to use.  Their
demangler can successfully demangle our manglings with the template
arguments shown.

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

10 years agoFix for r202778 - Implement __readeflags and __writeeflags intrinsics (renamed res...
Alexey Bataev [Tue, 4 Mar 2014 03:42:58 +0000 (03:42 +0000)]
Fix for r202778 - Implement __readeflags and __writeeflags intrinsics (renamed res to __res)

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

10 years agoDebugInfo: Make test (introduced in r202769) resilient to platforms that default...
David Blaikie [Tue, 4 Mar 2014 03:08:16 +0000 (03:08 +0000)]
DebugInfo: Make test (introduced in r202769) resilient to platforms that default to -fstandalone-debug

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

10 years agoDebugInfo: Improvements/corrections to conservative emission of types in explicit...
David Blaikie [Tue, 4 Mar 2014 03:08:14 +0000 (03:08 +0000)]
DebugInfo: Improvements/corrections to conservative emission of types in explicit template instantiation declarations

* detect out of line definitions correctly
* detect member function explicit specializations correctly

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

10 years agoImplement __readeflags and __writeeflags intrinsics
Alexey Bataev [Tue, 4 Mar 2014 03:03:03 +0000 (03:03 +0000)]
Implement __readeflags and __writeeflags intrinsics

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

10 years agoAdd triple to test. On Mac OS it was failing to generate debug info which matched...
Pete Cooper [Tue, 4 Mar 2014 02:56:59 +0000 (02:56 +0000)]
Add triple to test.  On Mac OS it was failing to generate debug info which matched the check lines

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

10 years agoFix typo that resulted in names at TU scope getting lost sometimes after a
Richard Smith [Tue, 4 Mar 2014 00:21:14 +0000 (00:21 +0000)]
Fix typo that resulted in names at TU scope getting lost sometimes after a
module import.

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

10 years agoDebugInfo: Emit only the declaration of a class template that has an explicit instant...
David Blaikie [Mon, 3 Mar 2014 23:48:23 +0000 (23:48 +0000)]
DebugInfo: Emit only the declaration of a class template that has an explicit instantiation declaration (& always emit such a type when there's an explicit instantiation definition)

We should only have this optimization fire when the explicit
instantiation definition would cause at  least one member function to be
emitted, thus ensuring that even a compiler not performing this
optimization would still emit the full type information elsewhere.

But we should also pessimize output still by always emitting the
definition when the explicit instantiation definition appears so that at
some point in the future we can depend on that information even when no
code had to be emitted in that TU. (this shouldn't happen very often,
since people mostly use explicit spec decl/defs to reduce code size -
but perhaps one day they could use it to explicitly reduce debug info
size too)

This was worth about 2% for Clang and LLVM - so not a huge win, but a
win. It looks really great for simple STL programs (include <string> and
just declare a string - 14k -> 1.4k of .dwo)

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

10 years agoInclude <tuple> to speculatively try to fix VS2013 build after r202755
Hans Wennborg [Mon, 3 Mar 2014 22:25:31 +0000 (22:25 +0000)]
Include <tuple> to speculatively try to fix VS2013 build after r202755

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

10 years agoObjective-C. Fixes a regression when figuring out linkage
Fariborz Jahanian [Mon, 3 Mar 2014 21:53:57 +0000 (21:53 +0000)]
Objective-C. Fixes a regression when figuring out linkage
for metadata symbols for forward referenced protocols which
are never defined.  // rdar://16203115

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

10 years agoImprove diagnostics for malformed constructor declarations (where lookup for
Richard Smith [Mon, 3 Mar 2014 21:12:53 +0000 (21:12 +0000)]
Improve diagnostics for malformed constructor declarations (where lookup for
the type of the first parameter fails, and it is the only, unnamed, parameter).

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

10 years ago[C++11] Add missing include.
Benjamin Kramer [Mon, 3 Mar 2014 20:39:28 +0000 (20:39 +0000)]
[C++11] Add missing include.

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

10 years ago[C++11] Simplify compare operators with std::tie.
Benjamin Kramer [Mon, 3 Mar 2014 20:26:46 +0000 (20:26 +0000)]
[C++11] Simplify compare operators with std::tie.

No functionality change.

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

10 years agoSchedule discriminator pass.
Diego Novillo [Mon, 3 Mar 2014 20:06:18 +0000 (20:06 +0000)]
Schedule discriminator pass.

This needs to modify a line table test to account for the new lexical
block created to hold the new discriminator value.

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

10 years agoRe-fix previous commit.
Jordan Rose [Mon, 3 Mar 2014 19:46:28 +0000 (19:46 +0000)]
Re-fix previous commit.

Always run the test again, even for a trivial change...

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

10 years agoRemove absolute path from r202733.
Jordan Rose [Mon, 3 Mar 2014 19:45:34 +0000 (19:45 +0000)]
Remove absolute path from r202733.

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

10 years ago[libclang] Have clang_getCursorSpelling() return the string for a CXCursor_ObjCString...
Argyrios Kyrtzidis [Mon, 3 Mar 2014 19:40:52 +0000 (19:40 +0000)]
[libclang] Have clang_getCursorSpelling() return the string for a CXCursor_ObjCStringLiteral or CXCursor_StringLiteral cursor.

rdar://16206459

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

10 years ago[C++11] Remove a now unnecessary use of std::function for a remove_if
Chandler Carruth [Mon, 3 Mar 2014 19:36:27 +0000 (19:36 +0000)]
[C++11] Remove a now unnecessary use of std::function for a remove_if
predicate. The wrapper used by SetVector was erroneously requiring an
adaptable predicate. It has been fixed and we really don't want to
require an indirect call for every predicate evaluation.

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

10 years agoUpdate call DIBuilder::createLexicalBlock.
Diego Novillo [Mon, 3 Mar 2014 18:53:32 +0000 (18:53 +0000)]
Update call DIBuilder::createLexicalBlock.

Create lexical blocks with discriminator value 0 by default.

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

10 years agoI guess we're still using LLVM_DELETED_FUNCTION instead of = delete. This should...
Aaron Ballman [Mon, 3 Mar 2014 18:41:48 +0000 (18:41 +0000)]
I guess we're still using LLVM_DELETED_FUNCTION instead of = delete. This should fix a complaining built bot.

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

10 years agoSerialized diagnostic severity levels should be stable.
Jordan Rose [Mon, 3 Mar 2014 18:29:52 +0000 (18:29 +0000)]
Serialized diagnostic severity levels should be stable.

Serialized diagnostics were accidentally using the AST diagnostic level values
rather than a dedicated stable enum, so the addition of "remark" broke the
reading of existing serialized diagnostics files. I've added a .dia file
generated from Xcode 5's Clang to make sure we don't break this in the future.

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

10 years agoFix MSVCCompatibility doc ReST and wording.
Reid Kleckner [Mon, 3 Mar 2014 18:22:25 +0000 (18:22 +0000)]
Fix MSVCCompatibility doc ReST and wording.

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

10 years agoRemoving some unused functionality.
Aaron Ballman [Mon, 3 Mar 2014 16:21:37 +0000 (16:21 +0000)]
Removing some unused functionality.

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