]>
granicus.if.org Git - clang/log
Richard Smith [Sun, 28 Oct 2012 04:47:21 +0000 (04:47 +0000)]
In -Wunneeded-internal-declaration, suppress the warning for variables which
might have been used in constant expressions, rather than suppressing it for
variables which are const. The important thing here is that such variables
can have their values used without actually being marked as 'used'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166896
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 28 Oct 2012 02:44:03 +0000 (02:44 +0000)]
Fix invalid jump scopes again. This time without trying to find out if an
incomplete type has a destructor or not.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166895
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 28 Oct 2012 02:25:27 +0000 (02:25 +0000)]
Add a testcase from the previous bootstrap problem.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166894
91177308 -0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sat, 27 Oct 2012 23:44:27 +0000 (23:44 +0000)]
Fix crash on missing namespace name in namespace alias definition -- PR14085.
Patch from Brian Brooks <brooks.brian@gmail.com>!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166893
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Sat, 27 Oct 2012 21:10:38 +0000 (21:10 +0000)]
objective-C arc/mrr: Patch for the new block variable layout meta-data.
It is currently off (so no tests). This is wip.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166892
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 27 Oct 2012 19:49:20 +0000 (19:49 +0000)]
Currently the initial value of Tok is dependent an the stack contents
and could cause the Parser to crash on the first ConsumeToken().
Patcy by Bas van den Berg!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166891
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 27 Oct 2012 16:49:47 +0000 (16:49 +0000)]
Revert 166876 while I debug a bootstrap problem.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166878
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 27 Oct 2012 14:56:08 +0000 (14:56 +0000)]
Reapply 166855 with an early exit on null QualTypes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166876
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mahesha S [Sat, 27 Oct 2012 10:44:42 +0000 (10:44 +0000)]
Reverted back the changes made in 166868 and in 166869
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166871
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mahesha S [Sat, 27 Oct 2012 09:05:45 +0000 (09:05 +0000)]
Feature:
OpenMP support.
Sub-Feature:
Support for "#pragma omp ..." registration with
Preprocessor.
Files Changed/Added:
* include/clang/Basic/DiagnosticGroups.td (C)
* include/clang/Basic/DiagnosticParseKinds.td (C)
* include/clang/Basic/TokenKinds.def (C)
* include/clang/Parse/Parser.h (C)
* lib/Parse/Parser.cpp (C)
Test Cases Changed/Added:
* test/Preprocessor/pragma_omp.c (A)
* test/Preprocessor/pragma_omp_ignored_warning.c (A)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166869
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mahesha S [Sat, 27 Oct 2012 07:47:56 +0000 (07:47 +0000)]
-------------------------------------------------
Feature:
OpenMP support in CLANG:
Sub-Feature:
Support for option -fopenmp
Files Changed/Added:
* include/clang/Driver/Options.td (C)
* include/clang/Basic/LangOptions.def (C)
* lib/Driver/Tools.cpp (C)
* lib/Frontend/CompilerInvocation.cpp (C)
Test Cases Changed/Added:
* test/Driver/clang_fopenmp_opt.c (A)
-------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166868
91177308 -0d34-0410-b5e6-
96231b3b80d8
Mahesha S [Sat, 27 Oct 2012 07:23:58 +0000 (07:23 +0000)]
Removed an extra blank line.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166867
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 27 Oct 2012 04:54:49 +0000 (04:54 +0000)]
Add a reduced testcase of the last bootstrap failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166866
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 27 Oct 2012 03:06:02 +0000 (03:06 +0000)]
Revert r166855. I can reproduce the bootstrap failure and have a testcase
to reduce.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166863
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Sat, 27 Oct 2012 02:13:28 +0000 (02:13 +0000)]
Add a test case for the stack overflow in rdar://
12542261
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166858
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 27 Oct 2012 01:17:42 +0000 (01:17 +0000)]
Fix cases where we were not producing an error when a computed goto could
jump over destructor calls.
Fixes pr13812.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166855
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 27 Oct 2012 01:03:43 +0000 (01:03 +0000)]
Move two helper functions to AST so that sema can use them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166853
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 27 Oct 2012 00:43:14 +0000 (00:43 +0000)]
Refactor some code into a new findMaterializedTemporary function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166849
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 27 Oct 2012 00:40:06 +0000 (00:40 +0000)]
Refactor some code into a new skipRValueSubobjectAdjustments function.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166848
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 27 Oct 2012 00:36:38 +0000 (00:36 +0000)]
Delay codegen to after collecting all SubobjectAdjustment so that the collection
can be refactored and used in Sema.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166847
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 26 Oct 2012 23:25:42 +0000 (23:25 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166833
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 26 Oct 2012 23:23:35 +0000 (23:23 +0000)]
Add missing safety check to an optimization for do-while loops. PR14191.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166832
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 26 Oct 2012 23:05:34 +0000 (23:05 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166830
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 26 Oct 2012 22:53:44 +0000 (22:53 +0000)]
In Parser::ParseDecltypeSpecifier, make sure the end location it returns
is at the end of parsed tokens when an error occurs, otherwise we'll hit
an assertion when trying to annotate the decltype tokens.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166826
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 26 Oct 2012 22:38:05 +0000 (22:38 +0000)]
Don't crash synthesizing an ObjC property with an empty struct type. <rdar://problem/
12547611 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166825
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Oct 2012 22:31:14 +0000 (22:31 +0000)]
When an externally-supplied record layout has a size that clearly
doesn't include padding up to the alignment of the record, take this
as a cue that the alignment of the record should (conservatively) be
set to 1. This is similar to other the other cues we use to determine
that the record has a lower alignment, e.g., that the
externally-supplied layout places fields at lower offsets than we
would. Fixes <rdar://problem/
12582052 >; test case in LLDB.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166824
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 26 Oct 2012 22:20:25 +0000 (22:20 +0000)]
Add comment for my patch in r166809.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166823
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Fri, 26 Oct 2012 20:34:52 +0000 (20:34 +0000)]
This patch is a follow-up to r166805. As suggested on-list, a check was
added to ensure no extra alignment code is added in the future.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166812
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 26 Oct 2012 20:33:59 +0000 (20:33 +0000)]
Remove BLOCK_BYREF_LAYOUT_BYREF flags from list of
flags for __block variable meta-data.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166811
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 26 Oct 2012 20:22:11 +0000 (20:22 +0000)]
objective-C IRGen: for @implementation nested in
extern "C", its method definitions must be IRGen'ed
before meta-data for class is generated. Otherwise,
IRGen crashes (to say the least).
// rdar://
12581683
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166809
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 26 Oct 2012 20:09:24 +0000 (20:09 +0000)]
[driver] Before applying the working directory check if the input path
is absolute.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166808
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Fri, 26 Oct 2012 19:59:03 +0000 (19:59 +0000)]
This patch addresses a 64-bit PowerPC ELF ABI compatibility issue with
varargs parameter passing.
A strict reading of the ABI indicates that any argument with alignment greater
than 8 may require skipping doublewords in the parameter save area to align
the argument, and hence require skipping GPRs. In practice, this is not done
by GCC. The alignment restriction is used for internal alignment of a
structure, but a structure with 16-byte alignment, for example, is not
itself 16-byte aligned in the parameter save area. Although this is messy,
it has become the de facto standard used in building existing libraries.
My initial varargs support followed the ABI language, but not the de facto
standard. Running the GCC compatibility test suite exposed this issue, and
indeed showed that LLVM didn't pass parameters self-consistently with my
original logic. Removing the additional alignment logic allows the affected
tests to now pass.
I modified the ppc64-varargs-struct.c test case to remove the existing test
for generation of alignment code, which is no longer appropriate.
Built and tested on powerpc64-unknown-linux-gnu with no new regressions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166805
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 26 Oct 2012 19:36:33 +0000 (19:36 +0000)]
[options] Fix mishandling of aliased options that was introduced in r166444.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166801
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Fri, 26 Oct 2012 19:15:56 +0000 (19:15 +0000)]
tests: Tweak unprintable.c to try another character which is hopefully even more
unprintable.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166798
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 26 Oct 2012 18:33:59 +0000 (18:33 +0000)]
[ms-inline asm] Add test case for r166792.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166793
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 26 Oct 2012 18:04:45 +0000 (18:04 +0000)]
[ms-inline asm] Test case for r166790.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166791
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Oct 2012 16:45:11 +0000 (16:45 +0000)]
Match up anonymous structs/unions in the ASTImporter. Previously, we'd
only actually get the answer right if there was only a single
anonymous struct/union at that level. This is part of
<rdar://problem/
11904570 >; the test will go into LLDB itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166781
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Fri, 26 Oct 2012 16:02:36 +0000 (16:02 +0000)]
Add comments for RemoveRedundantMsgs, rename it to removeRedundantMsgs() per Jordan's feedback.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166778
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Oct 2012 15:36:15 +0000 (15:36 +0000)]
Eliminate some longstanding FIXMEs regarding variadic templates in the
ASTImporter.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166777
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Fri, 26 Oct 2012 15:34:11 +0000 (15:34 +0000)]
In the ASTImporter, don't try to emit a diagnostic if we're not
allowed to complain about a failure.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166776
91177308 -0d34-0410-b5e6-
96231b3b80d8
Daniel Jasper [Fri, 26 Oct 2012 10:25:13 +0000 (10:25 +0000)]
Remove clang-fixit from tools page as it is currently not planned as a
separate tool.
Review: http://llvm-reviews.chandlerc.com/D81
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166766
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Tweed [Fri, 26 Oct 2012 10:17:44 +0000 (10:17 +0000)]
These tests require an actual x86 registered target, so mark them as such. Tested on ARM.
Patch by Joey Gouly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166765
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 26 Oct 2012 07:02:46 +0000 (07:02 +0000)]
Fix grammar-o.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166759
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 26 Oct 2012 07:01:51 +0000 (07:01 +0000)]
Fix test suppressed in r166683 on 32-bit Linux
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166758
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Fri, 26 Oct 2012 01:13:38 +0000 (01:13 +0000)]
Declare type of flags to be used in a __block (byref)
variable descriptor captured by a block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166746
91177308 -0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Fri, 26 Oct 2012 00:29:48 +0000 (00:29 +0000)]
Oz optimization level sets ForceSizeOpt attribute for each function
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166744
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 26 Oct 2012 00:25:10 +0000 (00:25 +0000)]
X86 SSE Intrinsics: update header for sqrt_ss, rsqrt_ss and rcp_ss.
There intrinsics pass through the upper FP values from the input.
rdar://
12558838
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166743
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 25 Oct 2012 23:28:48 +0000 (23:28 +0000)]
Recommit Eric's code to validate ASM string's constraints and modifiers.
This code checks the ASM string to see if the output size is able to fit within
the variable specified as the output. For instance, scalar-to-vector conversions
may not really work. It's on by default, but can be turned off with a flag if
you think you know what you're doing.
This is placed under a flag ('-Wasm-operand-widths') and flag group ('-Wasm').
<rdar://problem/
12284092 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166737
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 25 Oct 2012 23:05:00 +0000 (23:05 +0000)]
Fix the other occurrence of the problem fixed by r166731.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166735
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 25 Oct 2012 22:55:52 +0000 (22:55 +0000)]
Changing name of enum for block literal flags to represent
what it is meant for.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166734
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 25 Oct 2012 22:27:30 +0000 (22:27 +0000)]
LLVM's hashing routines produce a size_t, and thus generate different values for 32- and 64-bit host compilers. This really needs to be fixed -- the IR generated should not depend on the host -- but this change will get the bots green again. Proper fix to follow.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166731
91177308 -0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 25 Oct 2012 22:07:10 +0000 (22:07 +0000)]
TrackConstraintBRVisitor and ConditionBRVisitor can emit similar
path notes for cases where a value may be assumed to be null, etc.
Instead of having redundant diagnostics, do a pass over the generated
PathDiagnostic pieces and remove notes from TrackConstraintBRVisitor
that are already covered by ConditionBRVisitor, whose notes tend
to be better.
Fixes <rdar://problem/
12252783 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166728
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 25 Oct 2012 21:59:45 +0000 (21:59 +0000)]
Add a more direct test for r166661.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166727
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 25 Oct 2012 21:52:03 +0000 (21:52 +0000)]
[ms-inline asm] Add a test case for r166723 and r166724.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166725
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 25 Oct 2012 21:49:22 +0000 (21:49 +0000)]
[ms-inline asm] Add support for field lookup in the SemaCallback. Patch by Eli.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166723
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 25 Oct 2012 21:15:04 +0000 (21:15 +0000)]
Add some new types in preparation of encoding of captured block variable
layout meta-data work. wip.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166717
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 25 Oct 2012 20:34:00 +0000 (20:34 +0000)]
Don't require exception handling for clang-tblgen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166713
91177308 -0d34-0410-b5e6-
96231b3b80d8
Kaelyn Uhrain [Thu, 25 Oct 2012 19:43:57 +0000 (19:43 +0000)]
Move the input files for test/PCH/badpch.c under test/PCH/Inputs/.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166711
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Oct 2012 18:39:16 +0000 (18:39 +0000)]
When capturing 'this' in a lambda, make sure to update the set of
array-index starting values for the 'this' capture. Fixes
<rdar://problem/
12426831 >.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166709
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 25 Oct 2012 18:28:26 +0000 (18:28 +0000)]
Comment to XML conversion: avoid memory allocation while pretty-printing the
declaration.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166707
91177308 -0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Thu, 25 Oct 2012 18:16:02 +0000 (18:16 +0000)]
CommentDumper: reorder members and add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166705
91177308 -0d34-0410-b5e6-
96231b3b80d8
Fariborz Jahanian [Thu, 25 Oct 2012 18:06:53 +0000 (18:06 +0000)]
Provide comment describing what buildBlockDescriptor does.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166703
91177308 -0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 25 Oct 2012 16:37:08 +0000 (16:37 +0000)]
Don't throw exceptions in clang-tblgen by switching to PrintFatalError.
Add locations in a number of places, where they are available for free.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166691
91177308 -0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Thu, 25 Oct 2012 15:39:14 +0000 (15:39 +0000)]
Cleanup some clang code to use new type functions instead of using cast<>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166684
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 25 Oct 2012 14:43:34 +0000 (14:43 +0000)]
clang/test/CodeGenCXX/debug-info-thunk.cpp: Suppress it for now with XFAIL:*, due to failing on i686-*-*.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166683
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Tweed [Thu, 25 Oct 2012 13:56:30 +0000 (13:56 +0000)]
Correct test inovocations to use %clang_cc1 rather than direct invocation (so that it can have additional options set when trying to debug issues causing regressions).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166681
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Tweed [Thu, 25 Oct 2012 13:33:01 +0000 (13:33 +0000)]
Modify the targets to set appropriate calling convention defaults and C variables when using a gnueabihf or aapcs-vfp target.
Tested by me and Wei-Ren Chen.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166679
91177308 -0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Thu, 25 Oct 2012 10:18:50 +0000 (10:18 +0000)]
Initialize debug info for special cases of functions that lack declarations and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166676
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 25 Oct 2012 09:38:41 +0000 (09:38 +0000)]
unittests/ToolingTest.cpp: Suppress newFrontendActionFactory.InjectsEndOfSourceFileCallback on Win32 for now. Investigating.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166674
91177308 -0d34-0410-b5e6-
96231b3b80d8
Manuel Klimek [Thu, 25 Oct 2012 08:49:11 +0000 (08:49 +0000)]
Adds the possibility to inject a callback that's called after each translation unit is processed.
This is important when one wants to deduplicate results during one run over a translation unit by pointer identity of AST nodes.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166671
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 25 Oct 2012 02:14:12 +0000 (02:14 +0000)]
-fcatch-undefined-behavior checking for appropriate vptr value: Clang CodeGen side.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166661
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Thu, 25 Oct 2012 01:51:45 +0000 (01:51 +0000)]
Take into account that there may be a BOM at the beginning of the file,
when computing the size of the precompiled preamble.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166659
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Oct 2012 00:34:38 +0000 (00:34 +0000)]
Update warning-flag test
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166656
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 25 Oct 2012 00:32:44 +0000 (00:32 +0000)]
Revert r166647 to rethink the patch...
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166655
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Oct 2012 00:30:23 +0000 (00:30 +0000)]
Remove the old predefines-buffer diffing code completely. It's been
replaced by the more efficient, cleaner preprocessor-option version
that occurs earlier in PCH validation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166654
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Oct 2012 00:25:27 +0000 (00:25 +0000)]
Fix computation of predefines buffer from the preprocessor-option
checking, and disable the old predefines-buffer-diff'ing code path.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166653
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Thu, 25 Oct 2012 00:12:49 +0000 (00:12 +0000)]
When we're devirtualizing a method call, make sure the method has the correct IR type.
Reported in the thread "devirtualisation appears to crash clang on covariant functions on ARM" on cfe-dev.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166651
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Oct 2012 00:09:28 +0000 (00:09 +0000)]
ASTUnit doesn't actually care about the predefines; don't record them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166650
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 25 Oct 2012 00:07:54 +0000 (00:07 +0000)]
The the preprocessor option validator to compute suggested
predefines. We're not quite ready to cut over to these suggested
predefines yet, however.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166648
91177308 -0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 25 Oct 2012 00:05:55 +0000 (00:05 +0000)]
Add some support for diagnosing possibly mismatched constraint, type size and
modifiers. (From an idea by Eric...)
<rdar://problem/
12284092 >
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166647
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Thu, 25 Oct 2012 00:00:53 +0000 (00:00 +0000)]
'constexpr' and 'friend' are both declaration specifiers. Teach the parser this, for better error recovery.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166645
91177308 -0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Wed, 24 Oct 2012 23:51:56 +0000 (23:51 +0000)]
PR14171: Don't crash if we hit one of the paths where GetFullTypeForDeclarator
rebuilds a function type, and that function type has parens around its name.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166644
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 23:41:50 +0000 (23:41 +0000)]
Teach the PCH validator to check the preprocessor options, especially
the macros that are #define'd or #undef'd on the command line. This
checking happens much earlier than the current macro-definition
checking and is far cleaner, because it does a direct comparison
rather than a diff of the predefines buffers. Moreover, it allows us
to use the result of this check to skip over PCH files within a
directory that have non-matching -D's or -U's on the command
line. Finally, it improves the diagnostics a bit for mismatches,
fixing <rdar://problem/
8612222 >.
The old predefines-buffer diff'ing will go away in a subsequent commit.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166641
91177308 -0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 24 Oct 2012 22:52:04 +0000 (22:52 +0000)]
c-index-test.c: Split a format string. [-Woverlength-strings]
FIXME: They are still long strings without formatter in printf(3)!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166636
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 24 Oct 2012 22:22:12 +0000 (22:22 +0000)]
[ms-inline asm] Test case for r166632.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166633
91177308 -0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 24 Oct 2012 21:29:06 +0000 (21:29 +0000)]
Fix false positive in -Wunused-variable when a ctor call make involve cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166625
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 24 Oct 2012 20:28:18 +0000 (20:28 +0000)]
Update regression tests for r166617.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166619
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 24 Oct 2012 20:21:25 +0000 (20:21 +0000)]
Don't print scope qualifiers for references to a type defined locally in a function. Patch by Grzegorz Jablonski.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166617
91177308 -0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 24 Oct 2012 20:14:09 +0000 (20:14 +0000)]
Add an additional test for namespaces and -Wmissing-variable-declarations. Move C++ test into SemaCXX.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166616
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 20:05:57 +0000 (20:05 +0000)]
(De-)serialize the preprocessor options, including macros defined,
-include'd files, etc.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166614
91177308 -0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 24 Oct 2012 18:34:26 +0000 (18:34 +0000)]
Add a test showing that nodebug is accepted in methods too. Patch by
Paul Robinson.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166606
91177308 -0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 24 Oct 2012 18:29:15 +0000 (18:29 +0000)]
[libclang] Add "-index-file-full" option that recursively indexes any imported
modules/PCH files.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166605
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 17:49:01 +0000 (17:49 +0000)]
Explicitly specify C++98 when building the C++ precompiled header for this test, so that the test will work on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166601
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 24 Oct 2012 17:48:01 +0000 (17:48 +0000)]
[ms-inline asm] Add test cases for r166451.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166600
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 17:46:57 +0000 (17:46 +0000)]
Teach the preprocessor to hold onto the preprocessor options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166599
91177308 -0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 24 Oct 2012 17:23:06 +0000 (17:23 +0000)]
[ms-inline asm] Add test cases for r166592. The test cases only works if the
source operand is a register.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166594
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 17:01:35 +0000 (17:01 +0000)]
Move PreprocessorOptions into the Lex library, and make it intrusively
reference-counted.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166587
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 16:50:34 +0000 (16:50 +0000)]
(De-)serialize header search options.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166586
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 16:24:38 +0000 (16:24 +0000)]
Update unit tests for HeaderSearch change
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166584
91177308 -0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Wed, 24 Oct 2012 16:19:39 +0000 (16:19 +0000)]
Move HeaderSearchOptions into the Lex library, make it intrusively
reference-counted, and hold a reference to it in HeaderSearch.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166583
91177308 -0d34-0410-b5e6-
96231b3b80d8