Граф коммитов

45098 Коммитов

Автор SHA1 Сообщение Дата
Rafael Espindola ac1db6b2bd Use llvm::sys::fs::getMainExecutable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184915 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 05:03:40 +00:00
Rafael Espindola 48955f8119 Remove PathV1.h from CompilerInstance.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184913 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 04:32:59 +00:00
Rafael Espindola 21b1824304 Don't use PathV1.h in ASTUnit.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184912 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 04:26:38 +00:00
Rafael Espindola 92306906ba Remove forward declarations of sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184911 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 04:23:08 +00:00
Rafael Espindola 1cd7df45ac Remove the last use of PathWithStatus.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184909 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 04:12:57 +00:00
Rafael Espindola 85d28486b7 Use llvm::sys::fs::unique_file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184908 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 04:02:37 +00:00
Rafael Espindola b804cb315c Remove some uses of llvm::sys::Path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184907 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 03:52:38 +00:00
Rafael Espindola da6d1dff38 Remove PathV1.h use from WindowsToolChain.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184906 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 03:39:10 +00:00
Nico Weber 1907c57be5 Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184905 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 02:42:46 +00:00
Richard Smith 4fc5089e30 Lazily deserialize the "first' friend declaration when deserializing a class
declaration. This PCH a little lazier, and breaks a deserialization cycle that
causes crashes with modules enabled.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184904 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 02:41:25 +00:00
Faisal Vali 86648b13eb Fix PCH bug with member templates of local classes in nontemplate functions.
As noted by Richard in the post:
http://lists.cs.uiuc.edu/pipermail/cfe-commits/Week-of-Mon-20130624/082605.html, the following code should not add an entry
into PendingLocalImplicitInstantiations, since local instantiations
should only occur within the context of other instantiations:

int foo(double y) {
   struct Lambda {
      template<class T> T operator()(T t) const { return t; };
   } lambda;
   return lambda(y);
}

Hence the attached code does the following:
  1) In MarkFunctionReferenced, check if ActiveInstantiations.size() 
      is non-zero before adding to PendingLocalImplicitInstantiations.
  2) In InstantiateFunctionDefinition, we swap out/in
      PendingLocalImplicitInstantiations so that only those 
      pending local instantiations that are added during the instantiation
      of the current function are instantiated recursively.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184903 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 02:34:24 +00:00
Rafael Espindola 7b6301f7f5 Remove PathV1.h usage from ToolChains.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184902 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 02:13:00 +00:00
Nico Weber 2726877196 Run clang-format on lib/Format code after r184894. No other changes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184896 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 00:30:14 +00:00
Nico Weber 861576b801 Formatter: Don't put a space after parameter-naming block comments.
Before: f(a, b, /*doFoo=*/ false);
Now: f(a, b, /*doFoo=*/false);

This style is a lot more common:
$ ack -H '=\*\/\w' lib | wc -l 
    1281
$ ack -H '=\*\/ \w' lib | wc -l 
      70



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184894 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 00:15:19 +00:00
Nick Lewycky dccd04d861 Don't check for triviality on fields of templated records. We can't know the
answer until after instantiation. Fixes PR16061!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184890 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 23:22:23 +00:00
David Majnemer f6a144f599 Implement DR136
Friend declarations that specify a default argument must be a definition
and the only declaration in the translation unit.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184889 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 23:09:30 +00:00
Richard Smith 5e37eec0e1 Make this test properly test both things it's trying to test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184887 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 22:37:05 +00:00
Richard Smith ba5da6e777 Missing test update from r184884.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184885 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 22:22:42 +00:00
Richard Smith c7e863f888 PR8302: Check for shadowing a template parameter when declaring a template
template parameter.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184884 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 22:21:36 +00:00
Matt Beaumont-Gay 147fab970c Don't try to get the layout of an invalid decl in getDeclAlign.
When the decl that we're getting alignment for is a FieldDecl, and the field's
parent record is invalid, skip the actual field alignment calculation (and
return 1-byte alignment in the general case).

Also, assert in in getASTRecordLayout that the decl is valid. This was
inspired by PR16292; see also r184581 and r184751.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184883 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 22:19:15 +00:00
David Majnemer 87b12b2e92 Implement DR21
A default template-argument shall not be specified in a friend template
declaration.

Interestingly, we properly handled default template arguments on friend
class members but not on just friend classes.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184882 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 22:08:55 +00:00
Richard Smith ac83a3cdbf Fix null pointer dereference if we redeclare an unprototyped function. Patch by
WenHan Gu!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184875 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 20:34:17 +00:00
Nico Weber 0e5a8887ff Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184873 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 19:25:12 +00:00
Richard Smith db2fe739e5 More of N3652: don't add an implicit 'const' to 'constexpr' member functions when checking for overloads in C++1y.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184865 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 18:46:26 +00:00
Fariborz Jahanian 548fba9625 Objective-C: Warn when IBOutletCollection property
is declared to have 'assign' attribute.
// rdar://14212998


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184863 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 17:34:50 +00:00
Eli Bendersky a7732c7499 Remove misplaced comment
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184862 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 17:07:56 +00:00
Nick Lewycky fe7ed9ec30 In tooling, reenable freeing of datastructures in codegen, just as we do for
the frontend. We don't want to respect the -disable-free flag here.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184861 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 17:01:21 +00:00
Rafael Espindola 40e6b30884 Use simpler version of llvm::sys::fs::exists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184857 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 15:14:22 +00:00
Rafael Espindola f8edb990b8 Don't use PathV1.h in Tools.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184856 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 15:03:59 +00:00
Rafael Espindola 829e88d5cc Use the simpler version of llvm::sys::fs::exists.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184855 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 14:48:00 +00:00
Rafael Espindola 8db7ec0779 Use the new llvm::sys::EnvPathSeparator.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184851 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 14:29:51 +00:00
Chandler Carruth c6fa1153f8 Fix a couple of PPC predefined macros that I spotted while driving by
this code. These aren't technically standard predefines for the platform
but apparantly lots of folks use them as they show up within LLVM's own
codebase. ;] This may even fix some self host issues w/ the JIT!!!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184830 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 11:13:47 +00:00
Rafael Espindola 4ea53ae85c Add r184803 back now that the bug in unique_file has been fixed.
Original message:

Use the new PathV2 instead of implementing the logic in clang.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184825 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 04:26:55 +00:00
Rafael Espindola 510312a69f Revert "Use the new PathV2 instead of implementing the logic in clang."
This reverts commit 184803 while I debug the failures on the bots.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184818 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 02:35:32 +00:00
Chandler Carruth 871a692d49 Revert r184787: "Added arm_neon intrinsic tests."
This test doesn't actually pass when run with llvm-lit for me or in
a bot that actually always tries to run it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184817 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 02:18:39 +00:00
Jordan Rose be35df19cf [analyzer] Handle zeroing CXXConstructExprs.
Re-apply r184511, reverted in r184561, with the trivial default constructor
fast path removed -- it turned out not to be necessary here.

Certain expressions can cause a constructor invocation to zero-initialize
its object even if the constructor itself does no initialization. The
analyzer now handles that before evaluating the call to the constructor,
using the same "default binding" mechanism that calloc() uses, rather
than simply ignoring the zero-initialization flag.

<rdar://problem/14212563>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184815 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 01:56:08 +00:00
Jordan Rose 1fc9111d85 [analyzer] Don't initialize virtual base classes more than once.
In order to make sure virtual base classes are always initialized once,
the AST contains initializers for the base class in /all/ of its
descendents, not just the immediate descendents. However, at runtime,
the most-derived object is responsible for initializing all the virtual
base classes; all the other initializers will be ignored.

The analyzer now checks to see if it's being called from another base
constructor, and if so does not perform virtual base initialization.

<rdar://problem/14236851>

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184814 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 01:55:59 +00:00
Eli Friedman f9b4fea4bf Fix regression from r184810.
Specifically, CallExpr::getCalleeDecl() can return null, so make sure to
handle that correctly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184813 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 01:55:41 +00:00
Nick Lewycky fdf137b907 Make -vectorize-... proper cc1 flags instead of abusing -backend-option. Fixes
usage of clang as a library.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184812 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 01:49:44 +00:00
Richard Smith 9db7f57c1e Fix deserializing of class template partial specializations. Assign sequence
numbers as we deserialize class template partial specializations. We can't
assume that the old sequence numbers will work.

The sequence numbers are still deterministic, but are now a lot less
predictable for class template partial specializations in modules/PCH.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184811 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 01:25:15 +00:00
Eli Friedman 72aa4c431b Fix noexcept for delete expressions.
Using "delete" on a pointer to an incomplete type can't throw.
While I'm here, clean up the signature of the canCalleeThrow() helper.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184810 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 01:24:22 +00:00
Rafael Espindola fa09383ce9 Remove PathV1.h from Driver.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184807 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 01:11:59 +00:00
Nico Weber 465e8615a1 Formatter/ObjC: Correctly format casts in objc message send expressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184804 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 00:55:57 +00:00
Rafael Espindola 4a67613a9a Use the new PathV2 instead of implementing the logic in clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184803 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 00:55:28 +00:00
Eli Friedman 6e98678f63 Delete a couple dead checks.
Use castAs<> where appropriate. Don't check conditionals which are
always true. Delete a bit of dead code. Reindent a bunch of code which
is no longer guarded by an if statement.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184801 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 00:46:32 +00:00
Nico Weber 10fc2c66ca Formatter/Objc: Add a test that checks that @import is formatted correctly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184796 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 00:25:40 +00:00
Eli Friedman 7652222a5c Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184795 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 00:25:19 +00:00
Eric Christopher f66ef1749a Reorder builds based by ordering.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184794 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-25 00:21:29 +00:00
Richard Smith 98f0723ca2 Check for matching template-parameter-lists when merging template declarations.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184791 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-24 22:51:00 +00:00
Rafael Espindola e4664a9d41 Accept both / and \\ to fix the windows bots.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184790 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-24 22:07:15 +00:00