]>
granicus.if.org Git - clang/log
Fariborz Jahanian [Tue, 17 Dec 2013 01:01:33 +0000 (01:01 +0000)]
ObjectiveC migrator. Fixes a bug when protocol
conformance is inferred. // rdar://
15515206
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197448
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Tue, 17 Dec 2013 00:40:40 +0000 (00:40 +0000)]
For -Wconsumed, walk the namespaces to find if the top most namespace is "std"
to determine if a move function is the std::move function. This allows functions
like std::__1::move to also be treated a the move function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197445
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 17 Dec 2013 00:04:48 +0000 (00:04 +0000)]
Reorder these DataLayout entries to match the order LLVM uses.
This completes the cleanup/refactoring of DataLayout on the clang side. Next
is figuring out the differences between the llvm and clang produced strings
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197442
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 17 Dec 2013 00:02:38 +0000 (00:02 +0000)]
clang/lib/Headers/CMakeLists.txt: Revert part of r197395. It should not be staged yet.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197441
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Dec 2013 23:27:41 +0000 (23:27 +0000)]
The preferred alignment defaults to the ABI one. Omit it if it is the same.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197440
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Dec 2013 23:03:23 +0000 (23:03 +0000)]
Remove another default I missed before.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197437
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Mon, 16 Dec 2013 22:54:37 +0000 (22:54 +0000)]
ObjectiveC. Further improvements of use
of objc_bridge_related attribute; eliminate
unnecessary diagnostics which is issued elsewhere,
fixit now produces a valid AST tree per convention.
This results in some simplification in handling of
this attribute as well. // rdar://
15499111
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197436
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Dec 2013 22:50:41 +0000 (22:50 +0000)]
Clang DataLayout string cleanup: don't print other defaults.
I missed these in previous commits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197435
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Dec 2013 22:15:35 +0000 (22:15 +0000)]
Remove dead data.
The f80:128:128 was followed by a f80:32:32 and so never used. Looks like this
was there since r91746.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197433
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Dec 2013 21:59:14 +0000 (21:59 +0000)]
Clang DataLayout string cleanup: don't print the pointer defaults.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197430
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Dec 2013 21:51:30 +0000 (21:51 +0000)]
Clang DataLayout string cleanup: don't print the aggregate defaults.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197429
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Mon, 16 Dec 2013 21:41:30 +0000 (21:41 +0000)]
Fix PR18260 - Make std::move handling in -Wconsumed only trigger on std::move
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197428
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Dec 2013 21:38:22 +0000 (21:38 +0000)]
Clang DataLayout string cleanup: don't print the vector defaults.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197427
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Mon, 16 Dec 2013 20:54:13 +0000 (20:54 +0000)]
In a standalone Clang build, default to building tests, like LLVM does
LLVM_INCLUDE_TESTS is set in the top-level LLVM CMakeLists, which is not being
executed when Clang is built in a separate directory.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197423
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Dec 2013 20:34:33 +0000 (20:34 +0000)]
Clang DataLayout string cleanup: don't print the FP defaults.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197422
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Dec 2013 20:21:07 +0000 (20:21 +0000)]
Clang DataLayout string cleanup: don't print the integer defaults.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197421
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 16 Dec 2013 19:53:26 +0000 (19:53 +0000)]
Misc test cleanups.
* tbaa-struct.cpp always has a 64 bit pointer.
* f32:32:32, f64:64:64 and f128:128:128 are defaults, don't assume they are
printed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197415
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Mon, 16 Dec 2013 19:25:47 +0000 (19:25 +0000)]
Revert "Maybe add new warning for shadowing simple tag types"
This reverts commit
2b43f500cfea10a8c59c986dcfc24fd08eecc77d .
This was accidentally committed because I failed to notice my client
wasn't clean prior to submitting a fix for a crasher.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197410
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Mon, 16 Dec 2013 19:19:18 +0000 (19:19 +0000)]
Make Sema::BuildCXXNestedNameSpecifier correctly clear the previous
CXXScopeSpec when necessary while performing typo correction. This fixes
the crash reported in PR18213 (the problem existed since r185487, and
r193020 made it easier to hit).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197409
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Mon, 16 Dec 2013 19:19:13 +0000 (19:19 +0000)]
Maybe add new warning for shadowing simple tag types
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197408
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 16 Dec 2013 19:16:04 +0000 (19:16 +0000)]
Support EABIHF environment on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197406
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 16 Dec 2013 18:30:28 +0000 (18:30 +0000)]
GNUEABIHF is the same as GNUEABI for anything not float/double related,
so use the same exception size as GNUEABI does.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197404
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 16 Dec 2013 18:29:54 +0000 (18:29 +0000)]
[AArch64] Fix v1fx patterns for Floating-point Multiply Extend and Floating-point Compare to Zero.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197403
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 16 Dec 2013 17:54:57 +0000 (17:54 +0000)]
Add bit_FXSAVE as an alias for bit_FXSR, for gcc compat.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197399
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 16 Dec 2013 16:03:21 +0000 (16:03 +0000)]
[CMake] Introduce CLANG_RUNTIME_OUTPUT_INTDIR and CLANG_LIBRARY_OUTPUT_INTDIR.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197395
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 16 Dec 2013 15:01:54 +0000 (15:01 +0000)]
clang-format: Keep trailing annotations together.
Before:
virtual void aaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaa aaaa,
aaaaaaaaaaa aaaaa) const
override;
virtual void
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa () const
override;
After:
virtual void aaaaa(
aaaaaaaaaaaaaaaaaaaaaaaaaa aaaa,
aaaaaaaaaaa aaaaa) const override;
virtual void
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ()
const override;
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197391
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 16 Dec 2013 14:57:22 +0000 (14:57 +0000)]
Revert "Modules: Make missing headers in a module.map a warning not an error."
This was committed accidentally.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197389
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 16 Dec 2013 14:53:57 +0000 (14:53 +0000)]
Modules: Make missing headers in a module.map a warning not an error.
Instead, mark the module as unavailable so that clang errors as soon as
someone tries to build this module.
A better long-term strategy might be to not stat the header files at all
while reading the module map and instead read them only when the module
is being built (there is a corresponding FIXME in parseHeaderDecl()).
However, it seems non-trivial to get there and this would be a temporary
solution to unblock us.
Also changed the implementation to reuse the same DiagnosticsEngine as
otherwise warnings can't be enabled or disabled with command-line flags.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197388
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Mon, 16 Dec 2013 14:35:51 +0000 (14:35 +0000)]
Always break before the colon in constructor initializers, when
BreakConstructorInitializersBeforeComma is true.
This option is used in WebKit style, so this also ensures initializer lists are
not put on a single line, as per the WebKit coding guidelines.
Patch by Florian Sowade!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197386
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexander Kornienko [Mon, 16 Dec 2013 10:57:30 +0000 (10:57 +0000)]
Added -iregex for case-insensitive regex to filter file names.
Summary:
-regex and -iregex both mimic options of the find utility.
Made the default list of extensions case-insensitive, so that it's not only C
and CPP extensions are accepted in upper case.
Reviewers: djasper
Reviewed By: djasper
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D2415
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197378
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 16 Dec 2013 08:36:18 +0000 (08:36 +0000)]
clang-format: Fix formatting of function type parameters.
Before:
void f() { typedef void (*f)(int * a); }
After:
void f() { typedef void (*f)(int *a); }
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197369
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Mon, 16 Dec 2013 07:23:08 +0000 (07:23 +0000)]
clang-format: Improve handling of raw string literals.
Especially try to keep existing line breaks before raw string literals,
as the code author might have aligned content to it.
Thereby, clang-format now keeps things like:
parseStyle(R"(
BasedOnStyle: Google,
ColumnLimit: 100)");
parseStyle(
R"(BasedOnStyle: Google,
ColumnLimit: 100)");
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197368
91177308 -0d34-0410-b5e6-
96231b3b80d8
Duncan P. N. Exon Smith [Mon, 16 Dec 2013 03:20:06 +0000 (03:20 +0000)]
Stop crashing on empty asm input constraints
An empty string for an ASM input constraint is invalid, and will crash
during clang CodeGen. Change TargetInfo::validateInputConstraint to
reject an empty string.
<rdar://problem/
15552191 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197362
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 15 Dec 2013 17:53:44 +0000 (17:53 +0000)]
Add tests for all DescriptionString in Targets.cpp.
These right now just test that the same string is present in two files, but will
become more useful as clang's handling of DataLayout is refactored.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197347
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 15 Dec 2013 17:21:28 +0000 (17:21 +0000)]
Delete dead code.
This is always overwritten by the one in NaClTargetInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197346
91177308 -0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 15 Dec 2013 14:51:00 +0000 (14:51 +0000)]
Remove unused diagnostic.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197345
91177308 -0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sun, 15 Dec 2013 13:05:48 +0000 (13:05 +0000)]
Allow target-specific attributes to share a spelling between different attributes via the ParseKind field. Attributes will be given a common parsed attribute identifier (the AttributeList::AT_* enum), but retain distinct Attr subclasses.
This new functionality is used to implement the ARM and MSP430 interrupt attribute.
Patch reviewed by Richard Smith over IRC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197343
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sun, 15 Dec 2013 10:36:26 +0000 (10:36 +0000)]
ASTContext: Declare builtin types implicitly
__builtin_va_list and friends have been showing up where they shouldn't for way
to long, making unwanted appearences in -ast-print, tooling and source level
visitors and even the hello world tutorial on the clang website.
This commit factors down the implicit typedef and record creation facilities to
ensure they're marked implicit.
Also fixes a unit test that was testing incorrect behaviour, and removes old
hacks in the DeclPrinter that tried to skip implicit declarations manually.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197336
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sat, 14 Dec 2013 23:32:31 +0000 (23:32 +0000)]
Lexer: Issue -Wbackslash-newline-escape for line comments
The warning for backslash and newline separated by whitespace was missed in
this code path.
backslash<whitespace><newline> is handled differently from compiler to compiler
so it's important to warn consistently where there's ambiguity.
Matches similar handling of block comments and non-comment lines.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197331
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sat, 14 Dec 2013 23:32:27 +0000 (23:32 +0000)]
Fix test containing backslash and newline separated by space
This was silently accepted by clang without warning due to a lexer bug.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197330
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sat, 14 Dec 2013 17:04:17 +0000 (17:04 +0000)]
Add triple to CodeGenCXX/2004-03-08-ReinterpretCastCopy.cpp in MS ABI mode
I don't think we should need a triple, but this allows us to run the test
until we fix it (PR18251).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197326
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 14 Dec 2013 06:03:28 +0000 (06:03 +0000)]
CompilationDatabase.cpp:stripPositionalArgs(): Match not "no-integrated-as" but "-no-integrated-as", it really fixes r197229.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197309
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sat, 14 Dec 2013 04:49:06 +0000 (04:49 +0000)]
Remove 'not' from some CodeGen tests
These were just missing an expected-no-diagnostics directive.
Also add -std=c++11 to a test warning noisly about extensions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197308
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 14 Dec 2013 03:18:05 +0000 (03:18 +0000)]
PR18246: When performing template argument deduction to decide which template
is specialized by an explicit specialization, start from the first declaration
in case we've got a member of a class template (redeclarations might not number
the template parameters the same way).
Our recover here is still far from ideal.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197305
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 14 Dec 2013 02:16:41 +0000 (02:16 +0000)]
[objc] Add a test to make sure that a class can add a secondary initializer via a category
and still inherit the designated initializers of its super class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197301
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Sat, 14 Dec 2013 01:07:05 +0000 (01:07 +0000)]
Revert "Don't require -re suffix on -verify directives with regexes."
This patch was submitted to the list for review and didn't receive a LGTM.
(In fact one explicit objection and one query were raised.)
This reverts commit r197295.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197299
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Sat, 14 Dec 2013 01:04:22 +0000 (01:04 +0000)]
PR18232: implement instantiation for class-scope explicit specializations of
class templates (a Microsoft extension).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197298
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Sat, 14 Dec 2013 00:46:53 +0000 (00:46 +0000)]
Don't require -re suffix on -verify directives with regexes.
Differential Revision: http://llvm-reviews.chandlerc.com/D2392
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197295
91177308 -0d34-0410-b5e6-
96231b3b80d8
Faisal Vali [Sat, 14 Dec 2013 00:40:05 +0000 (00:40 +0000)]
Quick-Fix pointer arithmetic when performing multi-D new-array initialization.
clang still doesn't emit the right llvm code when initializing multi-D arrays it seems.
For e.g. the following code would still crash for me on Windows 7, 64 bit:
auto f4 = new int[100][200][300]{{{1,2,3}, {4, 5, 6}}, {{10, 20, 30}}};
It seems that the final new loop that iterates through each outermost array and memsets it to zero gets confused with its final ptr arithmetic.
This patch ensures that it converts the pointer to the allocated type (int [200][300]) before incrementing it (instead of using the base type: 'int').
Richard somewhat squeamishly approved the patch (as a quick fix to potentially make it into 3.4) - while exhorting for a more optimized fix in the future. http://llvm-reviews.chandlerc.com/D2398
Thanks Richard!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197294
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 13 Dec 2013 22:43:52 +0000 (22:43 +0000)]
Prepare for using MS ABI by default for Win32: update CodeGenCXX tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197281
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 13 Dec 2013 22:28:48 +0000 (22:28 +0000)]
Add a testcase and a FIXME for an accepts-invalid.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197280
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 13 Dec 2013 22:26:20 +0000 (22:26 +0000)]
Detabify and fix formatting.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197279
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Dec 2013 21:49:53 +0000 (21:49 +0000)]
Consolidate DataLayout string testing in one file.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197276
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Fri, 13 Dec 2013 21:19:30 +0000 (21:19 +0000)]
Remove an unused parameter and include after r197273
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197274
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Fri, 13 Dec 2013 20:49:58 +0000 (20:49 +0000)]
Eliminate BinaryTypeTraitExpr
There's nothing special about type traits accepting two arguments.
This commit eliminates BinaryTypeTraitExpr and switches all related handling
over to TypeTraitExpr.
Also fixes a CodeGen failure with variadic type traits appearing in a
non-constant expression.
The BTT/TT prefix and evaluation code is retained as-is for now but will soon
be further cleaned up.
This is part of the ongoing work to unify type traits.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197273
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Dec 2013 20:27:54 +0000 (20:27 +0000)]
Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197270
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Dec 2013 20:11:02 +0000 (20:11 +0000)]
Convert test to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197269
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Dec 2013 19:56:31 +0000 (19:56 +0000)]
Every target sets DescriptionString. Assert that.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197268
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Dec 2013 19:44:40 +0000 (19:44 +0000)]
Convert test to FileCheck
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197267
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 13 Dec 2013 19:06:55 +0000 (19:06 +0000)]
Objective-C. Remove obsolete option from test.
// rdar://
15641300
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197263
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Dec 2013 18:40:15 +0000 (18:40 +0000)]
Use a: and s: instead of a0: and s0: in the DataLayout strings.
They are equivalent and the size of 'a' and 's' is unused.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197256
91177308 -0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Fri, 13 Dec 2013 18:34:23 +0000 (18:34 +0000)]
Tighten test regexes checking for __attribute__((thiscall)) on function types.
The tests were perhaps made too relaxed in r197164 when we switched to the new
MinGW ABI. This makes sure we check explicitly for an optional thiscall
attribute and nothing else.
We should still look into whether we should print these attributes at all in
these cases.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197252
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 13 Dec 2013 18:19:59 +0000 (18:19 +0000)]
Objective-C. Do not issue warning when 'readonly'
property declaration has a memory management
attribute (retain, copy, etc.). Sich properties
are usually overridden to become 'readwrite'
via a class extension (which require the memory
management attribute specified). In the absence of class
extension override, memory management attribute is
needed to produce correct Code Gen. for the
property getter in any case and this warning becomes
confusing to user. // rdar://
15641300
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197251
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Dec 2013 17:47:34 +0000 (17:47 +0000)]
Convert test to FileCheck and make it more strict.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197248
91177308 -0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Fri, 13 Dec 2013 17:16:28 +0000 (17:16 +0000)]
[analyzer] Add -analyzer-config to scan-build.
-analyzer-config options are now passed from scan-build through to
ccc-analyzer and then to clang.
Patch by Daniel Connelly!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197246
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Fri, 13 Dec 2013 17:04:55 +0000 (17:04 +0000)]
Fix raw lex crash and -frewrite-includes noeol-at-eof failure
Raw lexers don't have a preprocessor so we need to null check.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197245
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Fri, 13 Dec 2013 16:15:28 +0000 (16:15 +0000)]
[OpenCL] Produce an error when the work group and vec type hint attributes
are used on non-kernel functions.
Reviewed by Aaron over IRC!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197243
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 13 Dec 2013 16:11:31 +0000 (16:11 +0000)]
Add a clang side test for pr18235 too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197242
91177308 -0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 13 Dec 2013 16:05:12 +0000 (16:05 +0000)]
ARM MachO embedded: fix test without FileCheck line
Well, that's one way to pass a test, I suppose. Unfortunately actually doing
the testing means I didn't pass all I thought (embedded v7a is not supported,
apparently). I'll deal with that with the move to -none-macho rather than
putting heinous hacks in right now.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197240
91177308 -0d34-0410-b5e6-
96231b3b80d8
Artyom Skrobov [Fri, 13 Dec 2013 13:43:48 +0000 (13:43 +0000)]
clang-check to ignore -no-integrated-as because certain drivers can't handle it
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197229
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Fri, 13 Dec 2013 10:08:24 +0000 (10:08 +0000)]
Move the input files for the unnecessary-module-map-parsing test to Inputs.
Needed to change rename.m to set the right include path so we don't
import a broken module due to recursive module checking.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197222
91177308 -0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Fri, 13 Dec 2013 09:27:34 +0000 (09:27 +0000)]
Move comment to its rightful place
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197219
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Dec 2013 06:26:14 +0000 (06:26 +0000)]
Refine 'objc_protocol_requires_explicit_implementation' attribute to better handle indirect protocols.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197209
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Dec 2013 06:26:10 +0000 (06:26 +0000)]
Make 'CheckProtocolMethodDefs' a static function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197208
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Dec 2013 05:58:51 +0000 (05:58 +0000)]
Change 'method X in protocol not implemented' warning to include the name of the protocol.
This removes an extra "note:", which wasn't really all that more useful
and overall reduces the diagnostic spew for this case.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197207
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 13 Dec 2013 05:58:44 +0000 (05:58 +0000)]
Make 'WarnUndefinedMethod' a static function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197206
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 13 Dec 2013 03:48:17 +0000 (03:48 +0000)]
[objc] If we don't know for sure what the designated initializers of the superclass are,
assume that a [super init..] inside a designated initializer also refers to a designated one
and do not warn.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197202
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 13 Dec 2013 01:06:04 +0000 (01:06 +0000)]
[-cxx-abi microsoft] Remove trailing spaces from the mangler
No functional change, just a tidying up.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197196
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 13 Dec 2013 00:54:42 +0000 (00:54 +0000)]
AST: Update URL for Itanium ABI spec
The old URL hasn't worked for quite some time. While we are here, also
change the link so that it will send us straight to the mangling portion
of the ABI doc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197195
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 13 Dec 2013 00:53:54 +0000 (00:53 +0000)]
Move C++ destructor emission into CGCXXABI
No functionality change. Only Itanium C++ destructors have implicit VTT
parameters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197194
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 13 Dec 2013 00:52:45 +0000 (00:52 +0000)]
[-cxx-abi microsoft] Add commentary for mangleStaticGuardVariable
We will need to do some work here if we want to play nice with MSVC2013.
Add a TODO indicating what changed and why this matters.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197193
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 13 Dec 2013 00:39:38 +0000 (00:39 +0000)]
Revert "[-cxx-abi microsoft] Mangle reference temporaries"
This reverts commit r197184.
Richard Smith brings up some good points, a proper implementation will
require us to mangle unnameable entities compatibly with MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197192
91177308 -0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 13 Dec 2013 00:09:59 +0000 (00:09 +0000)]
Remove getVTT* in favor of getStructorImplicitParameter*
No functionality change. The only remaining uses were in ItaniumCXXABI,
which knows the implicit parameter is a VTT.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197189
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 12 Dec 2013 23:40:14 +0000 (23:40 +0000)]
Enhance "auto synthesis will not synthesize property in protocol" to include property and protocol name.
Implements <rdar://problem/
15617839 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197187
91177308 -0d34-0410-b5e6-
96231b3b80d8
Warren Hunt [Thu, 12 Dec 2013 23:23:28 +0000 (23:23 +0000)]
[ms-abi] Fixing bitfields sema arror for ms-mode
The check for bitfields that are longer than their base type needed to
be checked in microsoft mode (cl.exe does not support the C++ extnetion
for bitfields longer than their type).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197186
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 12 Dec 2013 23:14:16 +0000 (23:14 +0000)]
PR18229: Fix typo in assert condition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197185
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Thu, 12 Dec 2013 23:12:01 +0000 (23:12 +0000)]
[-cxx-abi microsoft] Mangle reference temporaries
They are mangled the same as normal references, nothing special is going
on here.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197184
91177308 -0d34-0410-b5e6-
96231b3b80d8
Warren Hunt [Thu, 12 Dec 2013 22:33:37 +0000 (22:33 +0000)]
[ms-abi] Refactoring Non-virtual base layout in record layout
This refactor addresses bugzilla bug 18167 and simplifies the code at
the same time. Also I add a test case for the bug. Also I make a
non-functional change to the basic layout lit tests to make them more
reliable (using CHECK-NEXT instead of CHECK).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197183
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 12 Dec 2013 21:29:27 +0000 (21:29 +0000)]
Replace use of Triple::getEnvironmentName with the simpler
Triple::getEnvironment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197181
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alp Toker [Thu, 12 Dec 2013 21:23:03 +0000 (21:23 +0000)]
Unify type trait parsing
Type trait parsing is all over the place at the moment with unary, binary and
n-ary C++11 type traits that were developed independently at different points
in clang's history.
There's no good reason to handle them separately -- there are three parsers,
three AST nodes and lots of duplicated handling code with slightly different
implementations and diags for each kind.
This commit unifies parsing of type traits and sets the stage for further
consolidation.
No change in behaviour other than more consistent error recovery.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197179
91177308 -0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Thu, 12 Dec 2013 20:30:41 +0000 (20:30 +0000)]
With the new update to the ABI, we should not look for installations
of MinGW older than 4.7 with incompatible C++ libraries.
This patch makes clang look for all MinGW versions from 4.7:
4.7.0, 4.7.1, 4.7.2, 4.7.3
4.8.0, 4.8.1, 4.8.2.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197176
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Dec 2013 16:15:25 +0000 (16:15 +0000)]
Make this test pass on Release builds.
On Assert builds the "call" was matching the variable name in
%call = call ...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197167
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 12 Dec 2013 16:08:33 +0000 (16:08 +0000)]
[Modules] Don't parse any module map if modules are disabled.
Fixes rdar://
15644663 .
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197165
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Dec 2013 16:07:11 +0000 (16:07 +0000)]
Switch to the new MingW ABI.
GCC 4.7 changed the MingW ABI. On the clang side this means that methods now
have the thiscall calling convention by default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197164
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Dec 2013 15:48:19 +0000 (15:48 +0000)]
Avoid temporary std::string.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197160
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 12 Dec 2013 15:39:05 +0000 (15:39 +0000)]
Don't return a pointer to a temporary std::string's c_str.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197157
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bernard Ogden [Thu, 12 Dec 2013 13:27:15 +0000 (13:27 +0000)]
Simple refactoring to eliminate single-use local variable
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197154
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bernard Ogden [Thu, 12 Dec 2013 13:27:11 +0000 (13:27 +0000)]
Refactor duplicate functions
getARMCPU and getLLVMArchSuffixForARM existed as very similar functions
in both ToolChain.cpp and Tools.cpp. Create a single implementation of
each in Tools.cpp, eliminate the duplicate and share via Tools.h.
Creates an 'arm' namespace in Tools.h to be used by any ARM-targetting tools.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197153
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bernard Ogden [Thu, 12 Dec 2013 13:27:04 +0000 (13:27 +0000)]
Make thumb the default instruction set for v7m and v7em
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197152
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bernard Ogden [Thu, 12 Dec 2013 13:26:59 +0000 (13:26 +0000)]
Fix -mthumb resetting of target cpu
Passing -mthumb with no explicit CPU on the command line
resulted in target CPU changing from the architecture
default to arm7tdmi. Now it does not.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197151
91177308 -0d34-0410-b5e6-
96231b3b80d8