]> granicus.if.org Git - clang/log
clang
11 years agoDelete dead code.
Eli Friedman [Thu, 27 Jun 2013 20:48:08 +0000 (20:48 +0000)]
Delete dead code.

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

11 years agoUnder -fms-extensions, only inject a friend tag name when we didn't see a tag with...
Douglas Gregor [Thu, 27 Jun 2013 20:42:30 +0000 (20:42 +0000)]
Under -fms-extensions, only inject a friend tag name when we didn't see a tag with that name in an enclosing scope.

r177473 made us correctly consider only those declarations in the
enclosing namespace scope when looking for a friend declaration. Under
ms-extensions mode, where we do some level of friend injection, this
meant that we were introducing a new tag type into a different scope
than what Microsoft actually does. Address this by only doing the
friend injection when we didn't see any tag with that name in any
outer scope. Fixes <rdar://problem/14250378>.

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

11 years agoSimplify StmtIterator.
Eli Friedman [Thu, 27 Jun 2013 20:39:04 +0000 (20:39 +0000)]
Simplify StmtIterator.

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

11 years agoSmall improvements to createOutputFile.
Rafael Espindola [Thu, 27 Jun 2013 18:26:26 +0000 (18:26 +0000)]
Small improvements to createOutputFile.

* Use a single stat to find out if the file exists and if it is a regular file.
* Use early returns when possible.
* Add comments explaining why we have each check.

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

11 years agoAdd support for passing v8fp options via -mfpu.
Joey Gouly [Thu, 27 Jun 2013 13:19:54 +0000 (13:19 +0000)]
Add support for passing v8fp options via -mfpu.

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

11 years agoA bit of program simplification from r185056
Larisse Voufo [Thu, 27 Jun 2013 03:36:30 +0000 (03:36 +0000)]
A bit of program simplification from r185056

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

11 years agoFix a conversion to incomplete type bug -- The error message now specifically states...
Larisse Voufo [Thu, 27 Jun 2013 01:50:25 +0000 (01:50 +0000)]
Fix a conversion to incomplete type bug -- The error message now specifically states that the type is incomplete and points to the forward declaration of the incomplete type.

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

11 years agoDelete dead code.
Eli Friedman [Thu, 27 Jun 2013 01:36:36 +0000 (01:36 +0000)]
Delete dead code.

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

11 years agoSimplify code.
Eli Friedman [Wed, 26 Jun 2013 23:47:39 +0000 (23:47 +0000)]
Simplify code.

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

11 years agoHandle all TemplateArguments in trivial TypeLocs.
Eli Friedman [Wed, 26 Jun 2013 23:30:50 +0000 (23:30 +0000)]
Handle all TemplateArguments in trivial TypeLocs.

Armed with a much better understanding of what
TemplateSpecializationTypeLoc::initializeArgLocs actually does, I now
understand that it's fine to just use an empty TemplateArgumentLocInfo
for Integral, Declaration, and NullPtr TemplateArguments.

Fixes PR14281. (The testcases are actually derived from libcxx_test in
deduction-crash.cpp because the original testcase was impossible to reduce.)

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

11 years agoPR16467: Teach -Wunsequenced that in C11 (unlike C++11), an assignment's
Richard Smith [Wed, 26 Jun 2013 23:16:51 +0000 (23:16 +0000)]
PR16467: Teach -Wunsequenced that in C11 (unlike C++11), an assignment's
side-effect is not sequenced before its value computation. Also fix a
mishandling of ?: expressions where the condition is constant that was
exposed by the tests for this.

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

11 years agoSema: Small cleanup around TemplateParamListContext
David Majnemer [Wed, 26 Jun 2013 22:25:55 +0000 (22:25 +0000)]
Sema: Small cleanup around TemplateParamListContext

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

11 years agoObjectiveC: diagnose duplicate declaration of
Fariborz Jahanian [Wed, 26 Jun 2013 22:10:27 +0000 (22:10 +0000)]
ObjectiveC: diagnose duplicate declaration of
private ivars in class extensions and class
@implementation. // rdar://14278560

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

11 years agoDon't use unnamed local enums as template arguments.
Joerg Sonnenberger [Wed, 26 Jun 2013 21:31:47 +0000 (21:31 +0000)]
Don't use unnamed local enums as template arguments.
Fixes -Werror bootstrap.

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

11 years agoThis patch fixes PR16395, when HandleMSProperty returns null due to a declaration...
Aaron Ballman [Wed, 26 Jun 2013 21:28:44 +0000 (21:28 +0000)]
This patch fixes PR16395, when HandleMSProperty returns null due to a declaration with no name.

Patch thanks to Robert Wilhelm.

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

11 years agoAST: small cleanup to FriendObjectKind
David Majnemer [Wed, 26 Jun 2013 21:28:41 +0000 (21:28 +0000)]
AST: small cleanup to FriendObjectKind

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

11 years agoSync file handling logic in RewriterTestContext.h and RefactoringTest.cpp.
Rafael Espindola [Wed, 26 Jun 2013 21:02:22 +0000 (21:02 +0000)]
Sync file handling logic in RewriterTestContext.h and RefactoringTest.cpp.

They are mostly duplicated and got out of sync during the PathV1 removal. We
should factor the code somewhere, but for now a FIXME will do.

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

11 years agoRewrite record layout for ms_struct structs.
Eli Friedman [Wed, 26 Jun 2013 20:50:34 +0000 (20:50 +0000)]
Rewrite record layout for ms_struct structs.

The old implementation of ms_struct in RecordLayoutBuilder was a
complete mess: it depended on complicated conditionals which didn't
really reflect the underlying logic, and placed a burden on users of
the resulting RecordLayout. This commit rips out almost all of the
old code, and replaces it with simple checks in
RecordLayoutBuilder::LayoutBitField.

This commit also fixes <rdar://problem/14252115>, a bug where class
inheritance would cause us to lay out bitfields incorrectly.

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

11 years agoUpdating the same comment in a different file, again for links. No functional change...
Aaron Ballman [Wed, 26 Jun 2013 19:33:02 +0000 (19:33 +0000)]
Updating the same comment in a different file, again for links.  No functional change intended.

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

11 years agoUpdating a link in the comments; no functional change.
Aaron Ballman [Wed, 26 Jun 2013 19:17:19 +0000 (19:17 +0000)]
Updating a link in the comments; no functional change.

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

11 years agoFix warning: commas at the end of enumerator lists are a C++11 extension [-Wc++11...
Nico Weber [Wed, 26 Jun 2013 17:31:55 +0000 (17:31 +0000)]
Fix warning: commas at the end of enumerator lists are a C++11 extension [-Wc++11-extensions]

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

11 years agoAdd support for passing '-target armv8' through the Driver.
Joey Gouly [Wed, 26 Jun 2013 17:19:48 +0000 (17:19 +0000)]
Add support for passing '-target armv8' through the Driver.

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

11 years agoMatch MSVC's handling of commas during macro argument expansion
Reid Kleckner [Wed, 26 Jun 2013 17:16:08 +0000 (17:16 +0000)]
Match MSVC's handling of commas during macro argument expansion

This allows clang to parse the type_traits header in Visual Studio 2012,
which is included widely in practice.

This is a rework of r163022 by João Matos.  The original patch broke
preprocessing of gtest headers, which this patch addresses.

Patch by Will Wilson!

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

11 years agoclang/test/Driver/pth.c: Fix r184942, a regexp like "\\\\" is redundant here. Should...
NAKAMURA Takumi [Wed, 26 Jun 2013 15:03:20 +0000 (15:03 +0000)]
clang/test/Driver/pth.c: Fix r184942, a regexp like "\\\\" is redundant here. Should be matched to single \ with '\\'.

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

11 years agoRemove last use of PathV1.h from clang.
Rafael Espindola [Wed, 26 Jun 2013 15:01:50 +0000 (15:01 +0000)]
Remove last use of PathV1.h from clang.

Instead of creating a temporary directory, remember the set of temporary files
we create.

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

11 years agoWe only create one file, no need to delete a directory.
Rafael Espindola [Wed, 26 Jun 2013 14:33:23 +0000 (14:33 +0000)]
We only create one file, no need to delete a directory.

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

11 years agoRemove unused header.
Rafael Espindola [Wed, 26 Jun 2013 13:49:47 +0000 (13:49 +0000)]
Remove unused header.

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

11 years agoTry to fix this test on the msys buildbot.
Rafael Espindola [Wed, 26 Jun 2013 13:02:16 +0000 (13:02 +0000)]
Try to fix this test on the msys buildbot.

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

11 years agoQuieting an MSVC warning about converting negative integer constants to unsigned...
Aaron Ballman [Wed, 26 Jun 2013 12:54:49 +0000 (12:54 +0000)]
Quieting an MSVC warning about converting negative integer constants to unsigned types.

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

11 years agoDon't use PathV1.h in CIndexCodeCompletion.cpp.
Rafael Espindola [Wed, 26 Jun 2013 12:54:23 +0000 (12:54 +0000)]
Don't use PathV1.h in CIndexCodeCompletion.cpp.

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

11 years agoRemove dead include.
Rafael Espindola [Wed, 26 Jun 2013 12:49:58 +0000 (12:49 +0000)]
Remove dead include.

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

11 years agoDon't use PathV1.h in cc1as_main.cpp.
Rafael Espindola [Wed, 26 Jun 2013 12:48:34 +0000 (12:48 +0000)]
Don't use PathV1.h in cc1as_main.cpp.

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

11 years agoRemove unused header.
Rafael Espindola [Wed, 26 Jun 2013 12:46:06 +0000 (12:46 +0000)]
Remove unused header.

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

11 years agoRemove unused include.
Rafael Espindola [Wed, 26 Jun 2013 12:44:19 +0000 (12:44 +0000)]
Remove unused include.

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

11 years agoclang/test/lit.cfg: Tweak getClangBuiltinIncludeDir() not to expose dosish path separ...
NAKAMURA Takumi [Wed, 26 Jun 2013 10:45:20 +0000 (10:45 +0000)]
clang/test/lit.cfg: Tweak getClangBuiltinIncludeDir() not to expose dosish path separator on MSYS bash.exe, since r184774.

    $ bin/clang.exe -print-file-name=include
    e:/path/to/build/bin\..\lib\clang\3.4\include

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

11 years agoRemove unused include.
Rafael Espindola [Wed, 26 Jun 2013 06:15:57 +0000 (06:15 +0000)]
Remove unused include.

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

11 years agoRemove more uses of llvm::sys::Path.
Rafael Espindola [Wed, 26 Jun 2013 06:13:06 +0000 (06:13 +0000)]
Remove more uses of llvm::sys::Path.

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

11 years agoRemove PathV1.h from CompilerInvocation.cpp.
Rafael Espindola [Wed, 26 Jun 2013 05:40:30 +0000 (05:40 +0000)]
Remove PathV1.h from CompilerInvocation.cpp.

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

11 years agoUse llvm::sys::fs::getMainExecutable.
Rafael Espindola [Wed, 26 Jun 2013 05:03:40 +0000 (05:03 +0000)]
Use llvm::sys::fs::getMainExecutable.

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

11 years agoRemove PathV1.h from CompilerInstance.cpp.
Rafael Espindola [Wed, 26 Jun 2013 04:32:59 +0000 (04:32 +0000)]
Remove PathV1.h from CompilerInstance.cpp.

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

11 years agoDon't use PathV1.h in ASTUnit.cpp.
Rafael Espindola [Wed, 26 Jun 2013 04:26:38 +0000 (04:26 +0000)]
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

11 years agoRemove forward declarations of sys::Path.
Rafael Espindola [Wed, 26 Jun 2013 04:23:08 +0000 (04:23 +0000)]
Remove forward declarations of sys::Path.

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

11 years agoRemove the last use of PathWithStatus.
Rafael Espindola [Wed, 26 Jun 2013 04:12:57 +0000 (04:12 +0000)]
Remove the last use of PathWithStatus.

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

11 years agoUse llvm::sys::fs::unique_file.
Rafael Espindola [Wed, 26 Jun 2013 04:02:37 +0000 (04:02 +0000)]
Use llvm::sys::fs::unique_file.

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

11 years agoRemove some uses of llvm::sys::Path.
Rafael Espindola [Wed, 26 Jun 2013 03:52:38 +0000 (03:52 +0000)]
Remove some uses of llvm::sys::Path.

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

11 years agoRemove PathV1.h use from WindowsToolChain.cpp.
Rafael Espindola [Wed, 26 Jun 2013 03:39:10 +0000 (03:39 +0000)]
Remove PathV1.h use from WindowsToolChain.cpp.

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

11 years agoFix a comment.
Nico Weber [Wed, 26 Jun 2013 02:42:46 +0000 (02:42 +0000)]
Fix a comment.

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

11 years agoLazily deserialize the "first' friend declaration when deserializing a class
Richard Smith [Wed, 26 Jun 2013 02:41:25 +0000 (02:41 +0000)]
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

11 years agoFix PCH bug with member templates of local classes in nontemplate functions.
Faisal Vali [Wed, 26 Jun 2013 02:34:24 +0000 (02:34 +0000)]
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

11 years agoRemove PathV1.h usage from ToolChains.cpp.
Rafael Espindola [Wed, 26 Jun 2013 02:13:00 +0000 (02:13 +0000)]
Remove PathV1.h usage from ToolChains.cpp.

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

11 years agoRun clang-format on lib/Format code after r184894. No other changes.
Nico Weber [Wed, 26 Jun 2013 00:30:14 +0000 (00:30 +0000)]
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

11 years agoFormatter: Don't put a space after parameter-naming block comments.
Nico Weber [Wed, 26 Jun 2013 00:15:19 +0000 (00:15 +0000)]
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

11 years agoDon't check for triviality on fields of templated records. We can't know the
Nick Lewycky [Tue, 25 Jun 2013 23:22:23 +0000 (23:22 +0000)]
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

11 years agoImplement DR136
David Majnemer [Tue, 25 Jun 2013 23:09:30 +0000 (23:09 +0000)]
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

11 years agoMake this test properly test both things it's trying to test.
Richard Smith [Tue, 25 Jun 2013 22:37:05 +0000 (22:37 +0000)]
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

11 years agoMissing test update from r184884.
Richard Smith [Tue, 25 Jun 2013 22:22:42 +0000 (22:22 +0000)]
Missing test update from r184884.

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

11 years agoPR8302: Check for shadowing a template parameter when declaring a template
Richard Smith [Tue, 25 Jun 2013 22:21:36 +0000 (22:21 +0000)]
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

11 years agoDon't try to get the layout of an invalid decl in getDeclAlign.
Matt Beaumont-Gay [Tue, 25 Jun 2013 22:19:15 +0000 (22:19 +0000)]
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

11 years agoImplement DR21
David Majnemer [Tue, 25 Jun 2013 22:08:55 +0000 (22:08 +0000)]
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

11 years agoFix null pointer dereference if we redeclare an unprototyped function. Patch by
Richard Smith [Tue, 25 Jun 2013 20:34:17 +0000 (20:34 +0000)]
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

11 years agoFix a comment.
Nico Weber [Tue, 25 Jun 2013 19:25:12 +0000 (19:25 +0000)]
Fix a comment.

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

11 years agoMore of N3652: don't add an implicit 'const' to 'constexpr' member functions when...
Richard Smith [Tue, 25 Jun 2013 18:46:26 +0000 (18:46 +0000)]
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

11 years agoObjective-C: Warn when IBOutletCollection property
Fariborz Jahanian [Tue, 25 Jun 2013 17:34:50 +0000 (17:34 +0000)]
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

11 years agoRemove misplaced comment
Eli Bendersky [Tue, 25 Jun 2013 17:07:56 +0000 (17:07 +0000)]
Remove misplaced comment

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

11 years agoIn tooling, reenable freeing of datastructures in codegen, just as we do for
Nick Lewycky [Tue, 25 Jun 2013 17:01:21 +0000 (17:01 +0000)]
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

11 years agoUse simpler version of llvm::sys::fs::exists.
Rafael Espindola [Tue, 25 Jun 2013 15:14:22 +0000 (15:14 +0000)]
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

11 years agoDon't use PathV1.h in Tools.cpp.
Rafael Espindola [Tue, 25 Jun 2013 15:03:59 +0000 (15:03 +0000)]
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

11 years agoUse the simpler version of llvm::sys::fs::exists.
Rafael Espindola [Tue, 25 Jun 2013 14:48:00 +0000 (14:48 +0000)]
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

11 years agoUse the new llvm::sys::EnvPathSeparator.
Rafael Espindola [Tue, 25 Jun 2013 14:29:51 +0000 (14:29 +0000)]
Use the new llvm::sys::EnvPathSeparator.

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

11 years agoFix a couple of PPC predefined macros that I spotted while driving by
Chandler Carruth [Tue, 25 Jun 2013 11:13:47 +0000 (11:13 +0000)]
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

11 years agoAdd r184803 back now that the bug in unique_file has been fixed.
Rafael Espindola [Tue, 25 Jun 2013 04:26:55 +0000 (04:26 +0000)]
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

11 years agoRevert "Use the new PathV2 instead of implementing the logic in clang."
Rafael Espindola [Tue, 25 Jun 2013 02:35:32 +0000 (02:35 +0000)]
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

11 years agoRevert r184787: "Added arm_neon intrinsic tests."
Chandler Carruth [Tue, 25 Jun 2013 02:18:39 +0000 (02:18 +0000)]
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

11 years ago[analyzer] Handle zeroing CXXConstructExprs.
Jordan Rose [Tue, 25 Jun 2013 01:56:08 +0000 (01:56 +0000)]
[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

11 years ago[analyzer] Don't initialize virtual base classes more than once.
Jordan Rose [Tue, 25 Jun 2013 01:55:59 +0000 (01:55 +0000)]
[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

11 years agoFix regression from r184810.
Eli Friedman [Tue, 25 Jun 2013 01:55:41 +0000 (01:55 +0000)]
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

11 years agoMake -vectorize-... proper cc1 flags instead of abusing -backend-option. Fixes
Nick Lewycky [Tue, 25 Jun 2013 01:49:44 +0000 (01:49 +0000)]
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

11 years agoFix deserializing of class template partial specializations. Assign sequence
Richard Smith [Tue, 25 Jun 2013 01:25:15 +0000 (01:25 +0000)]
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

11 years agoFix noexcept for delete expressions.
Eli Friedman [Tue, 25 Jun 2013 01:24:22 +0000 (01:24 +0000)]
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

11 years agoRemove PathV1.h from Driver.cpp.
Rafael Espindola [Tue, 25 Jun 2013 01:11:59 +0000 (01:11 +0000)]
Remove PathV1.h from Driver.cpp.

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

11 years agoFormatter/ObjC: Correctly format casts in objc message send expressions.
Nico Weber [Tue, 25 Jun 2013 00:55:57 +0000 (00:55 +0000)]
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

11 years agoUse the new PathV2 instead of implementing the logic in clang.
Rafael Espindola [Tue, 25 Jun 2013 00:55:28 +0000 (00:55 +0000)]
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

11 years agoDelete a couple dead checks.
Eli Friedman [Tue, 25 Jun 2013 00:46:32 +0000 (00:46 +0000)]
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

11 years agoFormatter/Objc: Add a test that checks that @import is formatted correctly.
Nico Weber [Tue, 25 Jun 2013 00:25:40 +0000 (00:25 +0000)]
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

11 years agoDelete dead code.
Eli Friedman [Tue, 25 Jun 2013 00:25:19 +0000 (00:25 +0000)]
Delete dead code.

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

11 years agoReorder builds based by ordering.
Eric Christopher [Tue, 25 Jun 2013 00:21:29 +0000 (00:21 +0000)]
Reorder builds based by ordering.

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

11 years agoCheck for matching template-parameter-lists when merging template declarations.
Richard Smith [Mon, 24 Jun 2013 22:51:00 +0000 (22:51 +0000)]
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

11 years agoAccept both / and \\ to fix the windows bots.
Rafael Espindola [Mon, 24 Jun 2013 22:07:15 +0000 (22:07 +0000)]
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

11 years agoTweak -Wdeprecated-objc-pointer-introspection to have a subgroup for results of using...
Ted Kremenek [Mon, 24 Jun 2013 21:35:39 +0000 (21:35 +0000)]
Tweak -Wdeprecated-objc-pointer-introspection to have a subgroup for results of using -performSelectorXXX.

-performSelector: and friends return a value that is boxed as an Objective-C
pointer.  Sometimes it is an Objective-C pointer, sometimes it isn't.
Some clients may wish to silence this warning based on calling
this method.

Fixes <rdar://problem/14147304>

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

11 years agoAdded arm_neon intrinsic tests.
Michael Gottesman [Mon, 24 Jun 2013 21:25:42 +0000 (21:25 +0000)]
Added arm_neon intrinsic tests.

This is a large test and thus it will only run if you pass in --param
run_long_tests=trueto LIT. This is intended so that this test can run on
buildbots and not when one runs make check.

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

11 years ago[NeonIntrinsicTestEmitter] vld1/vst1 do not require the :64 hint.
Michael Gottesman [Mon, 24 Jun 2013 21:25:39 +0000 (21:25 +0000)]
[NeonIntrinsicTestEmitter] vld1/vst1 do not require the :64 hint.

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

11 years ago[NeonIntrinsicTestEmitter] Fix incorrect FileCheck pattern where we were expecting...
Michael Gottesman [Mon, 24 Jun 2013 21:25:37 +0000 (21:25 +0000)]
[NeonIntrinsicTestEmitter] Fix incorrect FileCheck pattern where we were expecting a ',' prefix to alignment hints.

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

11 years ago[NeonIntrinsicTestEmitter] Add requirement to arm neon intrinsic tests for the featur...
Michael Gottesman [Mon, 24 Jun 2013 21:25:34 +0000 (21:25 +0000)]
[NeonIntrinsicTestEmitter] Add requirement to arm neon intrinsic tests for the feature long_tests.

This will prevent the tests from running on normal make check. You will need to
actually pass in --param run_long_tests=true to LIT in order to run these.

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

11 years ago[libclang/codecompletion] Make sure the top-level decl hash takes into account Import...
Argyrios Kyrtzidis [Mon, 24 Jun 2013 21:19:12 +0000 (21:19 +0000)]
[libclang/codecompletion] Make sure the top-level decl hash takes into account ImportDecls.

The top-level hash is used to determine if we need to update the global code-completion results.
ImportDecls did not affect the hash so a newly introduced ImportDecl would not trigger an update of the global results.

rdar://14202797

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

11 years agoChange mangling of objects inside block literals.
Eli Friedman [Mon, 24 Jun 2013 20:24:19 +0000 (20:24 +0000)]
Change mangling of objects inside block literals.

This changes the mangling of local static variables/etc. inside blocks
to do something simple and sane.  This avoids depending on the way we mangle
blocks, which isn't really appropriate here.

John, please take a look at this to make sure the mangling I chose is sane.

Fixes <rdar://problem/14074423>.

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

11 years agoFix "funciton" typo from r184763
Reid Kleckner [Mon, 24 Jun 2013 20:08:40 +0000 (20:08 +0000)]
Fix "funciton" typo from r184763

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

11 years ago[ms-cxxabi] Use sugared types in the mangler instead of canonical types
Reid Kleckner [Mon, 24 Jun 2013 19:21:52 +0000 (19:21 +0000)]
[ms-cxxabi] Use sugared types in the mangler instead of canonical types

At this point, it's clear that the MSVC mangler uses the type-as-written
instead of the canonical type, so this should bring us closer to MSVC.
The main thrust of this change is to fix the way we mangle decayed array
parameters of function pointer parameters.  With a DecayedType sugar
node, this code can now be much simpler.

Fixes PR16096.

This also fixes a separate issue that Richard spotted in review.
Because separate declarations of the same entity can be spelled and
mangled differently, MSVC always mangles the earliest declaration in an
attempt to avoid link errors.  Clang now does the same.

Reviewers: rsmith

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

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

11 years ago[arcmt/driver] For the -ccc-arcmt-* flags, claim them when -fno-objc-arc is passed...
Argyrios Kyrtzidis [Mon, 24 Jun 2013 19:01:18 +0000 (19:01 +0000)]
[arcmt/driver] For the -ccc-arcmt-* flags, claim them when -fno-objc-arc is passed to avoid the
"argument unused during compilation" warning.

rdar://14240566

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

11 years agoUse getAs<> where appropriate on QualTypes instead of using dyn_cast.
Eli Friedman [Mon, 24 Jun 2013 18:47:11 +0000 (18:47 +0000)]
Use getAs<> where appropriate on QualTypes instead of using dyn_cast.

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

11 years agoConvert some uses of llvm::sys::Path.
Rafael Espindola [Mon, 24 Jun 2013 18:33:43 +0000 (18:33 +0000)]
Convert some uses of llvm::sys::Path.

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