Seth Cantrell
4cfc817a9a
improve highlighting of invalid string encodings
...
limit highlight to exactly the bad encoding, and highlight every
bad encoding in a string.
llvm-svn: 166900
2012-10-28 18:24:46 +00:00
Richard Smith
59a8e49f01
Revert functional part of r166896 and just suppress -Wunneeded-internal-declaration for reference types for now. This needs more work; the cases we currently miss are a bit random.
...
llvm-svn: 166899
2012-10-28 07:39:29 +00:00
Richard Smith
2f36dae5c0
When determining whether to try evaluating the initializer of a variable, check
...
whether the initializer is value-dependent rather than whether we are in a
dependent context. This allows us to detect some errors sooner, and fixes a
crash-on-invalid if a dependent type leaks out to a non-dependent context in
error recovery.
llvm-svn: 166898
2012-10-28 06:18:02 +00:00
Richard Smith
27501e787c
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'.
llvm-svn: 166896
2012-10-28 04:47:21 +00:00
Rafael Espindola
44938a738a
Fix invalid jump scopes again. This time without trying to find out if an
...
incomplete type has a destructor or not.
llvm-svn: 166895
2012-10-28 02:44:03 +00:00
Rafael Espindola
c74634fe48
Add a testcase from the previous bootstrap problem.
...
llvm-svn: 166894
2012-10-28 02:25:27 +00:00
Nico Weber
729f1e2a1c
Fix crash on missing namespace name in namespace alias definition -- PR14085.
...
Patch from Brian Brooks <brooks.brian@gmail.com>!
llvm-svn: 166893
2012-10-27 23:44:27 +00:00
Rafael Espindola
bd2c99b77c
Revert 166876 while I debug a bootstrap problem.
...
llvm-svn: 166878
2012-10-27 16:49:47 +00:00
Rafael Espindola
2ea126e73e
Reapply 166855 with an early exit on null QualTypes.
...
llvm-svn: 166876
2012-10-27 14:56:08 +00:00
Mahesha S
19a429e7e6
Reverted back the changes made in 166868 and in 166869
...
llvm-svn: 166871
2012-10-27 10:44:42 +00:00
Mahesha S
5d61097dd9
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)
llvm-svn: 166869
2012-10-27 09:05:45 +00:00
Mahesha S
6a682be48b
-------------------------------------------------
...
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)
-------------------------------------------------
llvm-svn: 166868
2012-10-27 07:47:56 +00:00
Rafael Espindola
bb5d47ef15
Add a reduced testcase of the last bootstrap failure.
...
llvm-svn: 166866
2012-10-27 04:54:49 +00:00
Rafael Espindola
8c0739d332
Revert r166855. I can reproduce the bootstrap failure and have a testcase
...
to reduce.
llvm-svn: 166863
2012-10-27 03:06:02 +00:00
Argyrios Kyrtzidis
668bf82658
Add a test case for the stack overflow in rdar://12542261
...
llvm-svn: 166858
2012-10-27 02:13:28 +00:00
Rafael Espindola
c5f9943a60
Fix cases where we were not producing an error when a computed goto could
...
jump over destructor calls.
Fixes pr13812.
llvm-svn: 166855
2012-10-27 01:17:42 +00:00
Eli Friedman
ef5df7b8eb
Fix typo.
...
llvm-svn: 166833
2012-10-26 23:25:42 +00:00
Eli Friedman
fc5b2effcf
Add missing safety check to an optimization for do-while loops. PR14191.
...
llvm-svn: 166832
2012-10-26 23:23:35 +00:00
Argyrios Kyrtzidis
c38395a0f7
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.
llvm-svn: 166826
2012-10-26 22:53:44 +00:00
Eli Friedman
0e84602d5c
Don't crash synthesizing an ObjC property with an empty struct type. <rdar://problem/12547611>.
...
llvm-svn: 166825
2012-10-26 22:38:05 +00:00
Douglas Gregor
1423a5cfd7
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.
llvm-svn: 166824
2012-10-26 22:31:14 +00:00
Bill Schmidt
528d2f12b7
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.
llvm-svn: 166812
2012-10-26 20:34:52 +00:00
Fariborz Jahanian
2d26c29e0c
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
llvm-svn: 166809
2012-10-26 20:22:11 +00:00
Argyrios Kyrtzidis
c2c77c42ef
[driver] Before applying the working directory check if the input path
...
is absolute.
llvm-svn: 166808
2012-10-26 20:09:24 +00:00
Bill Schmidt
4a2dcfe5ee
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.
llvm-svn: 166805
2012-10-26 19:59:03 +00:00
Argyrios Kyrtzidis
7ec3c09412
[options] Fix mishandling of aliased options that was introduced in r166444.
...
llvm-svn: 166801
2012-10-26 19:36:33 +00:00
Daniel Dunbar
197157613c
tests: Tweak unprintable.c to try another character which is hopefully even more
...
unprintable.
llvm-svn: 166798
2012-10-26 19:15:56 +00:00
Chad Rosier
0130f82ccc
[ms-inline asm] Add test case for r166792.
...
llvm-svn: 166793
2012-10-26 18:33:59 +00:00
Chad Rosier
0473d5429c
[ms-inline asm] Test case for r166790.
...
llvm-svn: 166791
2012-10-26 18:04:45 +00:00
David Tweed
89206b6214
These tests require an actual x86 registered target, so mark them as such. Tested on ARM.
...
Patch by Joey Gouly.
llvm-svn: 166765
2012-10-26 10:17:44 +00:00
Bill Wendling
208f61913d
Fix grammar-o.
...
llvm-svn: 166759
2012-10-26 07:02:46 +00:00
Alexey Samsonov
8bece2e957
Fix test suppressed in r166683 on 32-bit Linux
...
llvm-svn: 166758
2012-10-26 07:01:51 +00:00
Quentin Colombet
5ee5ca1dbc
Oz optimization level sets ForceSizeOpt attribute for each function
...
llvm-svn: 166744
2012-10-26 00:29:48 +00:00
Manman Ren
5750c1c07e
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
llvm-svn: 166743
2012-10-26 00:25:10 +00:00
Bill Wendling
9d1ee1175d
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>
llvm-svn: 166737
2012-10-25 23:28:48 +00:00
Richard Smith
3750e7776b
Fix the other occurrence of the problem fixed by r166731.
...
llvm-svn: 166735
2012-10-25 23:05:00 +00:00
Richard Smith
9421156acc
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.
...
llvm-svn: 166731
2012-10-25 22:27:30 +00:00
Ted Kremenek
a5958869f6
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>
llvm-svn: 166728
2012-10-25 22:07:10 +00:00
Richard Smith
1048356524
Add a more direct test for r166661.
...
llvm-svn: 166727
2012-10-25 21:59:45 +00:00
Chad Rosier
77c8aca06a
[ms-inline asm] Add a test case for r166723 and r166724.
...
llvm-svn: 166725
2012-10-25 21:52:03 +00:00
Kaelyn Uhrain
f1ecb7c62c
Move the input files for test/PCH/badpch.c under test/PCH/Inputs/.
...
llvm-svn: 166711
2012-10-25 19:43:57 +00:00
Douglas Gregor
d814a05f6b
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>.
llvm-svn: 166709
2012-10-25 18:39:16 +00:00
NAKAMURA Takumi
920cff606b
clang/test/CodeGenCXX/debug-info-thunk.cpp: Suppress it for now with XFAIL:*, due to failing on i686-*-*.
...
llvm-svn: 166683
2012-10-25 14:43:34 +00:00
David Tweed
d8bb236e18
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).
...
llvm-svn: 166681
2012-10-25 13:56:30 +00:00
Alexey Samsonov
9b502e512c
Initialize debug info for special cases of functions that lack declarations and are generated by Clang (global initializers/destructors, thunks) . Fixes PR13942.
...
llvm-svn: 166676
2012-10-25 10:18:50 +00:00
Argyrios Kyrtzidis
d53d0daab9
Take into account that there may be a BOM at the beginning of the file,
...
when computing the size of the precompiled preamble.
llvm-svn: 166659
2012-10-25 01:51:45 +00:00
Douglas Gregor
79ae600e8f
Update warning-flag test
...
llvm-svn: 166656
2012-10-25 00:34:38 +00:00
Bill Wendling
d75987dde9
Revert r166647 to rethink the patch...
...
llvm-svn: 166655
2012-10-25 00:32:44 +00:00
Eli Friedman
ade609770e
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.
llvm-svn: 166651
2012-10-25 00:12:49 +00:00
Bill Wendling
753c8782df
Add some support for diagnosing possibly mismatched constraint, type size and
...
modifiers. (From an idea by Eric...)
<rdar://problem/12284092>
llvm-svn: 166647
2012-10-25 00:05:55 +00:00